Skip to content

Commit

Permalink
Include omp via cmake target
Browse files Browse the repository at this point in the history
  • Loading branch information
haider8645 committed Dec 9, 2024
1 parent 6f4813d commit 286e555
Showing 1 changed file with 33 additions and 31 deletions.
64 changes: 33 additions & 31 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,45 +1,48 @@
find_package(OpenMP REQUIRED)
if(OPENMP_FOUND)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()

set(DEPS_PKGCONFIG_LIST
base-types
sbpl
sbpl_spline_primitives
traversability_generator3d
trajectory_follower
base-types
sbpl
sbpl_spline_primitives
traversability_generator3d
trajectory_follower
)

if(ENABLE_DEBUG_DRAWINGS AND vizkit3d_debug_drawings-commands_FOUND)
list(APPEND DEPS_PKGCONFIG_LIST vizkit3d_debug_drawings-commands)
list(APPEND DEPS_PKGCONFIG_LIST vizkit3d_debug_drawings-commands)
endif()

set(ADDITIONAL_LIBS "")
if(OpenMP_CXX_FOUND)
message(STATUS "OpenMP is found: ${OpenMP_CXX_FOUND}")
list(APPEND ADDITIONAL_LIBS OpenMP::OpenMP_CXX)
endif()

rock_library(ugv_nav4d
SOURCES
DiscreteTheta.cpp
EnvironmentXYZTheta.cpp
PathStatistic.cpp
Planner.cpp
PlannerDump.cpp
PreComputedMotions.cpp
Dijkstra.cpp
ObstacleMapGenerator3D.cpp
DebugDrawingDeclarations.cpp
DiscreteTheta.cpp
EnvironmentXYZTheta.cpp
PathStatistic.cpp
Planner.cpp
PlannerDump.cpp
PreComputedMotions.cpp
Dijkstra.cpp
ObstacleMapGenerator3D.cpp
DebugDrawingDeclarations.cpp
HEADERS
Mobility.hpp
DiscreteTheta.hpp
EnvironmentXYZTheta.hpp
PathStatistic.hpp
Planner.hpp
PlannerConfig.hpp
PreComputedMotions.hpp
Dijkstra.hpp
ObstacleMapGenerator3D.hpp
Mobility.hpp
DiscreteTheta.hpp
EnvironmentXYZTheta.hpp
PathStatistic.hpp
Planner.hpp
PlannerConfig.hpp
PreComputedMotions.hpp
Dijkstra.hpp
ObstacleMapGenerator3D.hpp
DEPS_PKGCONFIG
${DEPS_PKGCONFIG_LIST}
${DEPS_PKGCONFIG_LIST}
LIBS
${ADDITIONAL_LIBS}
)

add_subdirectory(gui)
Expand All @@ -50,4 +53,3 @@ if(TESTS_ENABLED)
else()
message(STATUS "TESTS_ENABLED is set to OFF. Skipped!")
endif()

0 comments on commit 286e555

Please sign in to comment.