zynaddsubfx

ZynAddSubFX open source synthesizer
Log | Files | Refs | Submodules | LICENSE

commit caa21372430954b8caf99120b6c9663ad8c9e2d6
parent 1aa22f807513ec3af18e7f622b6ba301a0109cd5
Author: Johannes Lorenz <j.git@lorenz-ho.me>
Date:   Fri, 20 Dec 2024 22:35:49 +0100

Only test trainling whitespace in Git

Diffstat:
Msrc/Tests/CMakeLists.txt | 11++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/Tests/CMakeLists.txt b/src/Tests/CMakeLists.txt @@ -101,6 +101,15 @@ if(NOT (${CMAKE_SYSTEM_NAME} STREQUAL "Windows")) endif() if(CMAKE_SYSTEM_NAME STREQUAL "Linux") - add_test(TrailingWhitespace ${CMAKE_SOURCE_DIR}/src/Tests/trailing-whitespace) + execute_process( + COMMAND git rev-parse --is-inside-work-tree + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} + OUTPUT_VARIABLE IS_GIT_REPO + ERROR_QUIET + OUTPUT_STRIP_TRAILING_WHITESPACE + ) + if(IS_GIT_REPO STREQUAL "true") + add_test(TrailingWhitespace ${CMAKE_SOURCE_DIR}/src/Tests/trailing-whitespace) + endif() endif()