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
louiz’
biboumi
Commits
e0d1a0b4
Commit
e0d1a0b4
authored
Feb 05, 2018
by
louiz’
Browse files
Add a check for GCC’s and Clang’s minimal versions
parent
1ebd8a23
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
e0d1a0b4
...
...
@@ -6,6 +6,16 @@ set(${PROJECT_NAME}_VERSION_MAJOR 8)
set
(
${
PROJECT_NAME
}
_VERSION_MINOR 0
)
set
(
${
PROJECT_NAME
}
_VERSION_SUFFIX
"~dev"
)
if
(
CMAKE_CXX_COMPILER_ID STREQUAL
"GNU"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0
)
message
(
FATAL_ERROR
"GCC version must be at least 5.0."
)
endif
()
elseif
(
CMAKE_CXX_COMPILER_ID STREQUAL
"Clang"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_LESS 3.4
)
message
(
FATAL_ERROR
"Clang version must be at least 3.4."
)
endif
()
endif
()
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"Debug"
CACHE STRING
"Build type (Release/Debug/RelWithDebInfo/MinSizeRel)"
FORCE
)
...
...
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