Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
a35b6250
Commit
a35b6250
authored
Jun 14, 2014
by
Fabio Bas
Browse files
Handle correctly user-defined CMAKE_BUILD_TYPE
parent
a4fbf8b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
a35b6250
...
...
@@ -13,6 +13,14 @@ set(PROJECT_VERSION_MINOR 0)
set
(
PROJECT_VERSION_PATCH 1
)
set
(
PROJECT_VERSION
${
PROJECT_VERSION_MAJOR
}
.
${
PROJECT_VERSION_MINOR
}
.
${
PROJECT_VERSION_PATCH
}
)
# Defualt to "Release" build type
# User-provided value for CMAKE_BUILD_TYPE must be checked before the PROJECT() call
IF
(
DEFINED CMAKE_BUILD_TYPE
)
SET
(
CMAKE_BUILD_TYPE
${
CMAKE_BUILD_TYPE
}
CACHE STRING
"Type of build"
)
ELSE
()
SET
(
CMAKE_BUILD_TYPE Release CACHE STRING
"Type of build"
)
ENDIF
()
# A project name is needed for CPack
PROJECT
(
"
${
PROJECT_NAME
}
"
)
...
...
@@ -41,9 +49,6 @@ elseif(WIN32)
set
(
CMAKE_INSTALL_PREFIX
${
CMAKE_BINARY_DIR
}
/release
)
endif
()
# Force "Release" build type by default
set
(
CMAKE_BUILD_TYPE Release
)
# Define proper compilation flags
IF
(
CMAKE_COMPILER_IS_GNUCC
)
# linux/gcc, bsd/gcc, windows/mingw
...
...
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