mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-06-04 18:54:00 +08:00
Set CMAKE_* cache variables only when Eigen is a top-level project
This commit is contained in:
parent
1ce8b25825
commit
e577f43ab2
@ -26,9 +26,11 @@ if(CMAKE_VERSION VERSION_LESS 3.21.0)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(CMAKE_CXX_STANDARD 14 CACHE STRING "Default C++ standard")
|
if(PROJECT_IS_TOP_LEVEL)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Require C++ standard")
|
set(CMAKE_CXX_STANDARD 14 CACHE STRING "Default C++ standard")
|
||||||
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Allow C++ extensions")
|
set(CMAKE_CXX_STANDARD_REQUIRED ON CACHE BOOL "Require C++ standard")
|
||||||
|
set(CMAKE_CXX_EXTENSIONS OFF CACHE BOOL "Allow C++ extensions")
|
||||||
|
endif()
|
||||||
|
|
||||||
# guard against in-source builds
|
# guard against in-source builds
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user