|
@@ -70,7 +70,8 @@ ExternalProject_Add(YAML-CPP
|
70
|
70
|
UPDATE_COMMAND ""
|
71
|
71
|
PATCH_COMMAND ""
|
72
|
72
|
PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/yaml-cpp
|
73
|
|
- CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS}
|
|
73
|
+ CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_INSTALL_PREFIX} -DBUILD_SHARED_LIBS=ON -DBUILD_SHARED_LIBS=${BUILD_SHARED_LIBS} /
|
|
74
|
+ -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
|
74
|
75
|
)
|
75
|
76
|
add_compile_options(-DHAVE_YAMLCPP)
|
76
|
77
|
|
|
@@ -165,11 +166,14 @@ endif()
|
165
|
166
|
include(CheckCXXCompilerFlag)
|
166
|
167
|
CHECK_CXX_COMPILER_FLAG(-std=c++14 COMPILER_SUPPORTS_CXX14)
|
167
|
168
|
CHECK_CXX_COMPILER_FLAG(-std=c++11 COMPILER_SUPPORTS_CXX11)
|
|
169
|
+CHECK_CXX_COMPILER_FLAG(-std=c++0x COMPILER_SUPPORTS_CXX0X)
|
168
|
170
|
|
169
|
171
|
if(COMPILER_SUPPORTS_CXX14)
|
170
|
172
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++14")
|
171
|
173
|
elseif(COMPILER_SUPPORTS_CXX11)
|
172
|
174
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
|
175
|
+elseif(COMPILER_SUPPORTS_CXX0X)
|
|
176
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
173
|
177
|
else()
|
174
|
178
|
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 or C++14 support. Please use a different C++ compiler.")
|
175
|
179
|
endif()
|