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
cf421243
Commit
cf421243
authored
Jul 05, 2016
by
Davis King
Browse files
Made this cmake script always enable whatever partial C++11 support your compiler has.
parent
09974608
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
dlib/cmake_utils/use_cpp_11.cmake
dlib/cmake_utils/use_cpp_11.cmake
+14
-0
No files found.
dlib/cmake_utils/use_cpp_11.cmake
View file @
cf421243
...
@@ -72,3 +72,17 @@ else()
...
@@ -72,3 +72,17 @@ else()
endif
()
endif
()
endif
()
endif
()
# Always enable whatever partial C++11 support we have, even if it isn't full support.
if
(
NOT COMPILER_CAN_DO_CPP_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 (compiler doesn't have full C++11 support)."
)
add_global_compiler_switch
(
"-std=c++11"
)
elseif
(
COMPILER_SUPPORTS_CXX0X
)
message
(
STATUS
"C++0x activated (compiler doesn't have full C++11 support)."
)
add_global_compiler_switch
(
"-std=c++0x"
)
endif
()
endif
()
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