From ac49ef69d827580db05684364db1f654f1eeea7b Mon Sep 17 00:00:00 2001 From: Jake McLaughlin Date: Sun, 17 Sep 2023 19:05:38 -0400 Subject: [PATCH] Fix openmp compile error --- fuse_optimizers/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/fuse_optimizers/CMakeLists.txt b/fuse_optimizers/CMakeLists.txt index 798787394..d1b7528f0 100644 --- a/fuse_optimizers/CMakeLists.txt +++ b/fuse_optimizers/CMakeLists.txt @@ -12,6 +12,8 @@ set(build_depends std_srvs ) +find_package(OpenMP) + find_package(catkin REQUIRED COMPONENTS ${build_depends} ) @@ -47,12 +49,16 @@ target_include_directories(${PROJECT_NAME} ) target_link_libraries(${PROJECT_NAME} ${catkin_LIBRARIES} + ${OpenMP_CXX_LIBRARIES} ) set_target_properties(${PROJECT_NAME} PROPERTIES CXX_STANDARD 14 CXX_STANDARD_REQUIRED YES ) +target_compile_options(${PROJECT_NAME} + PRIVATE ${OpenMP_CXX_FLAGS} +) ## batch_optimizer node add_executable(batch_optimizer_node