Skip to content

Commit 2e8e974

Browse files
committed
Setting global flags to override gtest
1 parent 030b0b9 commit 2e8e974

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

test/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ string(TOUPPER "${CMAKE_BUILD_TYPE}" U_CMAKE_BUILD_TYPE)
3333

3434
include(set_compiler_flag.cmake)
3535

36-
if(CPP20)
36+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
37+
38+
#[[if(CPP20)
3739
# User requested C++20, but compiler might not oblige.
3840
set_compiler_flag(
3941
_cxx_std_flag CXX
@@ -55,6 +57,7 @@ endif()
5557
if(NOT _cxx_std_flag)
5658
message(FATAL_ERROR "xtensor-blas needs a C++17-compliant compiler.")
5759
endif()
60+
]]
5861

5962
if(CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "Intel" AND NOT WIN32))
6063
CHECK_CXX_COMPILER_FLAG(-march=native arch_native_supported)

0 commit comments

Comments
 (0)