Commit 15e0a3a8 authored by Simon Spannagel's avatar Simon Spannagel
Browse files

cmake: improve logic

parent c7ff7b42
Loading
Loading
Loading
Loading
+8 −7
Original line number Diff line number Diff line
@@ -5,18 +5,19 @@

# Check if the git hooks are installed and upt-to-date:
IF(IS_DIRECTORY ${CMAKE_SOURCE_DIR}/.git)
    IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit")
    IF(EXISTS "${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit-clang-format")
        MESSAGE(WARNING "Git hooks are outdated - this project has moved to the pre-commit framework. Install via "
                    "pre-commit install -f")
                "pre-commit install -f"
                " and delete the file .git/hooks/pre-commit-clang-format")
    ELSE()
        IF(NOT EXISTS "${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit")
            MESSAGE(WARNING "Git hooks are not installed - install via "
                    "pre-commit install")
        ENDIF()
        ELSE()
            MESSAGE(STATUS "Found pre-commit hooks installed.")
        ENDIF()
    ENDIF()
ENDIF()

# Get all project files - FIXME: this should also use the list of generated targets
IF(NOT CHECK_CXX_SOURCE_FILES)