Skip to content

Commit

Permalink
Rename library cabanacore->Core (with alias)
Browse files Browse the repository at this point in the history
  • Loading branch information
streeve committed Sep 9, 2023
1 parent 7a9c02e commit f5e1684
Show file tree
Hide file tree
Showing 25 changed files with 46 additions and 45 deletions.
10 changes: 5 additions & 5 deletions benchmark/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
############################################################################

add_executable(BinSortPerformance Cabana_BinSortPerformance.cpp)
target_link_libraries(BinSortPerformance cabanacore)
target_link_libraries(BinSortPerformance Core)

add_executable(NeighborVerletPerformance Cabana_NeighborVerletPerformance.cpp)
target_link_libraries(NeighborVerletPerformance cabanacore)
target_link_libraries(NeighborVerletPerformance Core)

if(Cabana_ENABLE_ARBORX)
add_executable(NeighborArborXPerformance Cabana_NeighborArborXPerformance.cpp)
target_link_libraries(NeighborArborXPerformance cabanacore)
target_link_libraries(NeighborArborXPerformance Core)
endif()

add_executable(LinkedCellPerformance Cabana_LinkedCellPerformance.cpp)
target_link_libraries(LinkedCellPerformance cabanacore)
target_link_libraries(LinkedCellPerformance Core)

if(Cabana_ENABLE_MPI)
add_executable(CommPerformance Cabana_CommPerformance.cpp)
target_link_libraries(CommPerformance cabanacore)
target_link_libraries(CommPerformance Core)
endif()

if(Cabana_ENABLE_TESTING)
Expand Down
10 changes: 5 additions & 5 deletions benchmark/grid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@ endif()

if(Cabana_ENABLE_TESTING)
if(NOT Kokkos_ENABLE_SYCL) #FIXME_SYCL
add_test(NAME Cabana_Grid_SparseMapPerformance COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:SparseMapPerformance> sparsemap_output.txt)
add_test(NAME Cabana_Grid_SparsePartitionerPerformance COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:SparsePartitionerPerformance> sparsepartitioner_output.txt)
add_test(NAME Cabana_Grid_Performance_SparseMap COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:SparseMapPerformance> sparsemap_output.txt)
add_test(NAME Cabana_Grid_Performance_SparsePartitioner COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:SparsePartitionerPerformance> sparsepartitioner_output.txt)
endif()

add_test(NAME Cabana_Grid_HaloPerformance COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:HaloPerformance> halo_output.txt)
add_test(NAME Cabana_Grid_Performance_Halo COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:HaloPerformance> halo_output.txt)

add_test(NAME Cabana_Grid_InterpolationPerformance COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:InterpolationPerformance> interpolation_output.txt)
add_test(NAME Cabana_Grid_Performance_Interpolation COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:InterpolationPerformance> interpolation_output.txt)

if (Cabana_ENABLE_HEFFTE)
add_test(NAME Cabana_Grid_FastFourierTransformPerformance COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:FastFourierTransformPerformance> fastfouriertransform_output.txt)
add_test(NAME Cabana_Grid_Performance_FastFourierTransform COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:FastFourierTransformPerformance> fastfouriertransform_output.txt)
endif()
endif()
2 changes: 1 addition & 1 deletion cmake/test_harness/test_harness.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ macro(Cabana_add_tests)
"#include <Test${_device}_Category.hpp>\n"
"#include <tst${_test}.hpp>\n"
)
if(${CABANA_UNIT_TEST_PACKAGE} STREQUAL cabanacore)
if(${CABANA_UNIT_TEST_PACKAGE} STREQUAL Core)
if(CABANA_UNIT_TEST_MPI)
set(_target Cabana_${_test}_MPI_test_${_device})
else()
Expand Down
2 changes: 1 addition & 1 deletion core/performance_test/peakflops/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ foreach(_test 01_cpp_simple 02_kokkos_simple_view 03_Cabana_peakflops)
CABANA_PERFORMANCE_ITERATIONS=${Cabana_PERFORMANCE_ITERATIONS}
CABANA_PERFORMANCE_SEED=${Cabana_PERFORMANCE_SEED}
)
target_link_libraries(${test} cabanacore ${gtest_target})
target_link_libraries(${test} Core ${gtest_target})
target_compile_options(${test} PRIVATE "-fopenmp")
add_test(NAME ${test} COMMAND ${test})
set_tests_properties(${test} PROPERTIES LABELS "PERFORMANCE" )
Expand Down
21 changes: 11 additions & 10 deletions core/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,38 +63,38 @@ set(HEADERS_IMPL
impl/Cabana_TypeTraits.hpp
)

add_library(cabanacore INTERFACE)
add_library(Core INTERFACE)

