Tests/PrecompileHeaders: fix generator-specific pch path expectations

This commit is contained in:
Ben Boeckel committed 2025-09-02 12:56:23 -04:00
1 parent 7ec26a5f42
commit dd87d25845
2 files changed
+15 -3

No files matched your search

@@ -2,7 +2,13 @@ if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG)
return()
endif()
set(foo_pch_header "${RunCMake_TEST_BINARY_DIR}/.o/4bcad702/Debug/cmake_pch.h")
set(subdir ".o")
if (RunCMake_GENERATOR MATCHES "Visual Studio")
set(subdir "CMakeFiles")
elseif (RunCMake_GENERATOR MATCHES "(Borland Makefiles|Watcom WMake)")
set(subdir "_o")
endif ()
set(foo_pch_header "${RunCMake_TEST_BINARY_DIR}/${subdir}/4bcad702/Debug/cmake_pch.h")
if (NOT EXISTS ${foo_pch_header})
set(RunCMake_TEST_FAILED "Generated foo pch header ${foo_pch_header} does not exist")
@@ -1,6 +1,12 @@
set(foobar_pch_header "${RunCMake_TEST_BINARY_DIR}/.o/ff32d702/cmake_pch.h")
set(subdir ".o")
if (RunCMake_GENERATOR MATCHES "Visual Studio")
set(subdir "CMakeFiles")
elseif (RunCMake_GENERATOR MATCHES "(Borland Makefiles|Watcom WMake)")
set(subdir "_o")
endif ()
set(foobar_pch_header "${RunCMake_TEST_BINARY_DIR}/${subdir}/ff32d702/cmake_pch.h")
if (RunCMake_GENERATOR_IS_MULTI_CONFIG)
set(foobar_pch_header "${RunCMake_TEST_BINARY_DIR}/.o/ff32d702/Debug/cmake_pch.h")
set(foobar_pch_header "${RunCMake_TEST_BINARY_DIR}/${subdir}/ff32d702/Debug/cmake_pch.h")
endif()
if (NOT EXISTS ${foobar_pch_header})