Tests/RunCMake/LinkLibrariesStrategy: Check ordering results more strongly

This commit is contained in:
Brad King
2024-10-02 09:49:35 -04:00
parent 823e0a3a61
commit 9b5c805bf6
11 changed files with 62 additions and 2 deletions

View File

@@ -0,0 +1 @@
^Library 'A' was linked first\.$

View File

@@ -0,0 +1,10 @@
target \[main\] link dependency ordering:
target \[A\]
target \[B\]
target \[C\]
target \[A\]
target \[main\] link line:
target \[B\]
target \[C\]
target \[A\]$

View File

@@ -0,0 +1,10 @@
target \[main\] link dependency ordering:
target \[A\]
target \[B\]
target \[C\]
target \[A\]
target \[main\] link line:
target \[A\]
target \[B\]
target \[C\]$

View File

@@ -5,3 +5,7 @@ target \[main\] link dependency ordering:
target \[A\]
target \[main\] link line:
target \[A\]
target \[B\]
target \[C\]
target \[A\]$

View File

@@ -0,0 +1 @@
^Library 'B' was linked first\.$

View File

@@ -0,0 +1 @@
^Library 'B' was linked first\.$

View File

@@ -0,0 +1,9 @@
target \[main\] link dependency ordering:
target \[B\]
target \[C\]
target \[A\]
target \[main\] link line:
target \[B\]
target \[C\]
target \[A\]$

View File

@@ -0,0 +1,9 @@
target \[main\] link dependency ordering:
target \[B\]
target \[C\]
target \[A\]
target \[main\] link line:
target \[B\]
target \[C\]
target \[A\]$

View File

@@ -4,3 +4,6 @@ target \[main\] link dependency ordering:
target \[A\]
target \[main\] link line:
target \[B\]
target \[C\]
target \[A\]$

View File

@@ -17,12 +17,24 @@ run_cmake(Unknown)
function(run_strategy case exe)
set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build)
if("DEDUPLICATION=ALL" IN_LIST CMAKE_C_LINK_LIBRARIES_PROCESSING)
if("ORDER=REVERSE" IN_LIST CMAKE_C_LINK_LIBRARIES_PROCESSING)
set(RunCMake-stderr-file ${case}-stderr-dedup-reverse.txt)
else()
set(RunCMake-stderr-file ${case}-stderr-dedup.txt)
endif()
endif()
run_cmake(${case})
unset(RunCMake-stderr-file)
set(RunCMake_TEST_NO_CLEAN 1)
run_cmake_command(${case}-build ${CMAKE_COMMAND} --build . --config Debug)
if(exe)
if("ORDER=REVERSE" IN_LIST CMAKE_C_LINK_LIBRARIES_PROCESSING)
set(RunCMake-stdout-file ${case}-run-stdout-reverse.txt)
if("DEDUPLICATION=ALL" IN_LIST CMAKE_C_LINK_LIBRARIES_PROCESSING)
if("ORDER=REVERSE" IN_LIST CMAKE_C_LINK_LIBRARIES_PROCESSING)
set(RunCMake-stdout-file ${case}-run-stdout-dedup-reverse.txt)
else()
set(RunCMake-stdout-file ${case}-run-stdout-dedup.txt)
endif()
endif()
run_cmake_command(${case}-run ${RunCMake_TEST_BINARY_DIR}/${exe})
unset(RunCMake-stdout-file)