-
Notifications
You must be signed in to change notification settings - Fork 99
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modular build: allowing to build "common" only
Refactoring the CMake logic to allow us to build the common directory and its content as an independent module. The idea is to propagate this to other more meaningful modules so that we can have faster compilation. Signed-off-by: Luc Berger-Vergiat <lberge@sandia.gov>
- Loading branch information
Showing
41 changed files
with
285 additions
and
193 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Adding source directory to the build | ||
LIST(APPEND KK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/common/src) | ||
LIST(APPEND KK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/common/src/impl) | ||
LIST(APPEND KK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/common/src/tpls) | ||
LIST(APPEND KK_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/common/unit_test) | ||
|
||
# Adding unit-tests | ||
KOKKOSKERNELS_INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR}/common) | ||
KOKKOSKERNELS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${CMAKE_CURRENT_SOURCE_DIR}/common) |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
##################### | ||
# # | ||
# Add include files # | ||
# # | ||
##################### | ||
|
||
KOKKOSKERNELS_INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}/test_common) | ||
KOKKOSKERNELS_INCLUDE_DIRECTORIES(REQUIRED_DURING_INSTALLATION_TESTING ${PACKAGE_SOURCE_DIR}/test_common) | ||
|
||
##################### | ||
# # | ||
# Define unit-tests # | ||
# # | ||
##################### | ||
|
||
##################### | ||
# # | ||
# Add GPU backends # | ||
# # | ||
##################### | ||
IF (KOKKOS_ENABLE_CUDA) | ||
KOKKOSKERNELS_ADD_UNIT_TEST( | ||
common_cuda | ||
SOURCES | ||
${PACKAGE_SOURCE_DIR}/unit_test/Test_Main.cpp | ||
backends/Test_Cuda_Common.cpp | ||
COMPONENTS common | ||
) | ||
ENDIF () | ||
|
||
IF (KOKKOS_ENABLE_HIP) | ||
KOKKOSKERNELS_ADD_UNIT_TEST( | ||
common_hip | ||
SOURCES | ||
${PACKAGE_SOURCE_DIR}/unit_test/Test_Main.cpp | ||
backends/Test_HIP_Common.cpp | ||
COMPONENTS common | ||
) | ||
ENDIF () | ||
|
||
IF (KOKKOS_ENABLE_SYCL) | ||
KOKKOSKERNELS_ADD_UNIT_TEST( | ||
common_sycl | ||
SOURCES | ||
${PACKAGE_SOURCE_DIR}/unit_test/Test_Main.cpp | ||
backends/Test_SYCL_Common.cpp | ||
COMPONENTS common | ||
) | ||
ENDIF () | ||
|
||
IF (KOKKOS_ENABLE_OPENMPTARGET) | ||
# KOKKOSKERNELS_ADD_UNIT_TEST( | ||
# common_openmptarget | ||
# SOURCES | ||
# ${PACKAGE_SOURCE_DIR}/unit_test/Test_Main.cpp | ||
# backends/Test_OpenMPTarget_Common.cpp | ||
# COMPONENTS common | ||
# ) | ||
ENDIF () | ||
|
||
|
||
|
||
##################### | ||
# # | ||
# Add CPU backends # | ||
# # | ||
##################### | ||
IF (KOKKOS_ENABLE_SERIAL) | ||
KOKKOSKERNELS_ADD_UNIT_TEST( | ||
common_serial | ||
SOURCES | ||
${PACKAGE_SOURCE_DIR}/unit_test/Test_Main.cpp | ||
backends/Test_Serial_Common.cpp | ||
COMPONENTS common | ||
) | ||
ENDIF () | ||
|
||
IF (KOKKOS_ENABLE_OPENMP) | ||
KOKKOSKERNELS_ADD_UNIT_TEST( | ||
common_openmp | ||
SOURCES | ||
${PACKAGE_SOURCE_DIR}/unit_test/Test_Main.cpp | ||
backends/Test_OpenMP_Common.cpp | ||
COMPONENTS common | ||
) | ||
ENDIF () | ||
|
||
IF (KOKKOS_ENABLE_THREADS) | ||
KOKKOSKERNELS_ADD_UNIT_TEST( | ||
common_threads | ||
SOURCES | ||
${PACKAGE_SOURCE_DIR}/unit_test/Test_Main.cpp | ||
backends/Test_Threads_Common.cpp | ||
COMPONENTS common | ||
) | ||
ENDIF () | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Oops, something went wrong.