mirror of
https://github.moeyy.xyz/https://github.com/TheAlgorithms/C.git
synced 2023-10-11 15:56:24 +08:00
use openmp in 'misc' directory
This commit is contained in:
parent
3b576fec20
commit
a3989bbadc
@ -1,3 +1,8 @@
|
|||||||
|
|
||||||
|
if(USE_OPENMP)
|
||||||
|
find_package(OpenMP)
|
||||||
|
endif()
|
||||||
|
|
||||||
# If necessary, use the RELATIVE flag, otherwise each source file may be listed
|
# 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
|
# with full pathname. RELATIVE may makes it easier to extract an executable name
|
||||||
# automatically.
|
# automatically.
|
||||||
@ -11,6 +16,9 @@ foreach( testsourcefile ${APP_SOURCES} )
|
|||||||
# Make sure YourLib is linked to each app
|
# Make sure YourLib is linked to each app
|
||||||
target_link_libraries( ${testname} function_timer )
|
target_link_libraries( ${testname} function_timer )
|
||||||
set_target_properties(${testname} PROPERTIES LINKER_LANGUAGE C)
|
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")
|
install(TARGETS ${testname} DESTINATION "bin/misc")
|
||||||
|
|
||||||
endforeach( testsourcefile ${APP_SOURCES} )
|
endforeach( testsourcefile ${APP_SOURCES} )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user