From b0e15c7d9a0cc5ca31809b01254bca5f3a72f047 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 23 Jul 2026 15:17:35 +0200 Subject: make buildable on Linux --- aesxx/utils/CMakeLists.txt | 12 ++++++++---- aesxx/utils/test/basic.cmake | 11 ++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'aesxx/utils') diff --git a/aesxx/utils/CMakeLists.txt b/aesxx/utils/CMakeLists.txt index 44c4acc..8b904a6 100644 --- a/aesxx/utils/CMakeLists.txt +++ b/aesxx/utils/CMakeLists.txt @@ -35,13 +35,17 @@ set(file_util_headers add_util(encrypt_file encrypt_file.cpp ${file_util_headers}) add_util(decrypt_file decrypt_file.cpp ${file_util_headers}) -set(bmp_util_headers ${file_util_headers} helpers/bmp.hpp) +if(WIN32) + set(bmp_util_headers ${file_util_headers} helpers/bmp.hpp) -add_util(encrypt_bmp encrypt_bmp.cpp ${bmp_util_headers}) -add_util(decrypt_bmp decrypt_bmp.cpp ${bmp_util_headers}) + add_util(encrypt_bmp encrypt_bmp.cpp ${bmp_util_headers}) + add_util(decrypt_bmp decrypt_bmp.cpp ${bmp_util_headers}) +endif() find_package(Python3 REQUIRED COMPONENTS Interpreter) include(test/basic.cmake) include(test/block.cmake) -include(test/bmp.cmake) +if(WIN32) + include(test/bmp.cmake) +endif() diff --git a/aesxx/utils/test/basic.cmake b/aesxx/utils/test/basic.cmake index b8df5a3..cba1180 100644 --- a/aesxx/utils/test/basic.cmake +++ b/aesxx/utils/test/basic.cmake @@ -1,11 +1,16 @@ +list(APPEND utils block file) +if(WIN32) + list(APPEND utils bmp) +endif() + foreach(action encrypt decrypt) - foreach(util block file bmp) + foreach(util ${utils}) set(exe "${action}_${util}") set(tgt "util_${exe}") add_test(NAME "${tgt}_help" COMMAND Python3::Interpreter "${CMAKE_SOURCE_DIR}/cmake/tools/ctest-driver.py" run - --pass-regex "usage: ${exe}\\.exe" "set algorithm" + --pass-regex "usage: ${exe}" "set algorithm" --fail-regex "usage error:" -- "$" -h @@ -16,7 +21,7 @@ foreach(action encrypt decrypt) --exit-code 1 --pass-regex "usage error: the option '--algorithm' is required" - "usage: ${exe}\\.exe" + "usage: ${exe}" "set algorithm" -- "$" -- cgit v1.3