diff options
author | Robert Maynard <rmaynard@nvidia.com> | 2021-06-21 17:16:29 (GMT) |
---|---|---|
committer | Robert Maynard <rmaynard@nvidia.com> | 2021-06-25 17:39:50 (GMT) |
commit | a3cafa4237930d1ec1bcbdddc8a9c592e32458ca (patch) | |
tree | 33b38924f7edb95ccb18e054be5d757cce179ff5 /Tests/Cuda | |
parent | 66488d4eb31d372d8e06ce78e5f49a7cc43974ee (diff) | |
download | CMake-a3cafa4237930d1ec1bcbdddc8a9c592e32458ca.zip CMake-a3cafa4237930d1ec1bcbdddc8a9c592e32458ca.tar.gz CMake-a3cafa4237930d1ec1bcbdddc8a9c592e32458ca.tar.bz2 |
compile_features: Ignore features that map to languages that aren't enabled
Remove the Cuda/ConsumeCompileFeatures test as it only existed to
validate that using `cxx_std_XY` would cause the paired language (CUDA) to also build in mode XY.
Diffstat (limited to 'Tests/Cuda')
-rw-r--r-- | Tests/Cuda/CMakeLists.txt | 1 | ||||
-rw-r--r-- | Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt | 16 | ||||
-rw-r--r-- | Tests/Cuda/ConsumeCompileFeatures/main.cu | 20 | ||||
-rw-r--r-- | Tests/Cuda/ConsumeCompileFeatures/static.cpp | 10 | ||||
-rw-r--r-- | Tests/Cuda/ConsumeCompileFeatures/static.cu | 9 |
5 files changed, 0 insertions, 56 deletions
diff --git a/Tests/Cuda/CMakeLists.txt b/Tests/Cuda/CMakeLists.txt index be5ccac..669c412 100644 --- a/Tests/Cuda/CMakeLists.txt +++ b/Tests/Cuda/CMakeLists.txt @@ -4,7 +4,6 @@ macro (add_cuda_test_macro name) PROPERTY LABELS "CUDA") endmacro () -add_cuda_test_macro(Cuda.ConsumeCompileFeatures CudaConsumeCompileFeatures) add_cuda_test_macro(Cuda.CXXStandardSetTwice CXXStandardSetTwice) add_cuda_test_macro(Cuda.ObjectLibrary CudaObjectLibrary) add_cuda_test_macro(Cuda.MixedStandardLevels1 MixedStandardLevels1) diff --git a/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt b/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt deleted file mode 100644 index b01b9d7..0000000 --- a/Tests/Cuda/ConsumeCompileFeatures/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -cmake_minimum_required(VERSION 3.18) -project(ConsumeCompileFeatures CXX CUDA) -#Goal for this example: - -#build a c++11 library that express a c++11 public compile feature -#link a cuda library and verify it builds with c++11 enabled - -#build a standalone c++/cuda mixed executable where we express a c++11 -#compile feature. - - -add_library(CudaConsumeLib STATIC static.cpp static.cu) -target_compile_features(CudaConsumeLib PUBLIC cxx_nullptr) - -add_executable(CudaConsumeCompileFeatures main.cu) -target_link_libraries(CudaConsumeCompileFeatures PRIVATE CudaConsumeLib) diff --git a/Tests/Cuda/ConsumeCompileFeatures/main.cu b/Tests/Cuda/ConsumeCompileFeatures/main.cu deleted file mode 100644 index bc32450..0000000 --- a/Tests/Cuda/ConsumeCompileFeatures/main.cu +++ /dev/null @@ -1,20 +0,0 @@ - -#include <iostream> - -int static_cxx11_func(int); - -void test_functions() -{ - auto x = static_cxx11_func(int(42)); - std::cout << x << std::endl; -} - -int main(int argc, char** argv) -{ - test_functions(); - std::cout - << "this executable doesn't use cuda code, just call methods defined" - << std::endl; - std::cout << "in libraries that have cuda code" << std::endl; - return 0; -} diff --git a/Tests/Cuda/ConsumeCompileFeatures/static.cpp b/Tests/Cuda/ConsumeCompileFeatures/static.cpp deleted file mode 100644 index 565d52e..0000000 --- a/Tests/Cuda/ConsumeCompileFeatures/static.cpp +++ /dev/null @@ -1,10 +0,0 @@ - - -#include <type_traits> - -int static_cuda11_func(int); - -int static_cxx11_func(int x) -{ - return static_cuda11_func(x) + std::integral_constant<int, 32>::value; -} diff --git a/Tests/Cuda/ConsumeCompileFeatures/static.cu b/Tests/Cuda/ConsumeCompileFeatures/static.cu deleted file mode 100644 index 73e43a8..0000000 --- a/Tests/Cuda/ConsumeCompileFeatures/static.cu +++ /dev/null @@ -1,9 +0,0 @@ - -#include <type_traits> - -using tt = std::true_type; -using ft = std::false_type; -int __host__ static_cuda11_func(int x) -{ - return x * x + std::integral_constant<int, 17>::value; -} |