From 981445657f9e7041e3d954148146f21af61cf59f Mon Sep 17 00:00:00 2001 From: dkazanc Date: Mon, 2 Dec 2019 10:23:41 +0000 Subject: cmake modif --- src/Core/CMakeLists.txt | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Core/CMakeLists.txt b/src/Core/CMakeLists.txt index 07aae3c..4e43b5e 100644 --- a/src/Core/CMakeLists.txt +++ b/src/Core/CMakeLists.txt @@ -15,6 +15,15 @@ message("CIL_VERSION ${CIL_VERSION}") ## Build the regularisers package as a library message("Creating Regularisers as a shared library") +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} ${OpenMP_CXX_FLAGS}") + set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_SHARED_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}") + set (CMAKE_STATIC_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_STATIC_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}") +endif() + message("CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS}") message("CMAKE_C_FLAGS ${CMAKE_C_FLAGS}") message("CMAKE_EXE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS}") -- cgit v1.2.3