Skip to content

Commit

Permalink
kokkos#6805: move test out of subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
nmm0 committed May 15, 2024
1 parent 7459ea8 commit df61bc2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 21 deletions.
26 changes: 9 additions & 17 deletions core/unit_test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,8 @@ foreach(Tag Threads;Serial;OpenMP;Cuda;HPX;OpenMPTarget;OpenACC;HIP;SYCL)
endforeach()

SET(${Tag}_SOURCES2A)
foreach(Name
SET(${Tag}_TESTNAMES2A
MDSpanConversion
TeamBasic
TeamCombinedReducers
TeamMDRange
Expand Down Expand Up @@ -251,7 +252,13 @@ foreach(Tag Threads;Serial;OpenMP;Cuda;HPX;OpenMPTarget;OpenACC;HIP;SYCL)
ViewResize
WorkGraph
WithoutInitializing
)
)

IF (NOT Kokkos_ENABLE_IMPL_MDSPAN)
LIST(REMOVE_ITEM ${Tag}_TESTNAMES2A MDSpanConversion)
ENDIF()

foreach(Name IN LISTS ${Tag}_TESTNAMES2A)
set(file ${dir}/Test${Tag}_${Name}.cpp)
# Write to a temporary intermediate file and call configure_file to avoid
# updating timestamps triggering unnecessary rebuilds on subsequent cmake runs.
Expand All @@ -263,21 +270,6 @@ foreach(Tag Threads;Serial;OpenMP;Cuda;HPX;OpenMPTarget;OpenACC;HIP;SYCL)
list(APPEND ${Tag}_SOURCES2A ${file})
endforeach()

# View implementation tests
foreach(Name
MDSpanConversion
)
set(file ${dir}/view/Test${Tag}_${Name}.cpp)
# Write to a temporary intermediate file and call configure_file to avoid
# updating timestamps triggering unnecessary rebuilds on subsequent cmake runs.
file(WRITE ${dir}/dummy.cpp
"#include <Test${Tag}_Category.hpp>\n"
"#include <view/Test${Name}.hpp>\n"
)
configure_file(${dir}/dummy.cpp ${file})
list(APPEND ${Tag}_SOURCES2A ${file})
endforeach()

set(TagHostAccessible ${Tag})
if (Tag STREQUAL "Cuda")
set(TagHostAccessible CudaUVM)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@

#include <Kokkos_Core.hpp>

#ifdef KOKKOS_ENABLE_IMPL_MDSPAN

namespace {

template <class T, class ExecutionSpace>
Expand Down Expand Up @@ -404,5 +402,3 @@ TEST(TEST_CATEGORY, view_mdspan_conversion) {
}

} // namespace

#endif // KOKKOS_ENABLE_IMPL_MDSPAN

0 comments on commit df61bc2

Please sign in to comment.