Skip to content

Commit 7511330

Browse files
committed
Build: fix OepnMP link for intel compiler
Using OpenMP target will only link this feature to the targeted library. However, `add_compile_options` will add OpenMP flags to all targets afterwards, without linking libraries properly.
1 parent df16499 commit 7511330

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ target_link_libraries(${ABACUS_BIN_NAME} Threads::Threads)
5353
if(USE_OPENMP)
5454
find_package(OpenMP REQUIRED)
5555
target_link_libraries(${ABACUS_BIN_NAME} OpenMP::OpenMP_CXX)
56-
add_compile_options(${OpenMP_CXX_FLAGS})
5756
endif()
5857

5958
include(CheckLanguage)

0 commit comments

Comments
 (0)