Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
KiT-RT
KiT-RT
Commits
4565f789
Commit
4565f789
authored
Mar 03, 2021
by
jannick.wolters
Browse files
patched code coverage issue with unity build
Former-commit-id:
79cb2b7f
parent
22fe2422
Changes
1
Hide whitespace changes
Inline
Side-by-side
code/CMakeLists.txt
View file @
4565f789
...
@@ -16,7 +16,8 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
...
@@ -16,7 +16,8 @@ set( CMAKE_CXX_STANDARD_REQUIRED ON )
set
(
KITRT_RELEASE_OPTIONS -march=native -w
)
set
(
KITRT_RELEASE_OPTIONS -march=native -w
)
set
(
KITRT_RELWITHDEBINFO_OPTIONS -march=native -pg -no-pie
)
set
(
KITRT_RELWITHDEBINFO_OPTIONS -march=native -pg -no-pie
)
set
(
KITRT_DEBUG_OPTIONS -Wall -Wextra -Wpedantic
)
set
(
KITRT_DEBUG_OPTIONS -Wall -Wextra -Wpedantic
)
if
(
BUILD_UNITY AND NOT CODE_COV
)
if
(
BUILD_UNITY AND NOT BUILD_CODE_COV
)
message
(
STATUS
"Unity build enabled"
)
set
(
CMAKE_UNITY_BUILD ON
)
set
(
CMAKE_UNITY_BUILD ON
)
set
(
CMAKE_UNITY_BUILD_BATCH_SIZE 0
)
set
(
CMAKE_UNITY_BUILD_BATCH_SIZE 0
)
endif
()
endif
()
...
@@ -117,6 +118,8 @@ if( BUILD_TESTING )
...
@@ -117,6 +118,8 @@ if( BUILD_TESTING )
else
()
else
()
message
(
FATAL_ERROR
"Code coverage is currently only supported for gcc!"
)
message
(
FATAL_ERROR
"Code coverage is currently only supported for gcc!"
)
endif
()
endif
()
else
()
target_link_libraries
(
unit_tests Catch
)
endif
()
endif
()
target_compile_options
(
unit_tests PUBLIC
"$<$<CONFIG:RELWITHDEBINFO>:
${
KITRT_RELWITHDEBINFO_OPTIONS
}
>"
)
target_compile_options
(
unit_tests PUBLIC
"$<$<CONFIG:RELWITHDEBINFO>:
${
KITRT_RELWITHDEBINFO_OPTIONS
}
>"
)
target_compile_options
(
unit_tests PUBLIC
"$<$<CONFIG:RELEASE>:
${
KITRT_RELEASE_OPTIONS
}
>"
)
target_compile_options
(
unit_tests PUBLIC
"$<$<CONFIG:RELEASE>:
${
KITRT_RELEASE_OPTIONS
}
>"
)
...
...
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