diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a5fd0c..cd10dd8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,24 +5,14 @@ project("fixmydownloads" VERSION 0.0.1) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin) set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH}) -# Code Coverage Configuration -add_library(coverage_config INTERFACE) +# Set C compiler options +if (NOT CODE_COVERAGE) + set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") + set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3") +endif(NOT CODE_COVERAGE) -option(CODE_COVERAGE "Enable coverage reporting" OFF) -if(CODE_COVERAGE) - # Add required flags (GCC & LLVM/Clang) - target_compile_options(coverage_config INTERFACE - -O0 # no optimization - -g # generate debug info - --coverage # sets all required flags - ) - target_link_libraries(coverage_config INTERFACE --coverage) -endif(CODE_COVERAGE) - -add_subdirectory(src) - -enable_testing() -add_subdirectory(tests) +add_executable(fixmydl main.c) +target_compile_options(fixmydl PUBLIC -Wall -Werror -Wno-unused-function -pedantic) install(TARGETS fixmydl RUNTIME DESTINATION bin diff --git a/codecov.yml b/codecov.yml deleted file mode 100644 index 145ceca..0000000 --- a/codecov.yml +++ /dev/null @@ -1,4 +0,0 @@ -coverage: - precision: 2 - round: nearest - range: "90...100" diff --git a/coverage.info b/coverage.info deleted file mode 100644 index e69de29..0000000 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt deleted file mode 100644 index 4b18690..0000000 --- a/src/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -# Set C compiler options -if (NOT CODE_COVERAGE) - set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g") - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3") -endif(NOT CODE_COVERAGE) - -add_executable(fixmydl main.c) -target_compile_options(fixmydl PUBLIC -Wall -Werror -Wno-unused-function -pedantic) - -target_link_libraries(fixmydl PUBLIC coverage_config)