From 85afee3399341064d07f2b71a5ebbc610500ec45 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 15 Feb 2022 11:17:03 -0500 Subject: [PATCH 1/4] Explicitly request CMake use `gnu++17` over `c++17` --- cpp/CMakeLists.txt | 1 + cpp/benchmarks/CMakeLists.txt | 5 +++++ cpp/tests/CMakeLists.txt | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 407e1f9a858..1f94a26e65b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -498,6 +498,7 @@ set_target_properties( # set target compile options CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS ON CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON POSITION_INDEPENDENT_CODE ON diff --git a/cpp/benchmarks/CMakeLists.txt b/cpp/benchmarks/CMakeLists.txt index 0704180bad0..2321eb32de0 100644 --- a/cpp/benchmarks/CMakeLists.txt +++ b/cpp/benchmarks/CMakeLists.txt @@ -59,6 +59,11 @@ function(ConfigureBench CMAKE_BENCH_NAME) ${CMAKE_BENCH_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" INSTALL_RPATH "\$ORIGIN/../../../lib" + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS ON + CUDA_STANDARD 17 + CUDA_STANDARD_REQUIRED ON ) target_link_libraries( ${CMAKE_BENCH_NAME} PRIVATE cudf_benchmark_common cudf_datagen benchmark::benchmark_main diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 27dd472b3f5..96d6da5634d 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -23,7 +23,13 @@ function(ConfigureTest CMAKE_TEST_NAME) ${CMAKE_TEST_NAME} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "$" INSTALL_RPATH "\$ORIGIN/../../../lib" + CXX_STANDARD 17 + CXX_STANDARD_REQUIRED ON + CXX_EXTENSIONS ON + CUDA_STANDARD 17 + CUDA_STANDARD_REQUIRED ON ) + target_link_libraries(${CMAKE_TEST_NAME} PRIVATE cudftestutil GTest::gmock_main GTest::gtest_main) add_test(NAME ${CMAKE_TEST_NAME} COMMAND ${CMAKE_TEST_NAME}) install( From 8bed9554a2ffd8d3d26456c6d724956e36f96702 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 15 Feb 2022 11:38:30 -0500 Subject: [PATCH 2/4] Add comments on why we want gnu17 --- cpp/CMakeLists.txt | 2 +- cpp/benchmarks/CMakeLists.txt | 2 +- cpp/tests/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 1f94a26e65b..902102468f0 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -498,7 +498,7 @@ set_target_properties( # set target compile options CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON + CXX_EXTENSIONS ON # Needed for std:: support of int128_t CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON POSITION_INDEPENDENT_CODE ON diff --git a/cpp/benchmarks/CMakeLists.txt b/cpp/benchmarks/CMakeLists.txt index 2321eb32de0..bfd6eab0593 100644 --- a/cpp/benchmarks/CMakeLists.txt +++ b/cpp/benchmarks/CMakeLists.txt @@ -61,7 +61,7 @@ function(ConfigureBench CMAKE_BENCH_NAME) INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON + CXX_EXTENSIONS ON # Needed for std:: support of int128_t CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON ) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 96d6da5634d..54e5e63f31f 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -25,7 +25,7 @@ function(ConfigureTest CMAKE_TEST_NAME) INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON + CXX_EXTENSIONS ON # Needed for std:: support of int128_t CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON ) From cf1f69f1661076b842eb37f1791ae98cf62e90cc Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 15 Feb 2022 17:02:01 -0500 Subject: [PATCH 3/4] Improve comment --- cpp/CMakeLists.txt | 3 ++- cpp/benchmarks/CMakeLists.txt | 3 ++- cpp/tests/CMakeLists.txt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 902102468f0..2d91c9a2f83 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -498,7 +498,8 @@ set_target_properties( # set target compile options CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON # Needed for std:: support of int128_t + # For std:: support of __int128_t. Can be removed once using cuda::std + CXX_EXTENSIONS ON CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON POSITION_INDEPENDENT_CODE ON diff --git a/cpp/benchmarks/CMakeLists.txt b/cpp/benchmarks/CMakeLists.txt index bfd6eab0593..e0a95696aa9 100644 --- a/cpp/benchmarks/CMakeLists.txt +++ b/cpp/benchmarks/CMakeLists.txt @@ -61,7 +61,8 @@ function(ConfigureBench CMAKE_BENCH_NAME) INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON # Needed for std:: support of int128_t + # For std:: support of __int128_t. Can be removed once using cuda::std + CXX_EXTENSIONS ON CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON ) diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index 54e5e63f31f..e7188707e38 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -25,7 +25,8 @@ function(ConfigureTest CMAKE_TEST_NAME) INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - CXX_EXTENSIONS ON # Needed for std:: support of int128_t + # For std:: support of __int128_t. Can be removed once using cuda::std + CXX_EXTENSIONS ON CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON ) From 5a72c87ccd7076e4753d7f4d25eb53cb931fee00 Mon Sep 17 00:00:00 2001 From: Robert Maynard Date: Tue, 15 Feb 2022 19:24:42 -0500 Subject: [PATCH 4/4] Fix style issues found by ci --- cpp/CMakeLists.txt | 4 ++-- cpp/benchmarks/CMakeLists.txt | 2 +- cpp/tests/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index 2d91c9a2f83..2ffd62f1b53 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -498,8 +498,8 @@ set_target_properties( # set target compile options CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - # For std:: support of __int128_t. Can be removed once using cuda::std - CXX_EXTENSIONS ON + # For std:: support of __int128_t. Can be removed once using cuda::std + CXX_EXTENSIONS ON CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON POSITION_INDEPENDENT_CODE ON diff --git a/cpp/benchmarks/CMakeLists.txt b/cpp/benchmarks/CMakeLists.txt index e0a95696aa9..4c1a2622c97 100644 --- a/cpp/benchmarks/CMakeLists.txt +++ b/cpp/benchmarks/CMakeLists.txt @@ -61,7 +61,7 @@ function(ConfigureBench CMAKE_BENCH_NAME) INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - # For std:: support of __int128_t. Can be removed once using cuda::std + # For std:: support of __int128_t. Can be removed once using cuda::std CXX_EXTENSIONS ON CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON diff --git a/cpp/tests/CMakeLists.txt b/cpp/tests/CMakeLists.txt index e7188707e38..d9b4ed01605 100644 --- a/cpp/tests/CMakeLists.txt +++ b/cpp/tests/CMakeLists.txt @@ -25,7 +25,7 @@ function(ConfigureTest CMAKE_TEST_NAME) INSTALL_RPATH "\$ORIGIN/../../../lib" CXX_STANDARD 17 CXX_STANDARD_REQUIRED ON - # For std:: support of __int128_t. Can be removed once using cuda::std + # For std:: support of __int128_t. Can be removed once using cuda::std CXX_EXTENSIONS ON CUDA_STANDARD 17 CUDA_STANDARD_REQUIRED ON