cmake tests added SKIP_REUSE_PCH

tst_versions uses different compile options.
This commit is contained in:
silverqx
2024-12-23 20:25:35 +01:00
parent e705527f07
commit 0d1f2abaf2
2 changed files with 5 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ function(tiny_configure_test target)
# Arguments # Arguments
set(options set(options
DEPENDS_ON_UNITTESTS INCLUDE_MIGRATIONS INCLUDE_MODELS PROVIDES_PCH RUN_SERIAL DEPENDS_ON_UNITTESTS INCLUDE_MIGRATIONS INCLUDE_MODELS PROVIDES_PCH RUN_SERIAL
SKIP_REUSE_PCH
) )
cmake_parse_arguments(PARSE_ARGV 1 TINY "${options}" "" "") 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 # 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 # 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 # variable, it also affects CI pipelines on GitHub self-hosted runners
if(TINY_QT_VERSION VERSION_LESS "6.9.0" AND if(TINY_SKIP_REUSE_PCH OR (TINY_QT_VERSION VERSION_LESS "6.9.0" AND
NOT (DEFINED ENV{TINY_QT6_TEST_TARGET_PATCHED} 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! "$ENV{TINY_QT6_TEST_TARGET_PATCHED}")) # Quotes needed to avoid fail if undefined as conditions don't short-circuit!
) )
target_precompile_headers(${target} PRIVATE target_precompile_headers(${target} PRIVATE
$<$<COMPILE_LANGUAGE:CXX>:"${${TinyOrm_ns}_SOURCE_DIR}/include/pch.h"> $<$<COMPILE_LANGUAGE:CXX>:"${${TinyOrm_ns}_SOURCE_DIR}/include/pch.h">

View File

@@ -7,7 +7,7 @@ target_sources(versions PRIVATE
add_test(NAME versions COMMAND versions) add_test(NAME versions COMMAND versions)
tiny_configure_test(versions) tiny_configure_test(versions SKIP_REUSE_PCH)
# For checkFileVersion_*() tests # For checkFileVersion_*() tests
# --- # ---