Skip to content

Commit

Permalink
Fix generated Makefile when using gnu_generate_makefile.sh and make >…
Browse files Browse the repository at this point in the history
…= 4.3
  • Loading branch information
pkestene authored and crtrott committed Nov 17, 2023
1 parent 9c37437 commit 1a14531
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
14 changes: 7 additions & 7 deletions algorithms/unit_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ TARGETS =

tmp := $(foreach device, $(KOKKOS_DEVICELIST), \
$(if $(filter Test$(device).cpp, $(shell ls Test$(device).cpp 2>/dev/null)),,\
$(shell echo "\#include <Test"${device}"_Category.hpp>" > Test$(device).cpp); \
$(shell echo "\#include <TestRandom.hpp>" >> Test$(device).cpp); \
$(shell echo "\#include <TestSort.hpp>" >> Test$(device).cpp); \
$(shell echo "\#include <TestBinSortA.hpp>" >> Test$(device).cpp); \
$(shell echo "\#include <TestBinSortB.hpp>" >> Test$(device).cpp); \
$(shell echo "\#include <TestNestedSort.hpp>" >> Test$(device).cpp); \
$(shell echo "\#include <TestSortCustomComp.hpp>" >> Test$(device).cpp); \
$(shell echo "$(H)include <Test"${device}"_Category.hpp>" > Test$(device).cpp); \
$(shell echo "$(H)include <TestRandom.hpp>" >> Test$(device).cpp); \
$(shell echo "$(H)include <TestSort.hpp>" >> Test$(device).cpp); \
$(shell echo "$(H)include <TestBinSortA.hpp>" >> Test$(device).cpp); \
$(shell echo "$(H)include <TestBinSortB.hpp>" >> Test$(device).cpp); \
$(shell echo "$(H)include <TestNestedSort.hpp>" >> Test$(device).cpp); \
$(shell echo "$(H)include <TestSortCustomComp.hpp>" >> Test$(device).cpp); \
) \
)

Expand Down
4 changes: 2 additions & 2 deletions containers/unit_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ TESTS = Bitset DualView DynamicView DynViewAPI_generic DynViewAPI_rank12345 DynV
tmp := $(foreach device, $(KOKKOS_DEVICELIST), \
tmp2 := $(foreach test, $(TESTS), \
$(if $(filter Test$(device)_$(test).cpp, $(shell ls Test$(device)_$(test).cpp 2>/dev/null)),,\
$(shell echo "\#include<Test"$(device)"_Category.hpp>" > Test$(device)_$(test).cpp); \
$(shell echo "\#include<Test"$(test)".hpp>" >> Test$(device)_$(test).cpp); \
$(shell echo "$(H)include<Test"$(device)"_Category.hpp>" > Test$(device)_$(test).cpp); \
$(shell echo "$(H)include<Test"$(test)".hpp>" >> Test$(device)_$(test).cpp); \
)\
) \
)
Expand Down
20 changes: 10 additions & 10 deletions core/unit_test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ TESTS = AtomicOperations_int AtomicOperations_unsignedint AtomicOperations_longi
tmp := $(foreach device, $(KOKKOS_DEVICELIST), \
tmp2 := $(foreach test, $(TESTS), \
$(if $(filter Test$(device)_$(test).cpp, $(shell ls Test$(device)_$(test).cpp 2>/dev/null)),,\
$(shell echo "\#include <Test"$(device)"_Category.hpp>" > Test$(device)_$(test).cpp); \
$(shell echo "\#include <Test"$(test)".hpp>" >> Test$(device)_$(test).cpp); \
$(shell echo "$(H)include <Test"$(device)"_Category.hpp>" > Test$(device)_$(test).cpp); \
$(shell echo "$(H)include <Test"$(test)".hpp>" >> Test$(device)_$(test).cpp); \
) \
) \
)
Expand All @@ -82,26 +82,26 @@ KOKKOS_SUBVIEW_DEVICELIST := $(filter-out Cuda, $(KOKKOS_DEVICELIST))
tmp := $(foreach device, $(KOKKOS_SUBVIEW_DEVICELIST), \
tmp2 := $(foreach test, $(SUBVIEW_TESTS), \
$(if $(filter Test$(device)_$(test).cpp, $(shell ls Test$(device)_$(test).cpp 2>/dev/null)),, \
$(shell echo "\#include <Test"$(device)"_Category.hpp>" > Test$(device)_$(test).cpp); \
$(shell echo "\#include <Test"$(test)".hpp>" >> Test$(device)_$(test).cpp); \
$(shell echo "$(H)include <Test"$(device)"_Category.hpp>" > Test$(device)_$(test).cpp); \
$(shell echo "$(H)include <Test"$(test)".hpp>" >> Test$(device)_$(test).cpp); \
) \
)\
)

ifeq ($(KOKKOS_INTERNAL_USE_CUDA), 1)
tmp2 := $(foreach test, $(SUBVIEW_TESTS), \
$(if $(filter TestCuda_$(test).cpp, $(shell ls TestCuda_$(test).cpp 2>/dev/null)),,\
$(shell echo "\#include <TestCudaUVM_Category.hpp>" > TestCuda_$(test).cpp); \
$(shell echo "\#include <Test"$(test)".hpp>" >> TestCuda_$(test).cpp); \
$(shell echo "$(H)include <TestCudaUVM_Category.hpp>" > TestCuda_$(test).cpp); \
$(shell echo "$(H)include <Test"$(test)".hpp>" >> TestCuda_$(test).cpp); \
)\
)

GPU_SPACES = CudaHostPinned CudaUVM
tmp := $(foreach space, $(GPU_SPACES), \
tmp2 := $(foreach test, $(GPU_SPACE_TESTS), \
$(if $(filter Test$(space)_$(test).cpp, $(shell ls Test$(space)_$(test).cpp 2>/dev/null)),,\
$(shell echo "\#include <Test$(space)_Category.hpp>" > Test$(space)_$(test).cpp); \
$(shell echo "\#include <Test"$(test)".hpp>" >> Test$(space)_$(test).cpp); \
$(shell echo "$(H)include <Test$(space)_Category.hpp>" > Test$(space)_$(test).cpp); \
$(shell echo "$(H)include <Test"$(test)".hpp>" >> Test$(space)_$(test).cpp); \
)\
)\
)
Expand Down Expand Up @@ -277,8 +277,8 @@ ifeq ($(KOKKOS_INTERNAL_USE_HIP), 1)
tmp := $(foreach space, $(GPU_SPACES), \
tmp2 := $(foreach test, $(GPU_SPACE_TESTS), \
$(if $(filter Test$(space)_$(test).cpp, $(shell ls Test$(space)_$(test).cpp 2>/dev/null)),,\
$(shell echo "\#include <Test$(space)_Category.hpp>" > Test$(space)_$(test).cpp); \
$(shell echo "\#include <Test"$(test)".hpp>" >> Test$(space)_$(test).cpp); \
$(shell echo "$(H)include <Test$(space)_Category.hpp>" > Test$(space)_$(test).cpp); \
$(shell echo "$(H)include <Test"$(test)".hpp>" >> Test$(space)_$(test).cpp); \
)\
)\
)
Expand Down

0 comments on commit 1a14531

Please sign in to comment.