diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c4bef7..34d8dcc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,12 @@ option(GEOARROW_GEOS_CODE_COVERAGE "Enable coverage reporting" OFF) add_library(geoarrow_geos_coverage_config INTERFACE) +if(GEOARROW_GEOS_CODE_COVERAGE) + target_compile_options(geoarrow_geos_coverage_config INTERFACE -O0 -g + --coverage) + target_link_options(geoarrow_geos_coverage_config INTERFACE --coverage) +endif() + # Ensure geoarrow_c FetchContent_Declare( geoarrow_c @@ -85,9 +91,6 @@ if(GEOARROW_GEOS_BUILD_TESTS) add_executable(geoarrow_geos_test src/geoarrow_geos/geoarrow_geos_test.cc) if(GEOARROW_CODE_COVERAGE) - target_compile_options(geoarrow_geos_coverage_config INTERFACE -O0 -g - --coverage) - target_link_options(geoarrow_geos_coverage_config INTERFACE --coverage) target_link_libraries(geoarrow_geos geoarrow_geos_coverage_config) endif()