# Require minimum of C++17
set_target_properties(cabanacore PROPERTIES INTERFACE_COMPILE_FEATURES cxx_std_17)
set_target_properties(Core PROPERTIES INTERFACE_COMPILE_FEATURES cxx_std_17)

target_link_libraries(cabanacore INTERFACE Kokkos::kokkos)
target_link_libraries(Core INTERFACE Kokkos::kokkos)

if(Cabana_ENABLE_ARBORX)
target_link_libraries(cabanacore INTERFACE ArborX::ArborX)
target_link_libraries(Core INTERFACE ArborX::ArborX)
endif()

if(Cabana_ENABLE_SILO)
target_link_libraries(cabanacore INTERFACE SILO::silo)
target_link_libraries(Core INTERFACE SILO::silo)
endif()

if(Cabana_ENABLE_HDF5)
# FIXME: replace with HDF5::HDF5 when requiring newer CMake
target_link_libraries(cabanacore INTERFACE ${HDF5_LIBRARIES})
target_link_libraries(Core INTERFACE ${HDF5_LIBRARIES})
endif()

if(Cabana_ENABLE_MPI)
target_link_libraries(cabanacore INTERFACE MPI::MPI_CXX)
target_link_libraries(Core INTERFACE MPI::MPI_CXX)
endif()

