mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-25 18:50:40 +08:00
Remove EIGEN_TEST_C++0x option and let EIGEN_TEST_CXX11 adds the -std=c++11 flag
This commit is contained in:
parent
b192e29eae
commit
3594451ee0
@ -321,7 +321,7 @@ if(EIGEN_TEST_NO_EXCEPTIONS)
|
||||
message(STATUS "Disabling exceptions in tests/examples")
|
||||
endif()
|
||||
|
||||
option(EIGEN_TEST_C++0x "Enables all C++0x features." OFF)
|
||||
option(EIGEN_TEST_CXX11 "Enable testing with C++11 and C++11 features (e.g. Tensor module)." OFF)
|
||||
|
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
|
@ -49,9 +49,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
else(EIGEN_COVERAGE_TESTING)
|
||||
set(COVERAGE_FLAGS "")
|
||||
endif(EIGEN_COVERAGE_TESTING)
|
||||
if(EIGEN_TEST_C++0x)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")
|
||||
endif(EIGEN_TEST_C++0x)
|
||||
|
||||
if(CMAKE_SYSTEM_NAME MATCHES Linux)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${COVERAGE_FLAGS} -g2")
|
||||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${COVERAGE_FLAGS} -O2 -g2")
|
||||
@ -61,3 +59,10 @@ if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
elseif(MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D_CRT_SECURE_NO_WARNINGS /D_SCL_SECURE_NO_WARNINGS")
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
||||
|
||||
check_cxx_compiler_flag("-std=c++11" EIGEN_COMPILER_SUPPORT_CXX11)
|
||||
|
||||
if(EIGEN_TEST_CXX11 AND EIGEN_COMPILER_SUPPORT_CXX11)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
endif()
|
||||
|
@ -299,6 +299,12 @@ macro(ei_testing_print_summary)
|
||||
else()
|
||||
message(STATUS "ARMv8 NEON: Using architecture defaults")
|
||||
endif()
|
||||
|
||||
if(EIGEN_TEST_CXX11)
|
||||
message(STATUS "C++11: ON")
|
||||
else()
|
||||
message(STATUS "C++11: OFF")
|
||||
endif()
|
||||
|
||||
endif() # vectorization / alignment options
|
||||
|
||||
|
@ -95,7 +95,6 @@ ei_add_test(minres)
|
||||
ei_add_test(levenberg_marquardt)
|
||||
ei_add_test(kronecker_product)
|
||||
|
||||
option(EIGEN_TEST_CXX11 "Enable testing of C++11 features (e.g. Tensor module)." ON)
|
||||
if(EIGEN_TEST_CXX11)
|
||||
# It should be safe to always run these tests as there is some fallback code for
|
||||
# older compiler that don't support cxx11.
|
||||
|
Loading…
x
Reference in New Issue
Block a user