Skip to content

Commit

Permalink
Call target_link_libraries for OpenMP
Browse files Browse the repository at this point in the history
  • Loading branch information
basnijholt committed Nov 28, 2023
1 parent b06b395 commit 34ca2a5
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pybind_interface/avx2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ if(APPLE)
endif()
INCLUDE(../GetPybind11.cmake)
pybind11_add_module(qsim_avx2 pybind_main_avx2.cpp)

target_link_libraries(qsim_avx2 PUBLIC OpenMP::OpenMP_CXX)
2 changes: 2 additions & 0 deletions pybind_interface/avx512/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ endif()

INCLUDE(../GetPybind11.cmake)
pybind11_add_module(qsim_avx512 pybind_main_avx512.cpp)

target_link_libraries(qsim_avx512 PUBLIC OpenMP::OpenMP_CXX)
2 changes: 2 additions & 0 deletions pybind_interface/basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ endif()

INCLUDE(../GetPybind11.cmake)
pybind11_add_module(qsim_basic pybind_main_basic.cpp)

target_link_libraries(qsim_basic PUBLIC OpenMP::OpenMP_CXX)
2 changes: 2 additions & 0 deletions pybind_interface/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,5 @@ set_target_properties(qsim_cuda PROPERTIES
SUFFIX "${PYTHON_MODULE_EXTENSION}"
)
set_source_files_properties(pybind_main_cuda.cpp PROPERTIES LANGUAGE CUDA)

target_link_libraries(qsim_cuda PUBLIC OpenMP::OpenMP_CXX)
2 changes: 2 additions & 0 deletions pybind_interface/custatevec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ set_target_properties(qsim_custatevec PROPERTIES
SUFFIX "${PYTHON_MODULE_EXTENSION}"
)
set_source_files_properties(pybind_main_custatevec.cpp PROPERTIES LANGUAGE CUDA)

target_link_libraries(qsim_custatevec PUBLIC OpenMP::OpenMP_CXX)
2 changes: 2 additions & 0 deletions pybind_interface/decide/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,5 @@ elseif(has_hipcc)
else()
pybind11_add_module(qsim_decide decide.cpp)
endif()

target_link_libraries(qsim_decide PUBLIC OpenMP::OpenMP_CXX)
2 changes: 2 additions & 0 deletions pybind_interface/hip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ set_target_properties(qsim_hip PROPERTIES
SUFFIX "${PYTHON_MODULE_EXTENSION}"
)
set_source_files_properties(pybind_main_hip.cpp PROPERTIES LANGUAGE HIP)

target_link_libraries(qsim_hip PUBLIC OpenMP::OpenMP_CXX)
2 changes: 2 additions & 0 deletions pybind_interface/sse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ endif()

INCLUDE(../GetPybind11.cmake)
pybind11_add_module(qsim_sse pybind_main_sse.cpp)

target_link_libraries(qsim_sse PUBLIC OpenMP::OpenMP_CXX)

0 comments on commit 34ca2a5

Please sign in to comment.