Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
pugs
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
code
pugs
Commits
9a92e25e
Commit
9a92e25e
authored
3 years ago
by
Stéphane Del Pino
Browse files
Options
Downloads
Patches
Plain Diff
Remove RelWithDebInfo and MinSizeRel build types
parent
099e62b0
No related branches found
No related tags found
1 merge request
!129
Require at least CMake 3.16 and clang-10
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+7
-16
7 additions, 16 deletions
CMakeLists.txt
with
7 additions
and
16 deletions
CMakeLists.txt
+
7
−
16
View file @
9a92e25e
...
...
@@ -22,6 +22,9 @@ if("${PUGS_SHORT_VERSION}" STREQUAL "")
message
(
FATAL_ERROR
"Unable to compute short version from PUGS_VERSION=
${
PUGS_VERSION
}
"
)
endif
()
set
(
CMAKE_CONFIGURATION_TYPES
"Release;Debug;Coverage"
CACHE STRING INTERNAL FORCE
)
# set project version as PUGS_SHORT_VERSION
project
(
Pugs VERSION
${
PUGS_SHORT_VERSION
}
)
...
...
@@ -34,16 +37,6 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set
(
PUGS_SOURCE_DIR
"
${
CMAKE_CURRENT_SOURCE_DIR
}
"
)
set
(
PUGS_BINARY_DIR
"
${
CMAKE_CURRENT_BINARY_DIR
}
"
)
# Change RelWithDebInfo to compile assertions
SET
(
"CMAKE_CXX_FLAGS_RELWITHDEBINFO"
"-g -O2"
CACHE STRING
"Flags used by the compiler during release builds with debug info and assertions"
FORCE
)
SET
(
"CMAKE_C_FLAGS_RELWITHDEBINFO"
"-g -O2"
CACHE STRING
"Flags used by the compiler during release builds with debug info and assertions"
FORCE
)
# Add new build types
set
(
CMAKE_CXX_FLAGS_COVERAGE
"-g -O0 --coverage"
...
...
@@ -68,16 +61,16 @@ mark_as_advanced(
CMAKE_SHARED_LINKER_FLAGS_COVERAGE
)
if
(
CMAKE_BUILD_TYPE
)
string
(
REGEX MATCH
"(
Debug|
Release|
RelWithDebInfo|MinSizeRel
|Coverage)"
VALID_BUILD_TYPE
"
${
CMAKE_BUILD_TYPE
}
"
)
string
(
REGEX MATCH
"
^
(Release|
Debug
|Coverage)
$
"
VALID_BUILD_TYPE
"
${
CMAKE_BUILD_TYPE
}
"
)
if
(
NOT VALID_BUILD_TYPE
)
message
(
FATAL_ERROR
"Invalid CMAKE_BUILD_TYPE: '
${
CMAKE_BUILD_TYPE
}
'"
)
endif
()
endif
()
# Default build type is Rel
WIthDebInfo
# Default build type is Rel
ease
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"Rel
WithDebInfo
"
CACHE STRING
"Choose the type of build:
Debug
Release
RelWithDebInfo MinSizeRel
Coverage."
set
(
CMAKE_BUILD_TYPE
"Rel
ease
"
CACHE STRING
"Choose the type of build: Release
Debug
Coverage."
FORCE
)
endif
()
...
...
@@ -327,12 +320,10 @@ endif()
# Compiler flags
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
PUGS_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
${
PUGS_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"
${
CMAKE_CXX_FLAGS_RELWITHDEBINFO
}
${
PUGS_CXX_FLAGS
}
"
)
# Add debug mode for Standard C++ library (not for AppleClang since it is broken)
if
(
NOT
"
${
CMAKE_CXX_COMPILER_ID
}
"
STREQUAL
"AppleClang"
)
set
(
CMAKE_CXX_FLAGS_DEBUG
"
${
CMAKE_CXX_FLAGS_DEBUG
}
-D_GLIBCXX_DEBUG -D_LIBCPP_DEBUG=1"
)
set
(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
"
${
CMAKE_CXX_FLAGS_RELWITHDEBINFO
}
-D_GLIBCXX_DEBUG -D_LIBCPP_DEBUG=1"
)
endif
()
#------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment