From a3989bbadc645690373f5e7601dcd7d184e204bf Mon Sep 17 00:00:00 2001 From: Krishna Vedala Date: Tue, 7 Apr 2020 18:21:27 -0400 Subject: [PATCH] use openmp in 'misc' directory --- misc/CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/misc/CMakeLists.txt b/misc/CMakeLists.txt index be8a549f..493bc06e 100644 --- a/misc/CMakeLists.txt +++ b/misc/CMakeLists.txt @@ -1,3 +1,8 @@ + +if(USE_OPENMP) + find_package(OpenMP) +endif() + # If necessary, use the RELATIVE flag, otherwise each source file may be listed # with full pathname. RELATIVE may makes it easier to extract an executable name # automatically. @@ -11,6 +16,9 @@ foreach( testsourcefile ${APP_SOURCES} ) # Make sure YourLib is linked to each app target_link_libraries( ${testname} function_timer ) set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE C) + if(OpenMP_C_FOUND) + target_link_libraries(${testname} OpenMP::OpenMP_C) + endif() install(TARGETS ${testname} DESTINATION "bin/misc") endforeach( testsourcefile ${APP_SOURCES} )