Skip to content

Commit 936c74f

Browse files
committed
[dev] default c++20, cmake==3.29.0; gtest==v1.16.0
1 parent e6be85a commit 936c74f

File tree

12 files changed

+28
-25
lines changed

12 files changed

+28
-25
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# - Copyright 2017 Johan Mabille (rpath fix)
1111
#
1212

13-
cmake_minimum_required(VERSION 3.1.3) # 3.1.3 for set(CMAKE_CXX_STANDARD 14)
13+
cmake_minimum_required(VERSION 3.29) # 3.1.3 for set(CMAKE_CXX_STANDARD 14)
1414

1515
project(xtensor-fftw)
1616

@@ -86,7 +86,7 @@ endif()
8686
#--------------------------------------- build parameters for all targets
8787
# c++ standard build options
8888
# N.B.: these have to be set before defining targets!
89-
set(CMAKE_CXX_STANDARD 14)
89+
set(CMAKE_CXX_STANDARD 20)
9090
set(CMAKE_CXX_STANDARD_REQUIRED YES)
9191
set(CMAKE_CXX_EXTENSIONS NO)
9292

bench/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
############################################################################
1717

18-
cmake_minimum_required(VERSION 3.1.3) # 3.1.3 for set(CMAKE_CXX_STANDARD 14)
18+
cmake_minimum_required(VERSION 3.29) # 3.1.3 for set(CMAKE_CXX_STANDARD 14)
1919

2020
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
2121
project(xtensor-fftw-bench)
@@ -32,7 +32,7 @@ include(CheckCXXCompilerFlag)
3232

3333
#string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
3434

35-
set(CMAKE_CXX_STANDARD 14)
35+
set(CMAKE_CXX_STANDARD 20)
3636

3737
#if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Intel")
3838
# add_compile_options(-march=native) #-Wunused-parameter -Wextra -Wreorder -Wconversion)

bench/copyGBench.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
############################################################################
1313

14-
cmake_minimum_required(VERSION 2.8.2)
14+
cmake_minimum_required(VERSION 3.29)
1515

1616
project(googlebench-download NONE)
1717

bench/downloadGBench.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
#
1212
############################################################################
1313

14-
cmake_minimum_required(VERSION 2.8.2)
14+
cmake_minimum_required(VERSION 3.29)
1515

1616
project(googlebench-download NONE)
1717

include/xtensor-fftw/common.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,9 @@
1414
#ifndef XTENSOR_FFTW_COMMON_HPP
1515
#define XTENSOR_FFTW_COMMON_HPP
1616

17-
#include <xtensor/xarray.hpp>
18-
#include "xtensor/xcomplex.hpp"
19-
#include "xtensor/xeval.hpp"
20-
#include <xtl/xcomplex.hpp>
17+
#include <xtensor/containers/xarray.hpp>
18+
#include <xtensor/core/xeval.hpp>
19+
#include <xtensor/misc/xcomplex.hpp>
2120
#include <complex>
2221
#include <tuple>
2322
#include <type_traits>

include/xtensor-fftw/helper.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#define _USE_MATH_DEFINES // for MSVC ("Math Constants are not defined in Standard C/C++")
1313
#include <cmath> // M_PI
1414

15-
#include <xtensor/xarray.hpp>
15+
#include <xtensor/containers/xarray.hpp>
1616

1717
namespace xt {
1818
namespace fftw {

test/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
#
1616
############################################################################
1717

18-
cmake_minimum_required(VERSION 3.1.3) # 3.1.3 for set(CMAKE_CXX_STANDARD 14)
18+
cmake_minimum_required(VERSION 3.29) # 3.1.3 for set(CMAKE_CXX_STANDARD 14)
1919

2020
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
2121
project(xtensor-fftw-test)
@@ -31,7 +31,7 @@ include(CheckCXXCompilerFlag)
3131

3232
string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
3333

34-
set(CMAKE_CXX_STANDARD 14)
34+
set(CMAKE_CXX_STANDARD 20)
3535

3636
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT WIN32))
3737
if (DISABLE_EXCEPTIONS)

test/basic_interface.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
#include <array>
1616

1717
#include <stdexcept> // workaround for xt bug, where only including xarray does not include stdexcept; TODO: remove this include when bug is fixed!
18-
#include <xtensor/xarray.hpp>
19-
#include <xtensor/xio.hpp>
20-
#include <xtensor/xrandom.hpp>
21-
#include <xtensor/xcomplex.hpp>
18+
#include <xtensor/containers/xarray.hpp>
19+
#include <xtensor/io/xio.hpp>
20+
#include <xtensor/generators/xrandom.hpp>
21+
#include <xtensor/misc/xcomplex.hpp>
2222

2323
#include "gtest/gtest.h"
2424

test/copyGTest.cmake.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# The full license is in the file LICENSE, distributed with this software. #
77
############################################################################
88

9-
cmake_minimum_required(VERSION 2.8.2)
9+
cmake_minimum_required(VERSION 3.29)
1010

1111
project(googletest-download NONE)
1212

test/downloadGTest.cmake.in

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,16 @@
66
# The full license is in the file LICENSE, distributed with this software. #
77
############################################################################
88

9-
cmake_minimum_required(VERSION 2.8.2)
9+
cmake_minimum_required(VERSION 3.29)
1010

1111
project(googletest-download NONE)
12+
set(CMAKE_CXX_STANDARD 20)
13+
set(CMAKE_CXX_STANDARD_REQUIRED ON)
1214

1315
include(ExternalProject)
1416
ExternalProject_Add(googletest
1517
GIT_REPOSITORY https://github.com/google/googletest.git
16-
GIT_TAG release-1.8.0
18+
GIT_TAG v1.16.0
1719
SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-src"
1820
BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}/googletest-build"
1921
CONFIGURE_COMMAND ""
@@ -22,3 +24,5 @@ ExternalProject_Add(googletest
2224
TEST_COMMAND ""
2325
)
2426

27+
# For Windows: Prevent overriding the parent project's compiler/linker settings
28+
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)

0 commit comments

Comments
 (0)