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 75151ec commit 5664e41
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ project(mrs_uav_autostart)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

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
roscpp
Expand Down Expand Up @@ -54,9 +60,6 @@ target_link_libraries(MrsUavAutostart_AutomaticStart

if(CATKIN_ENABLE_TESTING)

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

add_subdirectory(test)

endif()
Expand Down

0 comments on commit 5664e41

Please sign in to comment.