Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
amdis
Commits
e2507373
Commit
e2507373
authored
Oct 16, 2016
by
Praetorius, Simon
Browse files
c++11 test corrected
parent
c815b4af
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/cmake/enable_cxx11.cmake
View file @
e2507373
...
...
@@ -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"
)
...
...
AMDiS/cmake3/test_compile_features.cmake
View file @
e2507373
...
...
@@ -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"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment