mirror of
https://github.com/ceres-solver/ceres-solver.git
synced 2026-08-29 16:40:38 +08:00
Add OpenMP flags when compiling for C if enabled.
- Previously we were only adding the OpenMP flags when compiling for C++ which could cause linker issues when compiling the C examples. Change-Id: Ie7d8192b9da6fb17b8f554e6d164ec0a65403c99
This commit is contained in:
@@ -431,6 +431,7 @@ if (OPENMP)
|
||||
message("-- Building with OpenMP.")
|
||||
list(APPEND CERES_COMPILE_OPTIONS CERES_USE_OPENMP)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
if (UNIX)
|
||||
# At least on Linux, we need pthreads to be enabled for mutex to
|
||||
# compile. This may not work on Windows or Android.
|
||||
|
||||
Reference in New Issue
Block a user