From 9617557bc3a07efd5f007ee69b51e8ad6f6d8e5e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Eric=20Janouch?= Date: Fri, 4 Sep 2026 15:32:12 +0200 Subject: [PATCH] CMake style adjustment --- CMakeLists.txt | 2 +- tests/fixture.cmake | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 960334b..08ccf6d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,7 +22,7 @@ target_link_libraries(${PROJECT_NAME} PRIVATE ${LIBRARIES_STATIC_LIBRARIES} ${TERMINFO_STATIC_LIBRARIES}) include(CTest) -if(BUILD_TESTING) +if (BUILD_TESTING) add_test( NAME fixture COMMAND ${CMAKE_COMMAND} diff --git a/tests/fixture.cmake b/tests/fixture.cmake index 5209cf9..82b3e68 100644 --- a/tests/fixture.cmake +++ b/tests/fixture.cmake @@ -1,6 +1,6 @@ file(REMOVE "${OUTPUT}") -if(DROP_SHORT) +if (DROP_SHORT) set(options --drop-short) set(expected "2 frames, 0.05 s") else() @@ -13,21 +13,21 @@ execute_process( OUTPUT_VARIABLE stdout ERROR_VARIABLE stderr ) -if(NOT result EQUAL 0) +if (NOT result EQUAL 0) message(FATAL_ERROR "player failed (${result}): ${stderr}") endif() -if(NOT stdout MATCHES "${expected}") +if (NOT stdout MATCHES "${expected}") message(FATAL_ERROR "unexpected player summary: ${stdout}") endif() file(SIZE "${OUTPUT}" size) -if(size LESS 12) +if (size LESS 12) message(FATAL_ERROR "fixture WebP is unexpectedly small (${size} bytes)") endif() file(READ "${OUTPUT}" signature LIMIT 12 HEX) string(SUBSTRING "${signature}" 0 8 riff) string(SUBSTRING "${signature}" 16 8 webp) -if(NOT riff STREQUAL "52494646" OR NOT webp STREQUAL "57454250") +if (NOT riff STREQUAL "52494646" OR NOT webp STREQUAL "57454250") message(FATAL_ERROR "fixture output is not a RIFF/WebP file") endif()