mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 16:32:14 -06:00
Tests/InstallPackageInfo: Consolidate bad arguments tests
Consolidate InstallPackageInfo's bad arguments tests into only two test cases that each test multiple invocations, rather than having a single test per invocation. This makes them match the similar ExportPackageInfo tests which were necessarily consolidated due to those testing many more variants (due to differences in the respective interfaces). This will simplify adding additional tests in the future.
This commit is contained in:
@@ -1,2 +1,10 @@
|
||||
CMake Error at BadArgs1.cmake:3 \(install\):
|
||||
install COMPAT_VERSION requires VERSION.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:3 \(include\)
|
||||
|
||||
|
||||
CMake Error at BadArgs1.cmake:4 \(install\):
|
||||
install VERSION_SCHEMA requires VERSION.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:3 \(include\)
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
add_library(foo INTERFACE)
|
||||
install(TARGETS foo EXPORT foo DESTINATION .)
|
||||
install(PACKAGE_INFO test EXPORT foo COMPAT_VERSION 1.0)
|
||||
install(PACKAGE_INFO test EXPORT foo VERSION_SCHEMA simple)
|
||||
|
||||
@@ -1,2 +1,16 @@
|
||||
CMake Error at BadArgs2.cmake:3 \(install\):
|
||||
install VERSION_SCHEMA requires VERSION.
|
||||
install APPENDIX and VERSION are mutually exclusive.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:3 \(include\)
|
||||
|
||||
|
||||
CMake Error at BadArgs2.cmake:4 \(install\):
|
||||
install APPENDIX and DEFAULT_TARGETS are mutually exclusive.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:3 \(include\)
|
||||
|
||||
|
||||
CMake Error at BadArgs2.cmake:5 \(install\):
|
||||
install APPENDIX and DEFAULT_CONFIGURATIONS are mutually exclusive.
|
||||
Call Stack \(most recent call first\):
|
||||
CMakeLists\.txt:3 \(include\)
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
add_library(foo INTERFACE)
|
||||
install(TARGETS foo EXPORT foo DESTINATION .)
|
||||
install(PACKAGE_INFO test EXPORT foo VERSION_SCHEMA simple)
|
||||
install(PACKAGE_INFO test EXPORT foo APPENDIX test VERSION 1.0)
|
||||
install(PACKAGE_INFO test EXPORT foo APPENDIX test DEFAULT_TARGETS foo)
|
||||
install(PACKAGE_INFO test EXPORT foo APPENDIX test DEFAULT_CONFIGURATIONS test)
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
1
|
||||
@@ -1,2 +0,0 @@
|
||||
CMake Error at BadArgs3.cmake:3 \(install\):
|
||||
install APPENDIX and VERSION are mutually exclusive.
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(foo INTERFACE)
|
||||
install(TARGETS foo EXPORT foo DESTINATION .)
|
||||
install(PACKAGE_INFO test EXPORT foo APPENDIX test VERSION 1.0)
|
||||
@@ -1 +0,0 @@
|
||||
1
|
||||
@@ -1,2 +0,0 @@
|
||||
CMake Error at BadArgs4.cmake:3 \(install\):
|
||||
install APPENDIX and DEFAULT_TARGETS are mutually exclusive.
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(foo INTERFACE)
|
||||
install(TARGETS foo EXPORT foo DESTINATION .)
|
||||
install(PACKAGE_INFO test EXPORT foo APPENDIX test DEFAULT_TARGETS foo)
|
||||
@@ -1 +0,0 @@
|
||||
1
|
||||
@@ -1,2 +0,0 @@
|
||||
CMake Error at BadArgs5.cmake:3 \(install\):
|
||||
install APPENDIX and DEFAULT_CONFIGURATIONS are mutually exclusive.
|
||||
@@ -1,3 +0,0 @@
|
||||
add_library(foo INTERFACE)
|
||||
install(TARGETS foo EXPORT foo DESTINATION .)
|
||||
install(PACKAGE_INFO test EXPORT foo APPENDIX test DEFAULT_CONFIGURATIONS test)
|
||||
@@ -26,9 +26,6 @@ endfunction()
|
||||
# Test incorrect usage
|
||||
run_cmake(BadArgs1)
|
||||
run_cmake(BadArgs2)
|
||||
run_cmake(BadArgs3)
|
||||
run_cmake(BadArgs4)
|
||||
run_cmake(BadArgs5)
|
||||
run_cmake(BadName)
|
||||
run_cmake(BadDefaultTarget)
|
||||
run_cmake(ReferencesNonExportedTarget)
|
||||
|
||||
Reference in New Issue
Block a user