diff options
author | Brad King <brad.king@kitware.com> | 2023-03-09 19:26:20 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-03-09 19:35:05 (GMT) |
commit | 8c96d145c1f9b5431643403caad9264a5b9e1402 (patch) | |
tree | 904c0e831313c036c3519e4deafc10ac74b9fa7f /Tests | |
parent | b6ffbffaf26006a361c1330d0edce9a6314f58bb (diff) | |
download | CMake-8c96d145c1f9b5431643403caad9264a5b9e1402.zip CMake-8c96d145c1f9b5431643403caad9264a5b9e1402.tar.gz CMake-8c96d145c1f9b5431643403caad9264a5b9e1402.tar.bz2 |
Tests/RunCMake: Match 'Tried extensions' output more robustly
Diffstat (limited to 'Tests')
10 files changed, 29 insertions, 34 deletions
diff --git a/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt b/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt index 8b90311..67d00f7 100644 --- a/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt @@ -3,11 +3,9 @@ noexist - Tried extensions [^ -]* - [^ -]* -Call Stack \(most recent call first\): + Tried extensions ([^ +]+ +)+Call Stack \(most recent call first\): CMP0115-OLD\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt b/Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt index 7b100b6..e79ca97 100644 --- a/Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt @@ -17,11 +17,9 @@ CMake Error at CMP0115\.cmake:[0-9]+ \(add_executable\): noexist - Tried extensions [^ -]* - [^ -]* -Call Stack \(most recent call first\): + Tried extensions ([^ +]+ +)+Call Stack \(most recent call first\): CMP0115-WARN\.cmake:[0-9]+ \(include\) CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt index f51d05a..b47a137 100644 --- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt +++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt @@ -3,9 +3,9 @@ .*\/relative-output-NEW\.c - Tried extensions \.c \.C.* -Call Stack \(most recent call first\): + Tried extensions ([^ +]+ +)+Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) - - ++ CMake Generate step failed. Build files cannot be regenerated correctly.$ diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake index d2b3e0c..16d5563 100644 --- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake +++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake @@ -1,5 +1,5 @@ enable_language(C) -add_library(foo) +add_library(foo empty.c) cmake_policy(SET CMP0070 NEW) file(GENERATE OUTPUT relative-output-NEW.c CONTENT "") diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt index 07b0026..39735d7 100644 --- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt +++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt @@ -8,16 +8,15 @@ behavior and not rely on setting a policy to OLD. Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) - - ++ CMake Error at SourceProperty-CMP0070-OLD.cmake:[0-9]+ \(target_sources\): Cannot find source file: .*\/relative-output-OLD\.c - Tried extensions \.c \.C.* -Call Stack \(most recent call first\): + Tried extensions ([^ +]+ +)+Call Stack \(most recent call first\): CMakeLists.txt:[0-9]+ \(include\) - - ++ CMake Generate step failed. Build files cannot be regenerated correctly.$ diff --git a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake index 48eae1e..4f566b0 100644 --- a/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake +++ b/Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake @@ -1,5 +1,5 @@ enable_language(C) -add_library(foo) +add_library(foo empty.c) cmake_policy(SET CMP0070 OLD) file(GENERATE OUTPUT relative-output-OLD.c CONTENT "") diff --git a/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt index 38585eb..352bb68 100644 --- a/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt +++ b/Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt @@ -3,7 +3,7 @@ CMake Error at global-interface.cmake:2 \(add_library\): GLOBAL - Tried extensions \.c \.C .* -.* -Call Stack \(most recent call first\): + Tried extensions ([^ +]+ +)+Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt index 5c7882d..05eb42d 100644 --- a/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt +++ b/Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt @@ -3,7 +3,7 @@ CMake Error at MissingSource.cmake:1 \(add_library\): missing.c - Tried extensions \.c \.C .* -.* -Call Stack \(most recent call first\): + Tried extensions ([^ +]+ +)+Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_sources/FileSetDirect-stderr.txt b/Tests/RunCMake/target_sources/FileSetDirect-stderr.txt index c1f7635..06458b9 100644 --- a/Tests/RunCMake/target_sources/FileSetDirect-stderr.txt +++ b/Tests/RunCMake/target_sources/FileSetDirect-stderr.txt @@ -3,9 +3,9 @@ CMake Error at FileSetDirect.cmake:3 \(add_library\): FILE_SET - Tried extensions .c .C .c\+\+ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h - .hh .h\+\+ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc - + Tried extensions ([^ +]+ +)+ Hint: the FILE_SET keyword may only appear after a visibility specifier or another FILE_SET within the target_sources\(\) command. Call Stack \(most recent call first\): diff --git a/Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt b/Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt index abfbe29..01db002 100644 --- a/Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt +++ b/Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt @@ -3,9 +3,9 @@ CMake Error at FileSetWrongSyntax.cmake:4 \(target_sources\): FILE_SET - Tried extensions .c .C .c\+\+ .cc .cpp .cxx .cu .mpp .m .M .mm .ixx .cppm .h - .hh .h\+\+ .hm .hpp .hxx .in .txx .f .F .for .f77 .f90 .f95 .f03 .hip .ispc - + Tried extensions ([^ +]+ +)+ Hint: the FILE_SET keyword may only appear after a visibility specifier or another FILE_SET within the target_sources\(\) command. Call Stack \(most recent call first\): |