Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Consistent Usage of target_link_libraries for CUDA Targets #646

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pybind_interface/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ set_target_properties(qsim_cuda PROPERTIES
)
set_source_files_properties(pybind_main_cuda.cpp PROPERTIES LANGUAGE CUDA)

target_link_libraries(qsim_cuda PUBLIC OpenMP::OpenMP_CXX)
target_link_libraries(qsim_cuda OpenMP::OpenMP_CXX)
2 changes: 1 addition & 1 deletion pybind_interface/custatevec/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,4 @@ set_target_properties(qsim_custatevec PROPERTIES
)
set_source_files_properties(pybind_main_custatevec.cpp PROPERTIES LANGUAGE CUDA)

target_link_libraries(qsim_custatevec PUBLIC OpenMP::OpenMP_CXX)
target_link_libraries(qsim_custatevec OpenMP::OpenMP_CXX)
4 changes: 3 additions & 1 deletion pybind_interface/decide/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ if(has_nvcc)
SUFFIX "${PYTHON_MODULE_EXTENSION}"
)
set_source_files_properties(decide.cpp PROPERTIES LANGUAGE CUDA)
target_link_libraries(qsim_decide OpenMP::OpenMP_CXX)
elseif(has_hipcc)
list(APPEND CMAKE_MODULE_PATH "/opt/rocm/lib/cmake/hip")
find_package(HIP REQUIRED)
Expand All @@ -41,8 +42,9 @@ elseif(has_hipcc)
PREFIX "${PYTHON_MODULE_PREFIX}"
SUFFIX "${PYTHON_MODULE_EXTENSION}"
)
target_link_libraries(qsim_decide PUBLIC OpenMP::OpenMP_CXX)
else()
pybind11_add_module(qsim_decide decide.cpp)
target_link_libraries(qsim_decide PUBLIC OpenMP::OpenMP_CXX)
endif()

target_link_libraries(qsim_decide PUBLIC OpenMP::OpenMP_CXX)
Loading