Skip to content

Commit

Permalink
conditioned coverage flags
Browse files Browse the repository at this point in the history
  • Loading branch information
klaxalk committed Dec 9, 2023
1 parent bf3d131 commit c16d734
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")

if(COVERAGE)
message(WARNING "building with --coverage, the performance might be limited")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")
endif()

set(CATKIN_DEPENDENCIES
cmake_modules
geometry_msgs
Expand Down Expand Up @@ -67,17 +73,6 @@ target_link_libraries(MrsUavHwApi_DummyApi
${catkin_LIBRARIES}
)

## --------------------------------------------------------------
## | Testing |
## --------------------------------------------------------------

if(CATKIN_ENABLE_TESTING)

set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} --coverage")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --coverage")

endif()

## --------------------------------------------------------------
## | Install |
## --------------------------------------------------------------
Expand Down

0 comments on commit c16d734

Please sign in to comment.