Disable the check for C++11 for now
This commit is contained in:
parent
a3e84aa155
commit
9c9534d562
1 changed files with 29 additions and 27 deletions
|
|
@ -150,34 +150,36 @@ endif()
|
||||||
|
|
||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
|
|
||||||
cmake_push_check_state()
|
#cmake_push_check_state()
|
||||||
|
#
|
||||||
set(CMAKE_REQUIRED_FLAGS -std=c++11)
|
#set(CMAKE_REQUIRED_FLAGS -std=c++11)
|
||||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH})
|
#set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH})
|
||||||
|
#
|
||||||
check_cxx_source_runs("
|
#check_cxx_source_runs("
|
||||||
#include <regex>
|
##include <regex>
|
||||||
#include <vector>
|
##include <vector>
|
||||||
#include <iostream>
|
##include <iostream>
|
||||||
|
#
|
||||||
int main() {
|
#int main() {
|
||||||
std::vector<int> x {0, 1, 2, 3, 4};
|
# std::vector<int> x {0, 1, 2, 3, 4};
|
||||||
for (auto i : x)
|
# for (auto i : x)
|
||||||
std::cout << i << std::endl;
|
# std::cout << i << std::endl;
|
||||||
|
#
|
||||||
std::regex r(\"foo\");
|
# std::regex r(\"foo\");
|
||||||
std::cout << std::regex_match(\"foobar\", r) << std::endl;
|
# std::cout << std::regex_match(\"foobar\", r) << std::endl;
|
||||||
return 0;
|
# return 0;
|
||||||
}" CXX11_RUNS)
|
#}" CXX11_RUNS)
|
||||||
|
#
|
||||||
cmake_pop_check_state()
|
#cmake_pop_check_state()
|
||||||
|
#
|
||||||
if(CXX11_RUNS)
|
#if(CXX11_RUNS)
|
||||||
set(HAVE_CXX11 1)
|
# set(HAVE_CXX11 1)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||||
else()
|
#else()
|
||||||
set(HAVE_CXX11 0)
|
set(HAVE_CXX11 0)
|
||||||
endif()
|
#endif()
|
||||||
|
#
|
||||||
|
#cmake_pop_check_state()
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue