diff options
-rw-r--r-- | CMakeLists.txt | 9 | ||||
-rw-r--r-- | src/tests/CMakeLists.txt | 5 |
2 files changed, 4 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 4a44649..52cf7aa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,15 +18,6 @@ option(TNG_BUILD_EXAMPLES "Build examples showing usage of the TNG API" ON) option(TNG_BUILD_TEST "Build TNG testing binary." ON) option(TNG_BUILD_COMPRESSION_TESTS "Build tests of the TNG compression library" OFF) -option(TNG_USE_OPENMP "Try to use the OpenMP library (if available)" OFF) -if(TNG_USE_OPENMP) - find_package(OpenMP) - if(OPENMP_FOUND) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") - endif() -endif() - find_package(ZLIB QUIET) include(CheckIncludeFile) diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index a0cfc46..f465b6b 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt @@ -23,7 +23,10 @@ if(TNG_BUILD_TEST) endif() if(TNG_BUILD_EXAMPLES) - if(TNG_USE_OPENMP AND OPENMP_FOUND) + find_package(OpenMP) + if(OPENMP_FOUND) + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}") + set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}") add_executable(md_openmp md_openmp.c) target_link_libraries(md_openmp tng_io ${OpenMP_LIBS}) |