Tests: Fix PchInstantiateTemplates case on macOS with CMAKE_OSX_ARCHITECTURES

Update the test added by commit 8c8f03422e (PCH: Template instantiation
support, 2020-08-28) to recognize flags on PCH files whose names include
the architecture.  This occurs when `CMAKE_OSX_ARCHITECTURES` is set.
This commit is contained in:
Brad King
2020-09-11 08:06:20 -04:00
parent 60b10d4fad
commit 0512e94eb0

View File

@@ -1,7 +1,7 @@
file(STRINGS ${RunCMake_TEST_BINARY_DIR}/compile_commands.json empty_dir_commands
REGEX "command.*-fpch-instantiate-templates.*empty.dir/cmake_pch.h")
REGEX "command.*-fpch-instantiate-templates.*empty.dir/cmake_pch[A-Za-z0-9_.]*.h")
file(STRINGS ${RunCMake_TEST_BINARY_DIR}/compile_commands.json foo_dir_commands
REGEX "command.*-fpch-instantiate-templates.*foo.dir/cmake_pch.h")
REGEX "command.*-fpch-instantiate-templates.*foo.dir/cmake_pch[A-Za-z0-9_.]*.h")
list(LENGTH empty_dir_commands empty_dir_commands_size)
list(LENGTH foo_dir_commands foo_dir_commands_size)