Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
batmen
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
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sepia-pub
mael
batmen
Commits
5ea49cb3
Commit
5ea49cb3
authored
6 years ago
by
Millian Poquet
Browse files
Options
Downloads
Patches
Plain Diff
[cmake] do_coverage option
parent
273f7f91
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
CMakeLists.txt
+10
-0
10 additions, 0 deletions
CMakeLists.txt
with
10 additions
and
0 deletions
CMakeLists.txt
+
10
−
0
View file @
5ea49cb3
...
@@ -10,6 +10,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
...
@@ -10,6 +10,7 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
# Options
# Options
option
(
enable_warnings
"Enable compilation warnings"
ON
)
option
(
enable_warnings
"Enable compilation warnings"
ON
)
option
(
treat_warnings_as_errors
"Treat compilation warnings as compilation errors"
OFF
)
option
(
treat_warnings_as_errors
"Treat compilation warnings as compilation errors"
OFF
)
option
(
do_coverage
"Compile in coverage mode"
OFF
)
# Build type
# Build type
# Set a default build type if none was specified
# Set a default build type if none was specified
...
@@ -25,6 +26,15 @@ endif()
...
@@ -25,6 +26,15 @@ endif()
set
(
CMAKE_CXX_STANDARD 11
)
set
(
CMAKE_CXX_STANDARD 11
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
set
(
CMAKE_CXX_STANDARD_REQUIRED ON
)
# Coverage
if
(
do_coverage
)
set
(
coverage_cxxflags
"-g -O0 -fprofile-arcs -ftest-coverage"
)
set
(
coverage_ldflags
"-lgcov --coverage"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
coverage_cxxflags
}
"
)
set
(
CMAKE_EXE_LINKER_FLAGS
"
${
CMAKE_EXE_LINKER_FLAGS
}
${
coverage_ldflags
}
"
)
endif
()
# Dependencies
# Dependencies
## Boost
## Boost
find_package
(
Boost 1.48 REQUIRED COMPONENTS regex locale
)
find_package
(
Boost 1.48 REQUIRED COMPONENTS regex locale
)
...
...
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