diff --git a/cmake/Modules/TinyTestCommon.cmake b/cmake/Modules/TinyTestCommon.cmake index 68c4f6db2..4c5310ab6 100644 --- a/cmake/Modules/TinyTestCommon.cmake +++ b/cmake/Modules/TinyTestCommon.cmake @@ -26,6 +26,7 @@ function(tiny_configure_test target) # Arguments set(options DEPENDS_ON_UNITTESTS INCLUDE_MIGRATIONS INCLUDE_MODELS PROVIDES_PCH RUN_SERIAL + SKIP_REUSE_PCH ) cmake_parse_arguments(PARSE_ARGV 1 TINY "${options}" "" "") @@ -151,9 +152,9 @@ function(tiny_configure_test_pch target provides_pch) # Also, I have patched the Qt6TestTargets.cmake so the REUSE_FROM work for me because # of this I need to skip this if() using the TINY_QT6_TEST_TARGET_PATCHED environment # variable, it also affects CI pipelines on GitHub self-hosted runners - if(TINY_QT_VERSION VERSION_LESS "6.9.0" AND - NOT (DEFINED ENV{TINY_QT6_TEST_TARGET_PATCHED} AND - "$ENV{TINY_QT6_TEST_TARGET_PATCHED}") # Quotes needed to avoid fail if undefined as conditions don't short-circuit! + if(TINY_SKIP_REUSE_PCH OR (TINY_QT_VERSION VERSION_LESS "6.9.0" AND + NOT (DEFINED ENV{TINY_QT6_TEST_TARGET_PATCHED} AND + "$ENV{TINY_QT6_TEST_TARGET_PATCHED}")) # Quotes needed to avoid fail if undefined as conditions don't short-circuit! ) target_precompile_headers(${target} PRIVATE $<$:"${${TinyOrm_ns}_SOURCE_DIR}/include/pch.h"> diff --git a/tests/auto/functional/others/versions/CMakeLists.txt b/tests/auto/functional/others/versions/CMakeLists.txt index e82865973..cbcd83532 100644 --- a/tests/auto/functional/others/versions/CMakeLists.txt +++ b/tests/auto/functional/others/versions/CMakeLists.txt @@ -7,7 +7,7 @@ target_sources(versions PRIVATE add_test(NAME versions COMMAND versions) -tiny_configure_test(versions) +tiny_configure_test(versions SKIP_REUSE_PCH) # For checkFileVersion_*() tests # ---