summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLib/testRST.expect15
-rw-r--r--Tests/CMakeLib/testRST.rst15
-rw-r--r--Tests/RunCMake/CMP0115/CMP0115-OLD-stderr.txt8
-rw-r--r--Tests/RunCMake/CMP0115/CMP0115-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW-stderr.txt8
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-NEW.cmake2
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD-stderr.txt11
-rw-r--r--Tests/RunCMake/File_Generate/SourceProperty-CMP0070-OLD.cmake2
-rw-r--r--Tests/RunCMake/InterfaceLibrary/global-interface-stderr.txt6
-rw-r--r--Tests/RunCMake/ObjectLibrary/MissingSource-stderr.txt6
-rw-r--r--Tests/RunCMake/find_package/CMP0146-NEW-stderr.txt4
-rw-r--r--Tests/RunCMake/find_package/CMP0146-NEW.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0146-OLD.cmake7
-rw-r--r--Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/find_package/CMP0146-WARN.cmake6
-rw-r--r--Tests/RunCMake/find_package/RunCMakeTest.cmake3
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-name-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-name-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-name.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-path-result.txt1
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-path-stderr.txt6
-rw-r--r--Tests/RunCMake/include/CMP0146-NEW-path.cmake2
-rw-r--r--Tests/RunCMake/include/CMP0146-OLD.cmake7
-rw-r--r--Tests/RunCMake/include/CMP0146-WARN-stderr.txt8
-rw-r--r--Tests/RunCMake/include/CMP0146-WARN.cmake7
-rw-r--r--Tests/RunCMake/include/RunCMakeTest.cmake5
-rw-r--r--Tests/RunCMake/target_sources/FileSetDirect-stderr.txt6
-rw-r--r--Tests/RunCMake/target_sources/FileSetWrongSyntax-stderr.txt6
28 files changed, 129 insertions, 44 deletions
diff --git a/Tests/CMakeLib/testRST.expect b/Tests/CMakeLib/testRST.expect
index 076562a..483e220 100644
--- a/Tests/CMakeLib/testRST.expect
+++ b/Tests/CMakeLib/testRST.expect
@@ -46,7 +46,8 @@ Bracket Comment Content
Bracket Comment Content
]
-.. cmake:command:: some_cmd
+.. cmake:command::
+ some_cmd
Command some_cmd description.
@@ -54,7 +55,8 @@ Bracket Comment Content
Command other_cmd description.
-.. cmake:envvar:: some_var
+.. cmake:envvar::
+ some_var
Environment variable some_var description.
@@ -62,7 +64,8 @@ Bracket Comment Content
Environment variable other_var description.
-.. cmake:genex:: SOME_GENEX
+.. cmake:genex::
+ SOME_GENEX
Generator expression SOME_GENEX description.
@@ -70,7 +73,8 @@ Bracket Comment Content
Generator expression $<OTHER_GENEX> description.
-.. cmake:signature:: some_command(SOME_SIGNATURE)
+.. cmake:signature::
+ some_command(SOME_SIGNATURE)
Command some_command SOME_SIGNATURE description.
@@ -78,7 +82,8 @@ Bracket Comment Content
Command other_command OTHER_SIGNATURE description.
-.. cmake:variable:: some_var
+.. cmake:variable::
+ some_var
Variable some_var description.
diff --git a/Tests/CMakeLib/testRST.rst b/Tests/CMakeLib/testRST.rst
index 43b08da..c23b69a 100644
--- a/Tests/CMakeLib/testRST.rst
+++ b/Tests/CMakeLib/testRST.rst
@@ -49,7 +49,8 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
.. cmake-module:: testRSTmod.cmake
-.. cmake:command:: some_cmd
+.. cmake:command::
+ some_cmd
Command some_cmd description.
@@ -57,7 +58,8 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
Command other_cmd description.
-.. cmake:envvar:: some_var
+.. cmake:envvar::
+ some_var
Environment variable some_var description.
@@ -65,7 +67,8 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
Environment variable other_var description.
-.. cmake:genex:: SOME_GENEX
+.. cmake:genex::
+ SOME_GENEX
Generator expression SOME_GENEX description.
@@ -73,7 +76,8 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
Generator expression $<OTHER_GENEX> description.
-.. cmake:signature:: some_command(SOME_SIGNATURE)
+.. cmake:signature::
+ some_command(SOME_SIGNATURE)
Command some_command SOME_SIGNATURE description.
@@ -81,7 +85,8 @@ Inline literal ``__`` followed by inline link `Link Text <InternalDest_>`_.
Command other_command OTHER_SIGNATURE description.
-.. cmake:variable:: some_var
+.. cmake:variable::
+ some_var
Variable some_var description.
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/find_package/CMP0146-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0146-NEW-stderr.txt
new file mode 100644
index 0000000..0162852
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-NEW-stderr.txt
@@ -0,0 +1,4 @@
+^CMake Warning at CMP0146-NEW\.cmake:[0-9]+ \(find_package\):
+ No "FindCUDA\.cmake" found in CMAKE_MODULE_PATH\.
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
diff --git a/Tests/RunCMake/find_package/CMP0146-NEW.cmake b/Tests/RunCMake/find_package/CMP0146-NEW.cmake
new file mode 100644
index 0000000..b373227
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-NEW.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0146 NEW)
+set(_FindCUDA_testing TRUE)
+find_package(CUDA MODULE)
+
+if(_FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake erroneously included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0146-OLD.cmake b/Tests/RunCMake/find_package/CMP0146-OLD.cmake
new file mode 100644
index 0000000..77cd1f5
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0146 OLD)
+set(_FindCUDA_testing TRUE)
+find_package(CUDA MODULE)
+
+if(NOT _FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt
new file mode 100644
index 0000000..2cd9c5f
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-WARN-stderr.txt
@@ -0,0 +1,8 @@
+CMake Warning \(dev\) at CMP0146-WARN\.cmake:[0-9]+ \(find_package\):
+ Policy CMP0146 is not set: The FindCUDA module is removed\. Run "cmake
+ --help-policy CMP0146" for policy details\. Use the cmake_policy command to
+ set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/find_package/CMP0146-WARN.cmake b/Tests/RunCMake/find_package/CMP0146-WARN.cmake
new file mode 100644
index 0000000..276daf2
--- /dev/null
+++ b/Tests/RunCMake/find_package/CMP0146-WARN.cmake
@@ -0,0 +1,6 @@
+set(_FindCUDA_testing TRUE)
+find_package(CUDA MODULE)
+
+if(NOT _FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake not included")
+endif()
diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake
index f0bb011..924aa66 100644
--- a/Tests/RunCMake/find_package/RunCMakeTest.cmake
+++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake
@@ -39,6 +39,9 @@ run_cmake(CMP0084-NEW)
run_cmake(CMP0145-OLD)
run_cmake(CMP0145-WARN)
run_cmake(CMP0145-NEW)
+run_cmake(CMP0146-OLD)
+run_cmake(CMP0146-WARN)
+run_cmake(CMP0146-NEW)
run_cmake(WrongVersionRange)
run_cmake(EmptyVersionRange)
run_cmake(VersionRangeWithEXACT)
diff --git a/Tests/RunCMake/include/CMP0146-NEW-name-result.txt b/Tests/RunCMake/include/CMP0146-NEW-name-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-name-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0146-NEW-name-stderr.txt b/Tests/RunCMake/include/CMP0146-NEW-name-stderr.txt
new file mode 100644
index 0000000..7d9e7d8
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-name-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at CMP0146-NEW-name\.cmake:[0-9]+ \(include\):
+ include could not find requested file:
+
+ FindCUDA
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0146-NEW-name.cmake b/Tests/RunCMake/include/CMP0146-NEW-name.cmake
new file mode 100644
index 0000000..feedc6f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-name.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0146 NEW)
+include(FindCUDA)
diff --git a/Tests/RunCMake/include/CMP0146-NEW-path-result.txt b/Tests/RunCMake/include/CMP0146-NEW-path-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-path-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/include/CMP0146-NEW-path-stderr.txt b/Tests/RunCMake/include/CMP0146-NEW-path-stderr.txt
new file mode 100644
index 0000000..916672b
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-path-stderr.txt
@@ -0,0 +1,6 @@
+^CMake Error at [^
+]*/Modules/FindCUDA.cmake:[0-9]+ \(message\):
+ The FindCUDA module has been removed by policy CMP0146\.
+Call Stack \(most recent call first\):
+ CMP0146-NEW-path\.cmake:[0-9]+ \(include\)
+ CMakeLists\.txt:[0-9]+ \(include\)$
diff --git a/Tests/RunCMake/include/CMP0146-NEW-path.cmake b/Tests/RunCMake/include/CMP0146-NEW-path.cmake
new file mode 100644
index 0000000..6768d4d
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-NEW-path.cmake
@@ -0,0 +1,2 @@
+cmake_policy(SET CMP0146 NEW)
+include(${CMAKE_ROOT}/Modules/FindCUDA.cmake)
diff --git a/Tests/RunCMake/include/CMP0146-OLD.cmake b/Tests/RunCMake/include/CMP0146-OLD.cmake
new file mode 100644
index 0000000..654cdf7
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-OLD.cmake
@@ -0,0 +1,7 @@
+cmake_policy(SET CMP0146 OLD)
+set(_FindCUDA_testing 1)
+include(FindCUDA)
+
+if(NOT _FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/CMP0146-WARN-stderr.txt b/Tests/RunCMake/include/CMP0146-WARN-stderr.txt
new file mode 100644
index 0000000..aaaf1dc
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-WARN-stderr.txt
@@ -0,0 +1,8 @@
+^CMake Warning \(dev\) at CMP0146-WARN\.cmake:[0-9]+ \(include\):
+ Policy CMP0146 is not set: The FindCUDA module is removed\. Run "cmake
+ --help-policy CMP0146" for policy details\. Use the cmake_policy command to
+ set the policy and suppress this warning\.
+
+Call Stack \(most recent call first\):
+ CMakeLists\.txt:[0-9]+ \(include\)
+This warning is for project developers\. Use -Wno-dev to suppress it\.$
diff --git a/Tests/RunCMake/include/CMP0146-WARN.cmake b/Tests/RunCMake/include/CMP0146-WARN.cmake
new file mode 100644
index 0000000..bce1ae8
--- /dev/null
+++ b/Tests/RunCMake/include/CMP0146-WARN.cmake
@@ -0,0 +1,7 @@
+# Do not set CMP0146.
+set(_FindCUDA_testing 1)
+include(FindCUDA)
+
+if(NOT _FindCUDA_included)
+ message(FATAL_ERROR "FindCUDA.cmake not included")
+endif()
diff --git a/Tests/RunCMake/include/RunCMakeTest.cmake b/Tests/RunCMake/include/RunCMakeTest.cmake
index 8fb7201..b6fdb54 100644
--- a/Tests/RunCMake/include/RunCMakeTest.cmake
+++ b/Tests/RunCMake/include/RunCMakeTest.cmake
@@ -7,3 +7,8 @@ run_cmake(CMP0024-NEW)
run_cmake(ExportExportInclude)
run_cmake(IncludeIsDirectory)
run_cmake(IncludeMalformed)
+
+run_cmake(CMP0146-OLD)
+run_cmake(CMP0146-WARN)
+run_cmake(CMP0146-NEW-name)
+run_cmake(CMP0146-NEW-path)
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\):