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_push_check_state()
|
||||
|
||||
set(CMAKE_REQUIRED_FLAGS -std=c++11)
|
||||
set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH})
|
||||
|
||||
check_cxx_source_runs("
|
||||
#include <regex>
|
||||
#include <vector>
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
std::vector<int> x {0, 1, 2, 3, 4};
|
||||
for (auto i : x)
|
||||
std::cout << i << std::endl;
|
||||
|
||||
std::regex r(\"foo\");
|
||||
std::cout << std::regex_match(\"foobar\", r) << std::endl;
|
||||
return 0;
|
||||
}" CXX11_RUNS)
|
||||
|
||||
cmake_pop_check_state()
|
||||
|
||||
if(CXX11_RUNS)
|
||||
set(HAVE_CXX11 1)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
else()
|
||||
#cmake_push_check_state()
|
||||
#
|
||||
#set(CMAKE_REQUIRED_FLAGS -std=c++11)
|
||||
#set(CMAKE_REQUIRED_INCLUDES ${CMAKE_INCLUDE_PATH})
|
||||
#
|
||||
#check_cxx_source_runs("
|
||||
##include <regex>
|
||||
##include <vector>
|
||||
##include <iostream>
|
||||
#
|
||||
#int main() {
|
||||
# std::vector<int> x {0, 1, 2, 3, 4};
|
||||
# for (auto i : x)
|
||||
# std::cout << i << std::endl;
|
||||
#
|
||||
# std::regex r(\"foo\");
|
||||
# std::cout << std::regex_match(\"foobar\", r) << std::endl;
|
||||
# return 0;
|
||||
#}" CXX11_RUNS)
|
||||
#
|
||||
#cmake_pop_check_state()
|
||||
#
|
||||
#if(CXX11_RUNS)
|
||||
# set(HAVE_CXX11 1)
|
||||
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
|
||||
#else()
|
||||
set(HAVE_CXX11 0)
|
||||
endif()
|
||||
#endif()
|
||||
#
|
||||
#cmake_pop_check_state()
|
||||
|
||||
########################################################################
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue