diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 879889e..0496b70 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -19,7 +19,7 @@ jobs: - name: Check Format run: | - cmake --build build --target format + cmake --build build --target format-all git diff --exit-code HEAD test-project: diff --git a/CMakeLists.txt b/CMakeLists.txt index 431ba74..0c24d7f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,11 +32,6 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) include(CheckWarning) add_check_warning() - find_package(FixFormat REQUIRED) - include(FixFormat) - target_fix_format(sequence) - target_fix_format(generate_sequence) - find_package(Catch2 REQUIRED) get_target_property(sequence_SOURCES sequence SOURCES) @@ -48,13 +43,13 @@ if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) include(CheckCoverage) target_check_coverage(sequence_test) - target_fix_format(sequence_test) include(Catch) catch_discover_tests(sequence_test) - add_custom_target(format) - add_dependencies(format sequence_format generate_sequence_format sequence_test_format) + find_package(FixFormat REQUIRED) + include(FixFormat) + add_fix_format() endif() install( diff --git a/cmake/FindFixFormat.cmake b/cmake/FindFixFormat.cmake index 3b8eb5b..372f866 100644 --- a/cmake/FindFixFormat.cmake +++ b/cmake/FindFixFormat.cmake @@ -8,6 +8,6 @@ if(FixFormat_FOUND) endif() include(CPM) -cpmaddpackage(gh:threeal/FixFormat.cmake@1.0.0) +cpmaddpackage(gh:threeal/FixFormat.cmake@1.1.0) list(APPEND CMAKE_MODULE_PATH ${FixFormat_SOURCE_DIR}/cmake)