target_include_directories(cabanacore INTERFACE
target_include_directories(Core INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
${HDF5_INCLUDE_DIRS} # FIXME: remove when requiring newer CMake
)

install(TARGETS cabanacore
install(TARGETS Core
EXPORT Cabana_Targets
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
Expand All @@ -112,4 +112,5 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/CabanaCore_config.hpp DESTINATION ${CM

include(CMakePackageConfigHelpers)

add_library(Cabana::cabanacore ALIAS cabanacore)
add_library(Cabana::Core ALIAS Core)
add_library(Cabana::cabanacore ALIAS Core)
6 changes: 3 additions & 3 deletions core/unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ if(Cabana_ENABLE_HDF5)
list(APPEND MPI_TESTS HDF5ParticleOutput)
endif()

Cabana_add_tests_nobackend(PACKAGE cabanacore NAMES ${NOBACKEND_TESTS})
Cabana_add_tests_nobackend(PACKAGE Core NAMES ${NOBACKEND_TESTS})

Cabana_add_tests(PACKAGE cabanacore NAMES ${SERIAL_TESTS})
Cabana_add_tests(PACKAGE Core NAMES ${SERIAL_TESTS})

if(Cabana_ENABLE_MPI)
Cabana_add_tests(MPI PACKAGE cabanacore NAMES ${MPI_TESTS})
Cabana_add_tests(MPI PACKAGE Core NAMES ${MPI_TESTS})
endif()
4 changes: 2 additions & 2 deletions example/core_tutorial/01_hello_world/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
# a standalone CMakeLists.txt for testing of the Target export
cmake_minimum_required(VERSION 3.16)
project(Cabana_HelloWorld)
if(NOT TARGET Cabana::cabanacore)
if(NOT TARGET Cabana::Core)
find_package(Cabana)
endif()

add_executable(HelloWorld hello_world.cpp)
target_link_libraries(HelloWorld Cabana::cabanacore)
target_link_libraries(HelloWorld Cabana::Core)
add_test(NAME Core_tutorial_01 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:HelloWorld>)
2 changes: 1 addition & 1 deletion example/core_tutorial/02_tuple/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(Tuple tuple_example.cpp)
target_link_libraries(Tuple cabanacore)
target_link_libraries(Tuple Core)
add_test(NAME Core_tutorial_02 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:Tuple>)
2 changes: 1 addition & 1 deletion example/core_tutorial/03_struct_of_arrays/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(StructOfArrays soa_example.cpp)
target_link_libraries(StructOfArrays cabanacore)
target_link_libraries(StructOfArrays Core)
add_test(NAME Core_tutorial_03 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:StructOfArrays>)
2 changes: 1 addition & 1 deletion example/core_tutorial/04_aosoa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(ArrayOfStructsOfArrays aosoa_example.cpp)
target_link_libraries(ArrayOfStructsOfArrays cabanacore)
target_link_libraries(ArrayOfStructsOfArrays Core)
add_test(NAME Core_tutorial_04 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:ArrayOfStructsOfArrays>)
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(AdvancedUnmanagedAoSoA advanced_aosoa_unmanaged.cpp)
target_link_libraries(AdvancedUnmanagedAoSoA cabanacore)
target_link_libraries(AdvancedUnmanagedAoSoA Core)
add_test(NAME Core_tutorial_04_unmanaged COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:AdvancedUnmanagedAoSoA>)
2 changes: 1 addition & 1 deletion example/core_tutorial/05_slice/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(Slice slice_example.cpp)
target_link_libraries(Slice cabanacore)
target_link_libraries(Slice Core)
add_test(NAME Core_tutorial_05 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:Slice>)
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(AdvancedCudaSlice advanced_slice_cuda.cpp)
target_link_libraries(AdvancedCudaSlice cabanacore)
target_link_libraries(AdvancedCudaSlice Core)
add_test(NAME Core_tutorial_05_cuda COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:AdvancedCudaSlice>)
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(AdvancedOpenMPSlice advanced_slice_openmp.cpp)
target_link_libraries(AdvancedOpenMPSlice cabanacore)
target_link_libraries(AdvancedOpenMPSlice Core)
add_test(NAME Core_tutorial_05_openmp COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:AdvancedOpenMPSlice>)
2 changes: 1 addition & 1 deletion example/core_tutorial/06_deep_copy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(DeepCopy deep_copy_example.cpp)
target_link_libraries(DeepCopy cabanacore)
target_link_libraries(DeepCopy Core)
add_test(NAME Core_tutorial_06 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:DeepCopy>)
2 changes: 1 addition & 1 deletion example/core_tutorial/07_sorting/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(Sorting sorting_example.cpp)
target_link_libraries(Sorting cabanacore)
target_link_libraries(Sorting Core)
add_test(NAME Core_tutorial_07 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:Sorting>)
2 changes: 1 addition & 1 deletion example/core_tutorial/08_linked_cell_list/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(LinkedCellList linked_cell_list_example.cpp)
target_link_libraries(LinkedCellList cabanacore)
target_link_libraries(LinkedCellList Core)
add_test(NAME Core_tutorial_08 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:LinkedCellList>)
2 changes: 1 addition & 1 deletion example/core_tutorial/09_neighbor_list/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(VerletList verlet_list_example.cpp)
target_link_libraries(VerletList cabanacore)
target_link_libraries(VerletList Core)
add_test(NAME Core_tutorial_09 COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:VerletList>)
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(ArborXList arborx_neighborlist_example.cpp)
target_link_libraries(ArborXList cabanacore)
target_link_libraries(ArborXList Core)
add_test(NAME Core_tutorial_09_arborx COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:ArborXList>)
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(NeighParallelFor neighbor_parallel_for_example.cpp)
target_link_libraries(NeighParallelFor cabanacore)
target_link_libraries(NeighParallelFor Core)
add_test(NAME Core_tutorial_10_neighbor COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:NeighParallelFor>)
2 changes: 1 addition & 1 deletion example/core_tutorial/10_simd_parallel_for/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
############################################################################

add_executable(SimdParallelFor simd_parallel_for_example.cpp)
target_link_libraries(SimdParallelFor cabanacore)
target_link_libraries(SimdParallelFor Core)
add_test(NAME Core_tutorial_10_simd COMMAND ${NONMPI_PRECOMMAND} $<TARGET_FILE:SimdParallelFor>)
2 changes: 1 addition & 1 deletion example/core_tutorial/11_migration/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
############################################################################

add_executable(Migration migration_example.cpp)
target_link_libraries(Migration cabanacore)
target_link_libraries(Migration Core)
add_test(NAME Core_tutorial_11 COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG}
${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:Migration> ${MPIEXEC_POSTFLAGS})
set_tests_properties(Core_tutorial_11 PROPERTIES PROCESSORS ${MPIEXEC_MAX_NUMPROCS})
2 changes: 1 addition & 1 deletion example/core_tutorial/12_halo_exchange/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
############################################################################

add_executable(HaloExchange halo_exchange_example.cpp)
target_link_libraries(HaloExchange cabanacore)
target_link_libraries(HaloExchange Core)
add_test(NAME Core_tutorial_12 COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG}
${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:HaloExchange> ${MPIEXEC_POSTFLAGS})
set_tests_properties(Core_tutorial_12 PROPERTIES PROCESSORS ${MPIEXEC_MAX_NUMPROCS})
2 changes: 1 addition & 1 deletion example/core_tutorial/13_hdf5_output/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
############################################################################

add_executable(HDF5Output hdf5_output_example.cpp)
target_link_libraries(HDF5Output cabanacore)
target_link_libraries(HDF5Output Core)
add_test(NAME Core_tutorial_13 COMMAND ${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG}
${MPIEXEC_MAX_NUMPROCS} ${MPIEXEC_PREFLAGS} $<TARGET_FILE:HDF5Output> ${MPIEXEC_POSTFLAGS})
set_tests_properties(Core_tutorial_13 PROPERTIES PROCESSORS ${MPIEXEC_MAX_NUMPROCS})
2 changes: 1 addition & 1 deletion grid/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ add_library(Cajita ALIAS Grid)
add_library(Cabana::Cajita ALIAS Grid)

target_link_libraries(Grid INTERFACE
Cabana::cabanacore
Cabana::Core
Kokkos::kokkos
MPI::MPI_CXX
)
Expand Down

0 comments on commit f5e1684

Please sign in to comment.