mirror of
https://github.com/amd/blis.git
synced 2026-04-20 07:38:53 +00:00
CMake: Added logic to link openmp library given through OpenMP_libomp_LIBRARY cmake variable on linux.
Enabled command line option to link libiomp5.so or libomp.so or libgomp.so libraries using cmake. Eg:- -DOpenMP_libomp_LIBRARY=<path to openmp library including library name>. If we not set above variable, by default openmp library will be libomp.so for clang and libgomp.so for gcc compiler. Change-Id: I5bffa10ff8351f5d10f0d543cbdf55aa16c84c90
This commit is contained in:
committed by
Chandrashekara KR
parent
91bdf9a3eb
commit
fa75ce725e
6
vendor/testcpp/CMakeLists.txt
vendored
6
vendor/testcpp/CMakeLists.txt
vendored
@@ -53,7 +53,11 @@ foreach(source ${testcpp_sources})
|
||||
)
|
||||
target_link_libraries(${exec_name} PRIVATE ${LDFLAGS} ${libblis_link})
|
||||
if(THREADING_MODEL STREQUAL "openmp")
|
||||
target_link_libraries(${exec_name} PRIVATE OpenMP::OpenMP_C)
|
||||
if((NOT ${OpenMP_libomp_LIBRARY} STREQUAL "") AND (NOT WIN32))
|
||||
target_link_libraries(${exec_name} PRIVATE ${OpenMP_libomp_LIBRARY})
|
||||
else()
|
||||
target_link_libraries(${exec_name} PRIVATE OpenMP::OpenMP_C)
|
||||
endif()
|
||||
endif()
|
||||
set_target_properties(${exec_name} PROPERTIES CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
# Put all those targets under vendor-testcpp-targets folder name so that they appear all together in IDE.
|
||||
|
||||
Reference in New Issue
Block a user