Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
5ba92d9f
Commit
5ba92d9f
authored
Dec 14, 2016
by
Davis King
Browse files
Made this test try to enable C++11 via the compiler flag.
parent
51bc1dd4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
dlib/cmake_utils/test_for_cpp11/CMakeLists.txt
dlib/cmake_utils/test_for_cpp11/CMakeLists.txt
+17
-5
No files found.
dlib/cmake_utils/test_for_cpp11/CMakeLists.txt
View file @
5ba92d9f
cmake_minimum_required
(
VERSION 2.8.4
)
cmake_minimum_required
(
VERSION 2.8.4
)
project
(
cpp11_test
)
project
(
cpp11_test
)
add_library
(
cpp11_test STATIC cpp11_test.cpp
)
# Try to enable C++11
include
(
CheckCXXCompilerFlag
)
CHECK_CXX_COMPILER_FLAG
(
"-std=c++11"
COMPILER_SUPPORTS_CXX11
)
CHECK_CXX_COMPILER_FLAG
(
"-std=c++0x"
COMPILER_SUPPORTS_CXX0X
)
if
(
COMPILER_SUPPORTS_CXX11
)
message
(
STATUS
"C++11 activated."
)
ADD_DEFINITIONS
(
"-std=c++11"
)
elseif
(
COMPILER_SUPPORTS_CXX0X
)
message
(
STATUS
"C++0x activated."
)
ADD_DEFINITIONS
(
"-std=c++0x"
)
endif
()
add_library
(
cpp11_test STATIC cpp11_test.cpp
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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