Commit e2507373 authored by Praetorius, Simon's avatar Praetorius, Simon
Browse files

c++11 test corrected

parent c815b4af
......@@ -5,7 +5,14 @@ include(CheckIncludeFileCXX)
if (ENABLE_CXX11)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11_FLAG)
set(CXX11_CODE "#include <tuple>\\n#include <array>\\ntemplate<class... T> using std::tuple<T...>;int main(){decltype(1) vec[]={1,2,3}; for(auto&& x:vec);}")
set(CXX11_CODE "
#include <array>
#include <tuple>
template <class... T> using A = std::tuple<T...>;
int main(){
decltype(1) vec[]={1,2,3};
for(auto&& x:vec);
}")
if (COMPILER_SUPPORTS_CXX11_FLAG)
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
......
......@@ -4,7 +4,14 @@ include(CheckCXXSourceCompiles)
macro(target_enable_cxx11 RESULT_VAR _TARGET_ _SCOPE_)
check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11_FLAG)
set(CXX11_CODE "#include <tuple>\\n#include <array>\\ntemplate<class... T> using std::tuple<T...>;int main(){decltype(1) vec[]={1,2,3}; for(auto&& x:vec);}")
set(CXX11_CODE "
#include <array>
#include <tuple>
template <class... T> using A = std::tuple<T...>;
int main(){
decltype(1) vec[]={1,2,3};
for(auto&& x:vec);
}")
if (COMPILER_SUPPORTS_CXX11_FLAG)
set(CMAKE_REQUIRED_FLAGS "-std=c++11")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment