Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b7744ae6
authored
Oct 14, 2014
by
Marcus Winter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake: added gcov support
parent
466fcc35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
CMakeCommon/SetCompilerFlags.cmake
+8
-2
CMakeLists.txt
+4
-4
No files found.
CMakeCommon/SetCompilerFlags.cmake
View file @
b7744ae6
...
...
@@ -31,9 +31,9 @@ function(SetGNUCompilerFlags compiler_libs)
# -Wextra -> Even more warnings
# -Werror -> Warnings are errors
set
(
warning_flags
"-Wall -Wextra"
)
if
(
WARNINGS_ARE_ERRORS STREQUAL ON
)
if
(
WARNINGS_ARE_ERRORS STREQUAL ON
)
set
(
warning_flags
"
${
warning_flags
}
-Werror"
)
endif
()
endif
()
if
(
CMAKE_COMPILER_IS_GNUCC
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-pthread -std=c99
${
warning_flags
}
"
PARENT_SCOPE
)
...
...
@@ -41,6 +41,9 @@ function(SetGNUCompilerFlags compiler_libs)
PARENT_SCOPE
)
set
(
CMAKE_C_FLAGS_RELEASE
"
${
CMAKE_C_FLAGS_RELEASE
}
-DNDEBUG"
PARENT_SCOPE
)
set
(
CMAKE_C_FLAGS_COVERAGE
"
${
CMAKE_C_FLAGS_COVERAGE
}
-O0 -fprofile-arcs -ftest-coverage"
PARENT_SCOPE
)
endif
()
if
(
CMAKE_COMPILER_IS_GNUCXX
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-pthread -std=c++03
${
warning_flags
}
"
...
...
@@ -49,6 +52,9 @@ function(SetGNUCompilerFlags compiler_libs)
PARENT_SCOPE
)
set
(
CMAKE_CXX_FLAGS_RELEASE
"
${
CMAKE_CXX_FLAGS_RELEASE
}
-DNDEBUG"
PARENT_SCOPE
)
set
(
CMAKE_CXX_FLAGS_COVERAGE
"
${
CMAKE_CXX_FLAGS_COVERAGE
}
-O0 -fprofile-arcs -ftest-coverage"
PARENT_SCOPE
)
endif
()
endif
()
endfunction
()
...
...
CMakeLists.txt
View file @
b7744ae6
...
...
@@ -33,7 +33,7 @@ set (EMBB_BASE_VERSION_PATCH 1)
if
(
NOT CMAKE_BUILD_TYPE
)
set
(
CMAKE_BUILD_TYPE
"Release"
CACHE STRING
"Choose the type of build, options are: Debug Release
RelWithDebInfo MinSizeRel."
FORCE
)
RelWithDebInfo MinSizeRel
Coverage
."
FORCE
)
endif
(
NOT CMAKE_BUILD_TYPE
)
# Check for clang, masquerade it as GNU
...
...
@@ -58,7 +58,7 @@ option(WARNINGS_ARE_ERRORS "Specify whether warnings should be treated as errors
## LOCAL INSTALLATION OF SUBPROJECT BINARIES
#
include
(
CMakeCommon/CopyInstallFiles.cmake
)
# Needed in all subprojects
set
(
local_install_dir
${
CMAKE_CURRENT_BINARY_DIR
}
/binaries
)
set
(
local_install_dir
${
CMAKE_CURRENT_BINARY_DIR
}
/binaries
)
if
(
WARNINGS_ARE_ERRORS STREQUAL ON
)
message
(
"-- Warnings are treated as errors"
)
...
...
@@ -93,7 +93,7 @@ endif()
message
(
" (set with command line option -DUSE_EXCEPTIONS=ON/OFF)"
)
## Copy test execution script to local binaries folder
#
#
if
(
DEFINED CYGWIN
)
set
(
test_script_in run_tests_cygwin.sh
)
set
(
test_script_out run_tests.sh
)
...
...
@@ -141,7 +141,7 @@ message(" (set with command line option -DBUILD_EXAMPLES=ON/OFF)")
include
(
CMakeCommon/SetInstallPaths.cmake
)
SetInstallPaths
()
## DOXYGEN
## DOXYGEN
#
if
(
EXISTS
"
${
EMBB_SOURCE_DIR
}
/doc/reference/Doxyfile.in"
)
include
(
CMakeCommon/CreateDoxygenDocumentationTarget.cmake
)
...
...
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