Skip to content

Commit

Permalink
Don't use PROJECT_SOURCE_DIR in toolchains
Browse files Browse the repository at this point in the history
The key `PROJECT_SOURCE_DIR` refers to the wrong directory when a toolchain is used in a project such as `voicexx`. Using `CMAKE_CURRENT_LIST_DIR` fixes the problem.

See merge request gysela-developpers/gyselalibxx!781

--------------------------------------------
  • Loading branch information
EmilyBourne committed Nov 22, 2024
1 parent 0f4e7df commit d4245b0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion toolchains/a100.leonardo.spack/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/../cicd_default_toolchain.cmake)
set(CMAKE_BUILD_TYPE Release)

# Compiler options
set(CMAKE_CXX_COMPILER ${PROJECT_SOURCE_DIR}/vendor/kokkos/bin/nvcc_wrapper)
set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_LIST_DIR}/../../vendor/kokkos/bin/nvcc_wrapper)
set(CMAKE_CXX_FLAGS "-Wall -Wno-sign-compare --Werror cross-execution-space-call -Xcudafe --diag_suppress=unsigned_compare_with_zero -Xcudafe --diag_suppress=integer_sign_change")

# Gyselalibxx options
Expand Down
2 changes: 1 addition & 1 deletion toolchains/v100.persee/debug_toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/../cicd_default_toolchain.cmake)
set(CMAKE_BUILD_TYPE Debug)

# Compiler options
set(CMAKE_CXX_COMPILER ${PROJECT_SOURCE_DIR}/vendor/kokkos/bin/nvcc_wrapper)
set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_LIST_DIR}/../../vendor/kokkos/bin/nvcc_wrapper)
set(CMAKE_CXX_FLAGS "-g -Wall -Werror -Wno-sign-compare -Xcudafe --diag_suppress=unsigned_compare_with_zero -Xcudafe --diag_suppress=integer_sign_change")

# Kokkos options
Expand Down
2 changes: 1 addition & 1 deletion toolchains/v100.persee/toolchain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/../cicd_default_toolchain.cmake)
set(CMAKE_BUILD_TYPE Release)

# Compiler options
set(CMAKE_CXX_COMPILER ${PROJECT_SOURCE_DIR}/vendor/kokkos/bin/nvcc_wrapper)
set(CMAKE_CXX_COMPILER ${CMAKE_CURRENT_LIST_DIR}/../../vendor/kokkos/bin/nvcc_wrapper)
set(CMAKE_CXX_FLAGS "-Wall -Wno-sign-compare --Werror cross-execution-space-call -Xcudafe --diag_suppress=unsigned_compare_with_zero -Xcudafe --diag_suppress=integer_sign_change")

# Gyselalibxx options
Expand Down

0 comments on commit d4245b0

Please sign in to comment.