diff options
Diffstat (limited to 'Tests/RunCMake')
329 files changed, 2682 insertions, 249 deletions
diff --git a/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt b/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt index a1a0e8f..c3d541e 100644 --- a/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt +++ b/Tests/RunCMake/BundleUtilities/CMP0080-WARN-stderr.txt @@ -1,4 +1,10 @@ CMake Warning \(dev\) at .*/Modules/BundleUtilities\.cmake:[0-9]+ \(message\): - Policy CMP0080 is not set: BundleUtilities prefers not to be included at - configure time\. Run "cmake --help-policy CMP0080" for policy details\. Use - the cmake_policy command to set the policy and suppress this warning\. + Policy CMP0080 is not set: BundleUtilities cannot be included at configure + time\. Run "cmake --help-policy CMP0080" for policy details\. Use the + cmake_policy command to set the policy and suppress this warning\. + +Call Stack \(most recent call first\): + .*/Modules/BundleUtilities\.cmake:[0-9]+ \(_warn_cmp0080\) + CMP0080-WARN\.cmake:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt index 05b0217..6a1f1bd 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-NEW-stderr.txt @@ -4,4 +4,4 @@ CMake Error at CMP0026-CONFIG-LOCATION-NEW.cmake:7 \(get_target_property\): expression \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt index edeb337..84dec32 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-OLD-stderr.txt @@ -7,4 +7,4 @@ specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt index d44dcb4..d2209fd 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-CONFIG-LOCATION-WARN-stderr.txt @@ -8,5 +8,5 @@ CMake Warning \(dev\) at CMP0026-CONFIG-LOCATION-WARN.cmake:5 \(get_target_prope expression \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt index fec9dfb..1490103 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-NEW-stderr.txt @@ -4,4 +4,4 @@ CMake Error at CMP0026-LOCATION-CONFIG-NEW.cmake:7 \(get_target_property\): expression \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt index 32ff698..1fb4ef6 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-OLD-stderr.txt @@ -7,4 +7,4 @@ specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt index cd6f3d0..8b4faf0 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-LOCATION-CONFIG-WARN-stderr.txt @@ -8,5 +8,5 @@ CMake Warning \(dev\) at CMP0026-LOCATION-CONFIG-WARN.cmake:5 \(get_target_prope expression \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt index fa02512..8c47c2a 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-NEW-stderr.txt @@ -4,4 +4,4 @@ CMake Error at CMP0026-NEW.cmake:7 \(get_target_property\): expression \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt index b3f79fc..b4282f5 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-OLD-stderr.txt @@ -7,4 +7,4 @@ specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt b/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt index d122c4a..0d39596 100644 --- a/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0026/CMP0026-WARN-stderr.txt @@ -8,7 +8,7 @@ CMake Warning \(dev\) at CMP0026-WARN.cmake:5 \(get_target_property\): expression \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. + CMake Warning \(dev\) at CMP0026-WARN.cmake:8 \(get_target_property\): @@ -21,5 +21,5 @@ CMake Warning \(dev\) at CMP0026-WARN.cmake:8 \(get_target_property\): expression \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt index 0996cb6..6377921 100644 --- a/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt +++ b/Tests/RunCMake/CMP0026/LOCATION-and-TARGET_OBJECTS-stderr.txt @@ -8,5 +8,5 @@ CMake Warning \(dev\) at LOCATION-and-TARGET_OBJECTS.cmake:[0-9]+ \(get_target_p \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt b/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt index 87d198d..360d987 100644 --- a/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt +++ b/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt @@ -8,5 +8,5 @@ CMake Warning \(dev\) at ObjlibNotDefined.cmake:[0-9]+ \(get_target_property\): expression \$<TARGET_FILE>, as appropriate. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt b/Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt index 157a046..3525704 100644 --- a/Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt +++ b/Tests/RunCMake/CMP0026/clear-cached-information-stderr.txt @@ -7,4 +7,4 @@ specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack \(most recent call first\): - CMakeLists.txt:[0-9]+ \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt b/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt index 697265e..e1c44e5 100644 --- a/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt +++ b/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt @@ -7,6 +7,6 @@ specific short-term circumstances. Projects should be ported to the NEW behavior and not rely on setting a policy to OLD. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + Sources: "empty.cpp"$ diff --git a/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt b/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt index ae2e468..78c6b6d 100644 --- a/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt +++ b/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt @@ -9,7 +9,7 @@ CMake Warning \(dev\) at CMP0051-WARN.cmake:6 \(get_target_property\): needs to be adapted to ignore the generator expression using the string\(GENEX_STRIP\) command. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. Sources: "empty.cpp" @@ -25,7 +25,7 @@ CMake Warning \(dev\) at CMP0051-WARN.cmake:12 \(get_target_property\): needs to be adapted to ignore the generator expression using the string\(GENEX_STRIP\) command. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. Sources: "../empty.cpp"$ diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 99f4ae7..b044757 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -187,10 +187,12 @@ add_RunCMake_test(find_dependency) add_RunCMake_test(CompileDefinitions) add_RunCMake_test(CompileFeatures) add_RunCMake_test(PolicyScope) +add_RunCMake_test(WriteBasicConfigVersionFile) add_RunCMake_test(WriteCompilerDetectionHeader) add_RunCMake_test(SourceProperties) if(NOT WIN32) - add_RunCMake_test(PositionIndependentCode) + add_RunCMake_test(PositionIndependentCode -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} + -DCMAKE_CXX_COMPILER_ID=${CMAKE_CXX_COMPILER_ID}) endif() if(NOT CMAKE_GENERATOR MATCHES "Visual Studio") add_RunCMake_test(VisibilityPreset) @@ -273,6 +275,7 @@ function(add_RunCMake_test_try_compile) endif() endif() foreach(var + CMAKE_SYSTEM_NAME CMAKE_C_COMPILER_ID CMAKE_C_COMPILER_VERSION CMAKE_C_STANDARD_DEFAULT @@ -289,7 +292,8 @@ function(add_RunCMake_test_try_compile) endfunction() add_RunCMake_test_try_compile() -add_RunCMake_test(try_run) +add_RunCMake_test(try_run -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME} + -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}) add_RunCMake_test(set) add_RunCMake_test(variable_watch) add_RunCMake_test(while) @@ -334,6 +338,13 @@ endif() if(XCODE_VERSION) add_RunCMake_test(XcodeProject -DXCODE_VERSION=${XCODE_VERSION}) + + # This test can take a very long time due to lots of combinations. + # Use a long default timeout and provide an option to customize it. + if(NOT DEFINED CMake_TEST_XcodeProject_TIMEOUT) + set(CMake_TEST_XcodeProject_TIMEOUT 2000) + endif() + set_property(TEST RunCMake.XcodeProject PROPERTY TIMEOUT ${CMake_TEST_XcodeProject_TIMEOUT}) endif() if(CMAKE_C_COMPILER_ID STREQUAL "AppleClang" @@ -343,11 +354,16 @@ endif() add_RunCMake_test(File_Generate) add_RunCMake_test(ExportWithoutLanguage) +add_RunCMake_test(target_link_directories) add_RunCMake_test(target_link_libraries) add_RunCMake_test(add_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}) add_RunCMake_test(target_link_options -DCMAKE_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}) +add_RunCMake_test(target_compile_definitions) add_RunCMake_test(target_compile_features) +add_RunCMake_test(target_compile_options) +add_RunCMake_test(target_include_directories) +add_RunCMake_test(target_sources) add_RunCMake_test(CheckModules) add_RunCMake_test(CheckIPOSupported) add_RunCMake_test(CommandLine -DCMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}) diff --git a/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt b/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt index fe4e455..a553bde 100644 --- a/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt +++ b/Tests/RunCMake/CPackCommandLine/NotAGenerator-stderr.txt @@ -1 +1 @@ -^CPack Error: Cannot initialize CPack generator: NotAGenerator +^CPack Error: Could not create CPack generator: NotAGenerator diff --git a/Tests/RunCMake/CTestTimeoutAfterMatch/CTestConfig.cmake.in b/Tests/RunCMake/CTestTimeoutAfterMatch/CTestConfig.cmake.in deleted file mode 100644 index 58b11af..0000000 --- a/Tests/RunCMake/CTestTimeoutAfterMatch/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "TimeoutAfterMatch@CASE_NAME@") diff --git a/Tests/RunCMake/CommandLine/C-no-file-stderr.txt b/Tests/RunCMake/CommandLine/C-no-file-stderr.txt index 5315f59..2a4ee64 100644 --- a/Tests/RunCMake/CommandLine/C-no-file-stderr.txt +++ b/Tests/RunCMake/CommandLine/C-no-file-stderr.txt @@ -1,3 +1,3 @@ ^CMake Error: Error processing file: nosuchcachefile.txt -CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/C-no-file-build/nosuchcachefile.txt" does not exist. +CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/C-no-file-build" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI.$ diff --git a/Tests/RunCMake/list/SORT-NotList-result.txt b/Tests/RunCMake/CommandLine/Cno-file-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/list/SORT-NotList-result.txt +++ b/Tests/RunCMake/CommandLine/Cno-file-result.txt diff --git a/Tests/RunCMake/CommandLine/Cno-file-stderr.txt b/Tests/RunCMake/CommandLine/Cno-file-stderr.txt new file mode 100644 index 0000000..67a2032 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Cno-file-stderr.txt @@ -0,0 +1,3 @@ +^CMake Error: Error processing file: nosuchcachefile.txt +CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Cno-file-build" does not appear to contain CMakeLists.txt. +Specify --help for usage, or press the help button on the CMake GUI.$ diff --git a/Tests/RunCMake/list/REVERSE-NotList-result.txt b/Tests/RunCMake/CommandLine/D-no-src-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/list/REVERSE-NotList-result.txt +++ b/Tests/RunCMake/CommandLine/D-no-src-result.txt diff --git a/Tests/RunCMake/CommandLine/D-no-src-stderr.txt b/Tests/RunCMake/CommandLine/D-no-src-stderr.txt new file mode 100644 index 0000000..b5ac69c --- /dev/null +++ b/Tests/RunCMake/CommandLine/D-no-src-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/D-no-src-build" does not appear to contain CMakeLists.txt. +Specify --help for usage, or press the help button on the CMake GUI.$ diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt b/Tests/RunCMake/CommandLine/Dno-src-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/list/REMOVE_ITEM-NotList-result.txt +++ b/Tests/RunCMake/CommandLine/Dno-src-result.txt diff --git a/Tests/RunCMake/CommandLine/Dno-src-stderr.txt b/Tests/RunCMake/CommandLine/Dno-src-stderr.txt new file mode 100644 index 0000000..402c714 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Dno-src-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Dno-src-build" does not appear to contain CMakeLists.txt. +Specify --help for usage, or press the help button on the CMake GUI.$ diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt b/Tests/RunCMake/CommandLine/E_touch-nonexistent-dir-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-result.txt +++ b/Tests/RunCMake/CommandLine/E_touch-nonexistent-dir-result.txt diff --git a/Tests/RunCMake/CommandLine/E_touch-nonexistent-dir-stderr.txt b/Tests/RunCMake/CommandLine/E_touch-nonexistent-dir-stderr.txt new file mode 100644 index 0000000..470d811 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_touch-nonexistent-dir-stderr.txt @@ -0,0 +1 @@ +^cmake -E touch: failed to update ".+/touch-nonexistent-dir/foo"\.$ diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 9859df1..a37b7f1 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -6,10 +6,15 @@ run_cmake_command(NoArgs ${CMAKE_COMMAND}) run_cmake_command(Wizard ${CMAKE_COMMAND} -i) run_cmake_command(C-no-arg ${CMAKE_COMMAND} -C) run_cmake_command(C-no-file ${CMAKE_COMMAND} -C nosuchcachefile.txt) +run_cmake_command(Cno-file ${CMAKE_COMMAND} -Cnosuchcachefile.txt) run_cmake_command(cache-no-file ${CMAKE_COMMAND} nosuchsubdir/CMakeCache.txt) run_cmake_command(lists-no-file ${CMAKE_COMMAND} nosuchsubdir/CMakeLists.txt) run_cmake_command(D-no-arg ${CMAKE_COMMAND} -D) +run_cmake_command(D-no-src ${CMAKE_COMMAND} -D VAR=VALUE) +run_cmake_command(Dno-src ${CMAKE_COMMAND} -DVAR=VALUE) run_cmake_command(U-no-arg ${CMAKE_COMMAND} -U) +run_cmake_command(U-no-src ${CMAKE_COMMAND} -U VAR) +run_cmake_command(Uno-src ${CMAKE_COMMAND} -UVAR) run_cmake_command(E-no-arg ${CMAKE_COMMAND} -E) run_cmake_command(E_capabilities ${CMAKE_COMMAND} -E capabilities) run_cmake_command(E_capabilities-arg ${CMAKE_COMMAND} -E capabilities --extra-arg) @@ -17,7 +22,9 @@ run_cmake_command(E_echo_append ${CMAKE_COMMAND} -E echo_append) run_cmake_command(E_rename-no-arg ${CMAKE_COMMAND} -E rename) run_cmake_command(E_server-arg ${CMAKE_COMMAND} -E server --extra-arg) run_cmake_command(E_server-pipe ${CMAKE_COMMAND} -E server --pipe=) + run_cmake_command(E_touch_nocreate-no-arg ${CMAKE_COMMAND} -E touch_nocreate) +run_cmake_command(E_touch-nonexistent-dir ${CMAKE_COMMAND} -E touch "${RunCMake_BINARY_DIR}/touch-nonexistent-dir/foo") run_cmake_command(E_time ${CMAKE_COMMAND} -E time ${CMAKE_COMMAND} -E echo "hello world") run_cmake_command(E_time-no-arg ${CMAKE_COMMAND} -E time) @@ -343,6 +350,10 @@ set(RunCMake_TEST_OPTIONS --trace-expand --warn-uninitialized) run_cmake(trace-expand-warn-uninitialized) unset(RunCMake_TEST_OPTIONS) +set(RunCMake_TEST_OPTIONS --warn-uninitialized) +run_cmake(warn-uninitialized) +unset(RunCMake_TEST_OPTIONS) + set(RunCMake_TEST_OPTIONS --trace-source=trace-only-this-file.cmake) run_cmake(trace-source) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/list/FILTER-NotList-result.txt b/Tests/RunCMake/CommandLine/U-no-src-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/list/FILTER-NotList-result.txt +++ b/Tests/RunCMake/CommandLine/U-no-src-result.txt diff --git a/Tests/RunCMake/CommandLine/U-no-src-stderr.txt b/Tests/RunCMake/CommandLine/U-no-src-stderr.txt new file mode 100644 index 0000000..a3b4b12 --- /dev/null +++ b/Tests/RunCMake/CommandLine/U-no-src-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/U-no-src-build" does not appear to contain CMakeLists.txt. +Specify --help for usage, or press the help button on the CMake GUI.$ diff --git a/Tests/RunCMake/CommandLine/Uno-src-result.txt b/Tests/RunCMake/CommandLine/Uno-src-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/Uno-src-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/Uno-src-stderr.txt b/Tests/RunCMake/CommandLine/Uno-src-stderr.txt new file mode 100644 index 0000000..baa8d63 --- /dev/null +++ b/Tests/RunCMake/CommandLine/Uno-src-stderr.txt @@ -0,0 +1,2 @@ +^CMake Error: The source directory ".*/Tests/RunCMake/CommandLine/Uno-src-build" does not appear to contain CMakeLists.txt. +Specify --help for usage, or press the help button on the CMake GUI.$ diff --git a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt index e9be1dc..30385f8 100644 --- a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt @@ -1,4 +1,4 @@ ^CMake Deprecation Warning at Wdeprecated.cmake:1 \(message\): Some deprecated warning Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CommandLine/Wdev-stderr.txt b/Tests/RunCMake/CommandLine/Wdev-stderr.txt index 88cfb3a..172fb81 100644 --- a/Tests/RunCMake/CommandLine/Wdev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wdev-stderr.txt @@ -1,11 +1,11 @@ ^CMake Warning \(dev\) at Wdev.cmake:1 \(message\): Some author warning Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning \(dev\) at Wdev.cmake:6 \(include\): include\(\) given empty file name \(ignored\). Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt b/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt index 6acdc73..d681836 100644 --- a/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt +++ b/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt @@ -1,4 +1,4 @@ ^CMake Deprecation Error at Werror_deprecated.cmake:1 \(message\): Some deprecated warning Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt b/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt index 590ec96..35890fc 100644 --- a/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt @@ -1,11 +1,11 @@ ^CMake Error \(dev\) at Werror_dev.cmake:4 \(include\): include\(\) given empty file name \(ignored\). Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This error is for project developers. Use -Wno-error=dev to suppress it. CMake Error \(dev\) at Werror_dev.cmake:7 \(message\): Some author warning Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This error is for project developers. Use -Wno-error=dev to suppress it.$ diff --git a/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt index 0ed1698..4589706 100644 --- a/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wno-error_deprecated-stderr.txt @@ -1,4 +1,4 @@ ^CMake Deprecation Warning at Wno-error_deprecated.cmake:2 \(message\): Some deprecated warning Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt b/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt index dd22d55..ee28d7f 100644 --- a/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt +++ b/Tests/RunCMake/CommandLine/Wno-error_dev-stderr.txt @@ -1,11 +1,11 @@ ^CMake Warning \(dev\) at Wno-error_dev.cmake:2 \(message\): Some author warning Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. CMake Warning \(dev\) at Wno-error_dev.cmake:6 \(include\): include\(\) given empty file name \(ignored\). Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/CommandLine/warn-uninitialized-stderr.txt b/Tests/RunCMake/CommandLine/warn-uninitialized-stderr.txt new file mode 100644 index 0000000..a13402a --- /dev/null +++ b/Tests/RunCMake/CommandLine/warn-uninitialized-stderr.txt @@ -0,0 +1,5 @@ +^CMake Warning \(dev\) at warn-uninitialized.cmake:1 \(set\): + uninitialized variable 'WARN_FROM_NORMAL_CMAKE_FILE' +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/CommandLine/warn-uninitialized.cmake b/Tests/RunCMake/CommandLine/warn-uninitialized.cmake new file mode 100644 index 0000000..f1a75c9 --- /dev/null +++ b/Tests/RunCMake/CommandLine/warn-uninitialized.cmake @@ -0,0 +1 @@ +set(FOO "${WARN_FROM_NORMAL_CMAKE_FILE}") diff --git a/Tests/RunCMake/Cppcheck/C-bad-Build-result.txt b/Tests/RunCMake/Cppcheck/C-bad-Build-result.txt index 573541a..d197c91 100644 --- a/Tests/RunCMake/Cppcheck/C-bad-Build-result.txt +++ b/Tests/RunCMake/Cppcheck/C-bad-Build-result.txt @@ -1 +1 @@ -0 +[^0] diff --git a/Tests/RunCMake/Cppcheck/C-error-Build-result.txt b/Tests/RunCMake/Cppcheck/C-error-Build-result.txt new file mode 100644 index 0000000..d197c91 --- /dev/null +++ b/Tests/RunCMake/Cppcheck/C-error-Build-result.txt @@ -0,0 +1 @@ +[^0] diff --git a/Tests/RunCMake/Cppcheck/C-error-Build-stdout.txt b/Tests/RunCMake/Cppcheck/C-error-Build-stdout.txt new file mode 100644 index 0000000..4a24c0c --- /dev/null +++ b/Tests/RunCMake/Cppcheck/C-error-Build-stdout.txt @@ -0,0 +1 @@ +.*Error: cppcheck reported failure.*error.*warning.*style.*performance.*information.* diff --git a/Tests/RunCMake/Cppcheck/C-error.cmake b/Tests/RunCMake/Cppcheck/C-error.cmake new file mode 100644 index 0000000..2254d75 --- /dev/null +++ b/Tests/RunCMake/Cppcheck/C-error.cmake @@ -0,0 +1,3 @@ +enable_language(C) +set(CMAKE_C_CPPCHECK "${PSEUDO_CPPCHECK}" -error) +add_executable(main main.c) diff --git a/Tests/RunCMake/Cppcheck/RunCMakeTest.cmake b/Tests/RunCMake/Cppcheck/RunCMakeTest.cmake index 5fd4ead..e395f36 100644 --- a/Tests/RunCMake/Cppcheck/RunCMakeTest.cmake +++ b/Tests/RunCMake/Cppcheck/RunCMakeTest.cmake @@ -15,6 +15,7 @@ endfunction() run_cppcheck(C) run_cppcheck(CXX) +run_cppcheck(C-error) run_cppcheck(C-bad) if(NOT RunCMake_GENERATOR STREQUAL "Watcom WMake") diff --git a/Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt b/Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt index c3708a9..5388c46 100644 --- a/Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadAlgoMap1-stderr.txt @@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): The transform name must be a valid C identifier. Call Stack \(most recent call first\): - BadAlgoMap1.cmake:[0-9]+ \(ExternalData_Add_Target\) - CMakeLists.txt:3 \(include\) + BadAlgoMap1\.cmake:[0-9]+ \(ExternalData_Add_Target\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt b/Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt index 1f10644..a48e414 100644 --- a/Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadAlgoMap2-stderr.txt @@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): The transform name must be a valid C identifier. Call Stack \(most recent call first\): - BadAlgoMap2.cmake:[0-9]+ \(ExternalData_Add_Target\) - CMakeLists.txt:3 \(include\) + BadAlgoMap2\.cmake:[0-9]+ \(ExternalData_Add_Target\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt b/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt index f68f0be..1f9f6b5 100644 --- a/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadHashAlgo1-stderr.txt @@ -4,5 +4,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): BAD Call Stack \(most recent call first\): .* - BadHashAlgo1.cmake:3 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + BadHashAlgo1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadOption1-stderr.txt b/Tests/RunCMake/ExternalData/BadOption1-stderr.txt index b63d098..fece877 100644 --- a/Tests/RunCMake/ExternalData/BadOption1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadOption1-stderr.txt @@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Call Stack \(most recent call first\): .* - BadOption1.cmake:2 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + BadOption1\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadOption2-stderr.txt b/Tests/RunCMake/ExternalData/BadOption2-stderr.txt index d114c8a..865552a 100644 --- a/Tests/RunCMake/ExternalData/BadOption2-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadOption2-stderr.txt @@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Call Stack \(most recent call first\): .* - BadOption2.cmake:2 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + BadOption2\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt index aedc330..9d04693 100644 --- a/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadRecurse1-stderr.txt @@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Recurse option "RECURSE:" allowed only with directories. Call Stack \(most recent call first\): .* - BadRecurse1.cmake:2 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + BadRecurse1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt index 3f809ca..135b424 100644 --- a/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadRecurse2-stderr.txt @@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Recurse option "RECURSE:" allowed only with directories. Call Stack \(most recent call first\): .* - BadRecurse2.cmake:2 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + BadRecurse2\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt b/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt index 37740e0..df9bb0e 100644 --- a/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadRecurse3-stderr.txt @@ -5,5 +5,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Call Stack \(most recent call first\): .* - BadRecurse3.cmake:2 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + BadRecurse3\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt index 3099be5..5b34959 100644 --- a/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadSeries1-stderr.txt @@ -15,5 +15,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Call Stack \(most recent call first\): .* - BadSeries1.cmake:3 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + BadSeries1\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt index 3a02c25..82b2311 100644 --- a/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadSeries2-stderr.txt @@ -12,5 +12,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): \(x\)\(y\)\$ Call Stack \(most recent call first\): .* - BadSeries2.cmake:3 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + BadSeries2\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt b/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt index 594cb6f6..13e75c5 100644 --- a/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt +++ b/Tests/RunCMake/ExternalData/BadSeries3-stderr.txt @@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Series option ":" not allowed with associated files. Call Stack \(most recent call first\): .* - BadSeries3.cmake:2 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + BadSeries3\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/Directory1-stderr.txt b/Tests/RunCMake/ExternalData/Directory1-stderr.txt index 2bc3c60..8336832 100644 --- a/Tests/RunCMake/ExternalData/Directory1-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory1-stderr.txt @@ -10,5 +10,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that is directory instead of a file! Call Stack \(most recent call first\): .* - Directory1.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory1\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/Directory2-stderr.txt b/Tests/RunCMake/ExternalData/Directory2-stderr.txt index 92c9a2f..ad6d814 100644 --- a/Tests/RunCMake/ExternalData/Directory2-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory2-stderr.txt @@ -6,5 +6,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): must list associated files. Call Stack \(most recent call first\): .* - Directory2.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory2\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/Directory3-stderr.txt b/Tests/RunCMake/ExternalData/Directory3-stderr.txt index ceed2a0..5538c38 100644 --- a/Tests/RunCMake/ExternalData/Directory3-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory3-stderr.txt @@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that does not exist as a file \(with or without an extension\)! Call Stack \(most recent call first\): .* - Directory3.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory3\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/Directory4-stderr.txt b/Tests/RunCMake/ExternalData/Directory4-stderr.txt index dcb8522..ef88476 100644 --- a/Tests/RunCMake/ExternalData/Directory4-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory4-stderr.txt @@ -2,5 +2,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Series option ":" not allowed with directories. Call Stack \(most recent call first\): .* - Directory4.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory4\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/Directory5-stderr.txt b/Tests/RunCMake/ExternalData/Directory5-stderr.txt index 8e54aec..3fcde41 100644 --- a/Tests/RunCMake/ExternalData/Directory5-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory5-stderr.txt @@ -10,5 +10,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that does not exist as a directory! Call Stack \(most recent call first\): .* - Directory5.cmake:3 \(ExternalData_Add_Test\) - CMakeLists.txt:3 \(include\) + Directory5\.cmake:[0-9]+ \(ExternalData_Add_Test\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/MissingData-stderr.txt b/Tests/RunCMake/ExternalData/MissingData-stderr.txt index 39ed2f1..b109976 100644 --- a/Tests/RunCMake/ExternalData/MissingData-stderr.txt +++ b/Tests/RunCMake/ExternalData/MissingData-stderr.txt @@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that does not exist as a file \(with or without an extension\)! Call Stack \(most recent call first\): .* - MissingData.cmake:4 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + MissingData\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt b/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt index 315af5e..426d86c 100644 --- a/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt +++ b/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt @@ -10,6 +10,6 @@ CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): that does not exist as a file \(with or without an extension\)! Call Stack \(most recent call first\): .* - MissingDataWithAssociated.cmake:4 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + MissingDataWithAssociated\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt b/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt index 496ad8a..33cef07 100644 --- a/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt +++ b/Tests/RunCMake/ExternalData/NoLinkInSource-stderr.txt @@ -2,5 +2,5 @@ CMake Warning at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): ExternalData_LINK_CONTENT cannot be used in-source Call Stack \(most recent call first\): .* - NoLinkInSource.cmake:8 \(ExternalData_Expand_Arguments\) - CMakeLists.txt:3 \(include\) + NoLinkInSource\.cmake:[0-9]+ \(ExternalData_Expand_Arguments\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt b/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt index ccbaf5a..45dfb94 100644 --- a/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt +++ b/Tests/RunCMake/ExternalData/NoURLTemplates-stderr.txt @@ -1,5 +1,5 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Neither ExternalData_URL_TEMPLATES nor ExternalData_OBJECT_STORES is set! Call Stack \(most recent call first\): - NoURLTemplates.cmake:2 \(ExternalData_Add_Target\) - CMakeLists.txt:3 \(include\) + NoURLTemplates\.cmake:[0-9]+ \(ExternalData_Add_Target\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/GNUInstallDirs/Opt-FreeBSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Opt-FreeBSD-stderr.txt new file mode 100644 index 0000000..feb747b --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Opt-FreeBSD-stderr.txt @@ -0,0 +1,30 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/Opt' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='share/info' +CMAKE_INSTALL_LIBDIR='(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_RUNSTATEDIR='var/run' +CMAKE_INSTALL_MANDIR='man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/opt/Opt/bin' +CMAKE_INSTALL_FULL_DATADIR='/opt/Opt/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/opt/Opt/share' +CMAKE_INSTALL_FULL_DOCDIR='/opt/Opt/share/doc/Opt' +CMAKE_INSTALL_FULL_INCLUDEDIR='/opt/Opt/include' +CMAKE_INSTALL_FULL_INFODIR='/opt/Opt/share/info' +CMAKE_INSTALL_FULL_LIBDIR='/opt/Opt/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/opt/Opt/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/opt/Opt/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var/opt/Opt' +CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run/opt/Opt' +CMAKE_INSTALL_FULL_MANDIR='/opt/Opt/man' +CMAKE_INSTALL_FULL_SBINDIR='/opt/Opt/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/opt/Opt/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc/opt/Opt'$ diff --git a/Tests/RunCMake/GNUInstallDirs/Root-FreeBSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Root-FreeBSD-stderr.txt new file mode 100644 index 0000000..4284a15 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Root-FreeBSD-stderr.txt @@ -0,0 +1,30 @@ +^CMAKE_INSTALL_BINDIR='usr/bin' +CMAKE_INSTALL_DATADIR='usr/share' +CMAKE_INSTALL_DATAROOTDIR='usr/share' +CMAKE_INSTALL_DOCDIR='usr/share/doc/Root' +CMAKE_INSTALL_INCLUDEDIR='usr/include' +CMAKE_INSTALL_INFODIR='usr/share/info' +CMAKE_INSTALL_LIBDIR='usr/(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='usr/libexec' +CMAKE_INSTALL_LOCALEDIR='usr/share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_RUNSTATEDIR='var/run' +CMAKE_INSTALL_MANDIR='usr/man' +CMAKE_INSTALL_SBINDIR='usr/sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='usr/com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Root' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/share/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var' +CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run' +CMAKE_INSTALL_FULL_MANDIR='/usr/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$ diff --git a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake index e00af58..d671ee0 100644 --- a/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake +++ b/Tests/RunCMake/GNUInstallDirs/RunCMakeTest.cmake @@ -1,7 +1,11 @@ include(RunCMake) -if(SYSTEM_NAME MATCHES "^(([^k].*)?BSD|DragonFly)$") - set(EXPECT_BSD 1) +if(SYSTEM_NAME STREQUAL "FreeBSD") + set(variant "-FreeBSD") +elseif(SYSTEM_NAME MATCHES "^(([^k].*)?BSD|DragonFly)$") + set(variant "-BSD") +else() + set(variant "") endif() foreach(case @@ -10,8 +14,6 @@ foreach(case Usr UsrLocal ) - if(EXPECT_BSD) - set(RunCMake-stderr-file ${case}-BSD-stderr.txt) - endif() + set(RunCMake-stderr-file ${case}${variant}-stderr.txt) run_cmake(${case}) endforeach() diff --git a/Tests/RunCMake/GNUInstallDirs/Usr-FreeBSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/Usr-FreeBSD-stderr.txt new file mode 100644 index 0000000..9efc110 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/Usr-FreeBSD-stderr.txt @@ -0,0 +1,30 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/Usr' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='share/info' +CMAKE_INSTALL_LIBDIR='(lib|lib64|lib/arch)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_RUNSTATEDIR='var/run' +CMAKE_INSTALL_MANDIR='man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/share/doc/Usr' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/share/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/(lib|lib64|lib/arch)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/var' +CMAKE_INSTALL_FULL_RUNSTATEDIR='/var/run' +CMAKE_INSTALL_FULL_MANDIR='/usr/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/etc'$ diff --git a/Tests/RunCMake/GNUInstallDirs/UsrLocal-FreeBSD-stderr.txt b/Tests/RunCMake/GNUInstallDirs/UsrLocal-FreeBSD-stderr.txt new file mode 100644 index 0000000..505bf08 --- /dev/null +++ b/Tests/RunCMake/GNUInstallDirs/UsrLocal-FreeBSD-stderr.txt @@ -0,0 +1,30 @@ +^CMAKE_INSTALL_BINDIR='bin' +CMAKE_INSTALL_DATADIR='share' +CMAKE_INSTALL_DATAROOTDIR='share' +CMAKE_INSTALL_DOCDIR='share/doc/UsrLocal' +CMAKE_INSTALL_INCLUDEDIR='include' +CMAKE_INSTALL_INFODIR='share/info' +CMAKE_INSTALL_LIBDIR='(lib|lib64)' +CMAKE_INSTALL_LIBEXECDIR='libexec' +CMAKE_INSTALL_LOCALEDIR='share/locale' +CMAKE_INSTALL_LOCALSTATEDIR='var' +CMAKE_INSTALL_RUNSTATEDIR='var/run' +CMAKE_INSTALL_MANDIR='man' +CMAKE_INSTALL_SBINDIR='sbin' +CMAKE_INSTALL_SHAREDSTATEDIR='com' +CMAKE_INSTALL_SYSCONFDIR='etc' +CMAKE_INSTALL_FULL_BINDIR='/usr/local/bin' +CMAKE_INSTALL_FULL_DATADIR='/usr/local/share' +CMAKE_INSTALL_FULL_DATAROOTDIR='/usr/local/share' +CMAKE_INSTALL_FULL_DOCDIR='/usr/local/share/doc/UsrLocal' +CMAKE_INSTALL_FULL_INCLUDEDIR='/usr/local/include' +CMAKE_INSTALL_FULL_INFODIR='/usr/local/share/info' +CMAKE_INSTALL_FULL_LIBDIR='/usr/local/(lib|lib64)' +CMAKE_INSTALL_FULL_LIBEXECDIR='/usr/local/libexec' +CMAKE_INSTALL_FULL_LOCALEDIR='/usr/local/share/locale' +CMAKE_INSTALL_FULL_LOCALSTATEDIR='/usr/local/var' +CMAKE_INSTALL_FULL_RUNSTATEDIR='/usr/local/var/run' +CMAKE_INSTALL_FULL_MANDIR='/usr/local/man' +CMAKE_INSTALL_FULL_SBINDIR='/usr/local/sbin' +CMAKE_INSTALL_FULL_SHAREDSTATEDIR='/usr/local/com' +CMAKE_INSTALL_FULL_SYSCONFDIR='/usr/local/etc'$ diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-NEW-check.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-NEW-check.cmake new file mode 100644 index 0000000..520bf3d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-NEW-check.cmake @@ -0,0 +1,6 @@ +file(READ "${RunCMake_TEST_BINARY_DIR}/CMP0085-NEW-generated.txt" content) + +set(expected "101011") +if(NOT content STREQUAL expected) + set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]") +endif() diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-NEW.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-NEW.cmake new file mode 100644 index 0000000..ee85c0d --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-NEW.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0070 NEW) +file(GENERATE OUTPUT CMP0085-NEW-generated.txt CONTENT + "$<IN_LIST:,>$<IN_LIST:,a>$<IN_LIST:,;a>$<IN_LIST:a,>$<IN_LIST:a,a>$<IN_LIST:a,;a>" + ) diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-check.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-check.cmake new file mode 100644 index 0000000..c387db7 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD-check.cmake @@ -0,0 +1,6 @@ +file(READ "${RunCMake_TEST_BINARY_DIR}/CMP0085-OLD-generated.txt" content) + +set(expected "000011") +if(NOT content STREQUAL expected) + set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]") +endif() diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-OLD.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD.cmake new file mode 100644 index 0000000..31b6a51 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-OLD.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0070 NEW) +file(GENERATE OUTPUT CMP0085-OLD-generated.txt CONTENT + "$<IN_LIST:,>$<IN_LIST:,a>$<IN_LIST:,;a>$<IN_LIST:a,>$<IN_LIST:a,a>$<IN_LIST:a,;a>" + ) diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-check.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-check.cmake new file mode 100644 index 0000000..f7bcf0f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-check.cmake @@ -0,0 +1,6 @@ +file(READ "${RunCMake_TEST_BINARY_DIR}/CMP0085-WARN-generated.txt" content) + +set(expected "000011") +if(NOT content STREQUAL expected) + set(RunCMake_TEST_FAILED "actual content:\n [[${content}]]\nbut expected:\n [[${expected}]]") +endif() diff --git a/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-stderr.txt b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-stderr.txt new file mode 100644 index 0000000..81bd450 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN-stderr.txt @@ -0,0 +1,33 @@ +CMake Warning \(dev\) at CMP0085-WARN\.cmake:[0-9]+ \(file\): + Policy CMP0085 is not set: \$<IN_LIST:\.\.\.> handles empty list items\. Run + "cmake --help-policy CMP0085" for policy details\. Use the cmake_policy + command to set the policy and suppress this warning\. + + Search Item: + + "" + + List: + + "" + +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) +This warning is for project developers\. Use -Wno-dev to suppress it\. + +CMake Warning \(dev\) at CMP0085-WARN\.cmake:[0-9]+ \(file\): + Policy CMP0085 is not set: \$<IN_LIST:\.\.\.> handles empty list items\. Run + "cmake --help-policy CMP0085" for policy details\. Use the cmake_policy + command to set the policy and suppress this warning\. + + Search Item: + + "" + + List: + + ";a" + +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/GeneratorExpression/CMP0085-WARN.cmake b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN.cmake new file mode 100644 index 0000000..59c7826 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/CMP0085-WARN.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0070 NEW) +file(GENERATE OUTPUT CMP0085-WARN-generated.txt CONTENT + "$<IN_LIST:,>$<IN_LIST:,a>$<IN_LIST:,;a>$<IN_LIST:a,>$<IN_LIST:a,a>$<IN_LIST:a,;a>" + ) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 3905c5f..013117e 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -61,3 +61,13 @@ if(LINKER_SUPPORTS_PDB) else() run_cmake(NonValidCompiler-TARGET_PDB_FILE) endif() + +set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0085:STRING=OLD) +run_cmake(CMP0085-OLD) +unset(RunCMake_TEST_OPTIONS) + +run_cmake(CMP0085-WARN) + +set(RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0085:STRING=NEW) +run_cmake(CMP0085-NEW) +unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/Languages/ExternalCUDA.cmake b/Tests/RunCMake/Languages/ExternalCUDA.cmake new file mode 100644 index 0000000..3afa93e --- /dev/null +++ b/Tests/RunCMake/Languages/ExternalCUDA.cmake @@ -0,0 +1,8 @@ +enable_language(C) + +add_library(ext_cuda IMPORTED STATIC) +set_property(TARGET ext_cuda PROPERTY IMPORTED_LOCATION "/does_not_exist") +set_property(TARGET ext_cuda PROPERTY IMPORTED_LINK_INTERFACE_LANGUAGES "CUDA") + +add_executable(main empty.c) +target_link_libraries(main ext_cuda) diff --git a/Tests/RunCMake/Languages/RunCMakeTest.cmake b/Tests/RunCMake/Languages/RunCMakeTest.cmake index 732baae..2a534b3 100644 --- a/Tests/RunCMake/Languages/RunCMakeTest.cmake +++ b/Tests/RunCMake/Languages/RunCMakeTest.cmake @@ -6,3 +6,5 @@ run_cmake(link-libraries-TARGET_FILE-genex) run_cmake(link-libraries-TARGET_FILE-genex-ok) run_cmake(DetermineFail) + +run_cmake(ExternalCUDA) diff --git a/Tests/RunCMake/Languages/empty.c b/Tests/RunCMake/Languages/empty.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/Languages/empty.c diff --git a/Tests/RunCMake/PositionIndependentCode/CMP0083-cmp0083_new-check.cmake b/Tests/RunCMake/PositionIndependentCode/CMP0083-cmp0083_new-check.cmake new file mode 100644 index 0000000..255e63d --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/CMP0083-cmp0083_new-check.cmake @@ -0,0 +1,22 @@ + +include ("${RunCMake_TEST_BINARY_DIR}/${RunCMake_TEST_CONFIG}/CMP0083_config.cmake") + + +# retrieve default type of executable +check_executable ("${cmp0083_ref}" ref) + +if (ref STREQUAL "PIE") + # check no_pie executable is really no position independent + check_executable ("${cmp0083_new_no_pie}" new_no_pie) + if (NOT new_no_pie STREQUAL "NO_PIE") + set (RunCMake_TEST_FAILED "CMP0083(NEW) do not produce expected executable.") + endif() +elseif (ref STREQUAL "NO_PIE") + # check pie executable is really position independent + check_executable ("${cmp0083_new_pie}" new_pie) + if (NOT new_pie MATCHES "PIE") + set (RunCMake_TEST_FAILED "CMP0083(NEW) do not produce expected executable.") + endif() +else() + set (RunCMake_TEST_FAILED "CMP0083(NEW) unexpected result.") +endif() diff --git a/Tests/RunCMake/PositionIndependentCode/CMP0083-cmp0083_old-check.cmake b/Tests/RunCMake/PositionIndependentCode/CMP0083-cmp0083_old-check.cmake new file mode 100644 index 0000000..b66b672 --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/CMP0083-cmp0083_old-check.cmake @@ -0,0 +1,20 @@ + +include ("${RunCMake_TEST_BINARY_DIR}/${RunCMake_TEST_CONFIG}/CMP0083_config.cmake") + + +# retrieve default type of executable +check_executable ("${cmp0083_ref}" ref) + +# POSITION_INDEPENDENT_CODE must not have influence on executable +# pie and no_pie executable must have same type as reference +check_executable ("${cmp0083_old_pie}" old_pie) +if (NOT old_pie STREQUAL ref) + set (RunCMake_TEST_FAILED "CMP0083(OLD) do not produce expected executable.") + return() +endif() + +check_executable ("${cmp0083_old_no_pie}" old_no_pie) +if (NOT old_no_pie STREQUAL ref) + set (RunCMake_TEST_FAILED "CMP0083(OLD) do not produce expected executable.") + return() +endif() diff --git a/Tests/RunCMake/PositionIndependentCode/CMP0083.cmake b/Tests/RunCMake/PositionIndependentCode/CMP0083.cmake new file mode 100644 index 0000000..9713ea4 --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/CMP0083.cmake @@ -0,0 +1,45 @@ + +# create reference to detect default : PIE or not +add_executable (cmp0083_ref main.cpp) + + +set (CMAKE_POSITION_INDEPENDENT_CODE ON) + +cmake_policy(SET CMP0083 NEW) +add_executable (cmp0083_new_pie main.cpp) + + +cmake_policy(SET CMP0083 OLD) +add_executable (cmp0083_old_pie main.cpp) + + +set (CMAKE_POSITION_INDEPENDENT_CODE OFF) + +cmake_policy(SET CMP0083 NEW) +add_executable (cmp0083_new_no_pie main.cpp) + + +cmake_policy(SET CMP0083 OLD) +add_executable (cmp0083_old_no_pie main.cpp) + +# high-level targets +add_custom_target(cmp0083_new) +add_dependencies(cmp0083_new cmp0083_ref cmp0083_new_pie cmp0083_new_no_pie) + +# high-level targets +add_custom_target(cmp0083_old) +add_dependencies(cmp0083_old cmp0083_ref cmp0083_old_pie cmp0083_old_no_pie) + + +# generate file holding paths to executables +file (GENERATE OUTPUT "${CMAKE_BINARY_DIR}/$<CONFIG>/CMP0083_config.cmake" + CONTENT +[==[ +include ("${RunCMake_TEST_SOURCE_DIR}/PIE_validator.cmake") + +set (cmp0083_ref "$<TARGET_FILE:cmp0083_ref>") +set (cmp0083_new_pie "$<TARGET_FILE:cmp0083_new_pie>") +set (cmp0083_old_pie "$<TARGET_FILE:cmp0083_old_pie>") +set (cmp0083_new_no_pie "$<TARGET_FILE:cmp0083_new_no_pie>") +set (cmp0083_old_no_pie "$<TARGET_FILE:cmp0083_old_no_pie>") +]==]) diff --git a/Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake b/Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake new file mode 100644 index 0000000..1e0a2c9 --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/CheckPIESupported.cmake @@ -0,0 +1,12 @@ + +if (CMAKE_CXX_LINK_OPTIONS_PIE) + file(WRITE "${PIE_SUPPORTED}" "\nset(PIE_SUPPORTED TRUE)\n") +else() + file(WRITE "${PIE_SUPPORTED}" "\nset(PIE_SUPPORTED FALSE)\n") +endif() + +if (CMAKE_CXX_LINK_OPTIONS_NO_PIE) + file(APPEND "${PIE_SUPPORTED}" "\nset(NO_PIE_SUPPORTED TRUE)\n") +else() + file(APPEND "${PIE_SUPPORTED}" "\nset(NO_PIE_SUPPORTED FALSE)\n") +endif() diff --git a/Tests/RunCMake/PositionIndependentCode/Genex1-result.txt b/Tests/RunCMake/PositionIndependentCode/Genex1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/Genex1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/PositionIndependentCode/Genex1-stderr.txt b/Tests/RunCMake/PositionIndependentCode/Genex1-stderr.txt new file mode 100644 index 0000000..c242a05 --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/Genex1-stderr.txt @@ -0,0 +1,3 @@ +CMake Error: Property POSITION_INDEPENDENT_CODE on target "conflict1" does +not match the INTERFACE_POSITION_INDEPENDENT_CODE property requirement +of dependency "genex_pic". diff --git a/Tests/RunCMake/PositionIndependentCode/Genex1.cmake b/Tests/RunCMake/PositionIndependentCode/Genex1.cmake new file mode 100644 index 0000000..a91be3e --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/Genex1.cmake @@ -0,0 +1,9 @@ + +add_library(genex_pic UNKNOWN IMPORTED) +# PIC is ON if sibling target is a library, OFF if it is an executable +set_property(TARGET genex_pic PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE $<NOT:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>) + + +add_library(conflict1 STATIC main.cpp) +set_property(TARGET conflict1 PROPERTY POSITION_INDEPENDENT_CODE OFF) +target_link_libraries(conflict1 PRIVATE genex_pic) diff --git a/Tests/RunCMake/PositionIndependentCode/Genex2-result.txt b/Tests/RunCMake/PositionIndependentCode/Genex2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/Genex2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/PositionIndependentCode/Genex2-stderr.txt b/Tests/RunCMake/PositionIndependentCode/Genex2-stderr.txt new file mode 100644 index 0000000..735a926 --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/Genex2-stderr.txt @@ -0,0 +1,3 @@ +CMake Error: Property POSITION_INDEPENDENT_CODE on target "conflict2" does +not match the INTERFACE_POSITION_INDEPENDENT_CODE property requirement +of dependency "genex_pic". diff --git a/Tests/RunCMake/PositionIndependentCode/Genex2.cmake b/Tests/RunCMake/PositionIndependentCode/Genex2.cmake new file mode 100644 index 0000000..fb0a5db --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/Genex2.cmake @@ -0,0 +1,9 @@ + +add_library(genex_pic UNKNOWN IMPORTED) +# PIC is ON if sibling target is a library, OFF if it is an executable +set_property(TARGET genex_pic PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE $<NOT:$<STREQUAL:$<TARGET_PROPERTY:TYPE>,EXECUTABLE>>) + + +add_executable(conflict2 main.cpp) +set_property(TARGET conflict2 PROPERTY POSITION_INDEPENDENT_CODE ON) +target_link_libraries(conflict2 PRIVATE genex_pic) diff --git a/Tests/RunCMake/PositionIndependentCode/PIE-pie_off-check.cmake b/Tests/RunCMake/PositionIndependentCode/PIE-pie_off-check.cmake new file mode 100644 index 0000000..096395c --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/PIE-pie_off-check.cmake @@ -0,0 +1,7 @@ + +include ("${RunCMake_TEST_BINARY_DIR}/${RunCMake_TEST_CONFIG}/PIE_config.cmake") + +check_executable ("${pie_off}" status) +if (NOT status STREQUAL "NO_PIE") + set (RunCMake_TEST_FAILED "Executable is NOT 'no PIE' (${status}).") +endif() diff --git a/Tests/RunCMake/PositionIndependentCode/PIE-pie_on-check.cmake b/Tests/RunCMake/PositionIndependentCode/PIE-pie_on-check.cmake new file mode 100644 index 0000000..bf3d018 --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/PIE-pie_on-check.cmake @@ -0,0 +1,7 @@ + +include ("${RunCMake_TEST_BINARY_DIR}/${RunCMake_TEST_CONFIG}/PIE_config.cmake") + +check_executable ("${pie_on}" status) +if (NOT status STREQUAL "PIE") + set (RunCMake_TEST_FAILED "Executable is NOT 'PIE' (${status}).") +endif() diff --git a/Tests/RunCMake/PositionIndependentCode/PIE.cmake b/Tests/RunCMake/PositionIndependentCode/PIE.cmake new file mode 100644 index 0000000..a9d579d --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/PIE.cmake @@ -0,0 +1,19 @@ + +cmake_policy(SET CMP0083 NEW) + +add_executable (pie_on main.cpp) +set_property(TARGET pie_on PROPERTY POSITION_INDEPENDENT_CODE ON) + +add_executable (pie_off main.cpp) +set_property(TARGET pie_off PROPERTY POSITION_INDEPENDENT_CODE OFF) + + +# generate file holding paths to executables +file (GENERATE OUTPUT "${CMAKE_BINARY_DIR}/$<CONFIG>/PIE_config.cmake" + CONTENT +[==[ +include ("${RunCMake_TEST_SOURCE_DIR}/PIE_validator.cmake") + +set (pie_on "$<TARGET_FILE:pie_on>") +set (pie_off "$<TARGET_FILE:pie_off>") +]==]) diff --git a/Tests/RunCMake/PositionIndependentCode/PIE_validator.cmake b/Tests/RunCMake/PositionIndependentCode/PIE_validator.cmake new file mode 100644 index 0000000..7be35db --- /dev/null +++ b/Tests/RunCMake/PositionIndependentCode/PIE_validator.cmake @@ -0,0 +1,32 @@ + +include_guard(GLOBAL) + +function (CHECK_EXECUTABLE executable result) + set (${result} "UNKNOWN" PARENT_SCOPE) + + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set (tool otool -hv) + else() + set (tool "${CMAKE_COMMAND}" -E env LANG=C LC_ALL=C readelf -lW) + endif() + + execute_process(COMMAND ${tool} "${executable}" + OUTPUT_VARIABLE output + ERROR_VARIABLE output) + + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + if (output MATCHES "( |\t)PIE( |\n|$)") + set (${result} "PIE" PARENT_SCOPE) + else() + set (${result} "NO_PIE" PARENT_SCOPE) + endif() + else() + if (output MATCHES "Elf file type is DYN") + set (${result} "PIE" PARENT_SCOPE) + elseif (output MATCHES "Elf file type is EXEC") + set (${result} "NO_PIE" PARENT_SCOPE) + else() + message(SEND_ERROR "Did not find a known file type") + endif() + endif() +endfunction() diff --git a/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake b/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake index 6a67e3c..6efa0d4 100644 --- a/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake +++ b/Tests/RunCMake/PositionIndependentCode/RunCMakeTest.cmake @@ -7,3 +7,67 @@ run_cmake(Conflict4) run_cmake(Conflict5) run_cmake(Conflict6) run_cmake(Debug) +run_cmake(Genex1) +run_cmake(Genex2) + +set(RunCMake_TEST_OPTIONS "-DPIE_SUPPORTED=${RunCMake_BINARY_DIR}/PIESupported.cmake") +run_cmake(CheckPIESupported) +include ("${RunCMake_BINARY_DIR}/PIESupported.cmake" OPTIONAL) + +if (PIE_SUPPORTED OR NO_PIE_SUPPORTED) + if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|(Free|Net|Open)BSD)$") + # try to locate readelf needed for validation + find_program (READELF NAMES readelf) + endif() + if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + # try to locate otool needed for validation + find_program (OTOOL NAMES otool) + endif() + + if ((READELF OR OTOOL) AND + (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" + OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang" + OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")) + macro(run_cmake_target test subtest) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${test}-build) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_CONFIG Release) + run_cmake_command(${test}-${subtest} ${CMAKE_COMMAND} --build . --config Release --target ${subtest} ${ARGN}) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + endmacro() + + set(RunCMake_TEST_SOURCE_DIR "${RunCMake_SOURCE_DIR}") + set(RunCMake_TEST_OUTPUT_MERGE TRUE) + if (NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) + set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Release) + endif() + + run_cmake(PIE) + if (PIE_SUPPORTED) + run_cmake_target(PIE pie_on) + endif() + if (NO_PIE_SUPPORTED) + run_cmake_target(PIE pie_off) + endif() + + run_cmake(CMP0083) + run_cmake_target(CMP0083 cmp0083_ref) + + # retrieve default mode + include("${RunCMake_SOURCE_DIR}/PIE_validator.cmake") + include("${RunCMake_BINARY_DIR}/CMP0083-build/Release/CMP0083_config.cmake") + check_executable("${cmp0083_ref}" cmp0083_ref_mode) + + if ((cmp0083_ref_mode STREQUAL "PIE" AND NO_PIE_SUPPORTED) + OR (cmp0083_ref_mode STREQUAL "NO_PIE" AND PIE_SUPPORTED)) + run_cmake_target(CMP0083 cmp0083_new) + endif() + run_cmake_target(CMP0083 cmp0083_old) + + unset(RunCMake_TEST_SOURCE_DIR) + unset(RunCMake_TEST_OPTIONS) + unset(RunCMake_TEST_OUTPUT_MERGE) + endif() +endif() diff --git a/Tests/RunCMake/RunCTest.cmake b/Tests/RunCMake/RunCTest.cmake index 89e16ee..98fdf20 100644 --- a/Tests/RunCMake/RunCTest.cmake +++ b/Tests/RunCMake/RunCTest.cmake @@ -3,8 +3,12 @@ include(RunCMake) function(run_ctest CASE_NAME) configure_file(${RunCMake_SOURCE_DIR}/test.cmake.in ${RunCMake_BINARY_DIR}/${CASE_NAME}/test.cmake @ONLY) - configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in - ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake @ONLY) + if(EXISTS "${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in") + configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in + ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake @ONLY) + else() + file(REMOVE ${RunCMake_BINARY_DIR}/${CASE_NAME}/CTestConfig.cmake) + endif() configure_file(${RunCMake_SOURCE_DIR}/CMakeLists.txt.in ${RunCMake_BINARY_DIR}/${CASE_NAME}/CMakeLists.txt @ONLY) run_cmake_command(${CASE_NAME} ${CMAKE_CTEST_COMMAND} diff --git a/Tests/RunCMake/RuntimePath/Relative.cmake b/Tests/RunCMake/RuntimePath/Relative.cmake new file mode 100644 index 0000000..203241f --- /dev/null +++ b/Tests/RunCMake/RuntimePath/Relative.cmake @@ -0,0 +1,69 @@ +enable_language(C) + +if(NOT CMAKE_SHARED_LIBRARY_RPATH_ORIGIN_TOKEN) + if(CMAKE_C_PLATFORM_ID STREQUAL "Linux") + # Sanity check for platform that is definitely known to support $ORIGIN. + message(FATAL_ERROR "Platform fails to report relative RPATH support") + else() + message(STATUS "Platform does not support relative RPATHs, skipping") + endif() + return() +endif() +set(CMAKE_BUILD_RPATH_USE_ORIGIN ON) + +function(CheckRpath target rpath) + add_custom_command( + TARGET ${target} + POST_BUILD + COMMAND ${CMAKE_COMMAND} -Dfile=$<TARGET_FILE:${target}> -Drpath=${rpath} + -P "${CMAKE_CURRENT_SOURCE_DIR}/RelativeCheck.cmake" + VERBATIM + ) +endfunction() + +if(CMAKE_C_COMPILER_ID STREQUAL "XL" AND CMAKE_BINARY_DIR MATCHES " ") + # XL 16.1.0.0 fails building the library if the output path contains a space. + set(externDir) + message(STATUS "Skipping external library test because of a toolchain bug") +else() + get_filename_component(externDir "${CMAKE_BINARY_DIR}" DIRECTORY) + set(externDir "${externDir}/Relative-extern") +endif() + +add_library(utils SHARED A.c) +add_library(utils-sub SHARED A.c) +set_property(TARGET utils-sub PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/libs) +if(externDir) + add_library(utils-extern SHARED A.c) + set_property(TARGET utils-extern PROPERTY LIBRARY_OUTPUT_DIRECTORY ${externDir}) +endif() + +add_executable(main main.c) +target_link_libraries(main utils) +CheckRpath(main "\$ORIGIN") + +add_executable(main-norel main.c) +target_link_libraries(main-norel utils) +set_property(TARGET main-norel PROPERTY BUILD_RPATH_USE_ORIGIN OFF) +CheckRpath(main-norel "${CMAKE_CURRENT_BINARY_DIR}") + +add_executable(mainsub main.c) +target_link_libraries(mainsub utils) +set_property(TARGET mainsub PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) +CheckRpath(mainsub "\$ORIGIN/../") + +add_executable(main-sub main.c) +target_link_libraries(main-sub utils-sub) +CheckRpath(main-sub "\$ORIGIN/libs") + +add_executable(mainsub-sub main.c) +target_link_libraries(mainsub-sub utils-sub) +set_property(TARGET mainsub-sub PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin) +CheckRpath(mainsub-sub "\$ORIGIN/../libs") + +if(externDir) + # Binaries linking to libraries outside the build tree should have an absolute RPATH. + add_executable(main-extern main.c) + target_link_libraries(main-extern utils-extern) + CheckRpath(main-extern "${externDir}") +endif() diff --git a/Tests/RunCMake/RuntimePath/RelativeCheck.cmake b/Tests/RunCMake/RuntimePath/RelativeCheck.cmake new file mode 100644 index 0000000..9ee403f --- /dev/null +++ b/Tests/RunCMake/RuntimePath/RelativeCheck.cmake @@ -0,0 +1,4 @@ +file(RPATH_CHECK FILE "${file}" RPATH "${rpath}") +if(NOT EXISTS "${file}") + message(FATAL_ERROR "RPATH for ${file} did not contain the expected value") +endif() diff --git a/Tests/RunCMake/RuntimePath/RunCMakeTest.cmake b/Tests/RunCMake/RuntimePath/RunCMakeTest.cmake index 3f238f2..6f1baa1 100644 --- a/Tests/RunCMake/RuntimePath/RunCMakeTest.cmake +++ b/Tests/RunCMake/RuntimePath/RunCMakeTest.cmake @@ -16,3 +16,17 @@ function(run_SymlinkImplicit) ${CMAKE_COMMAND} -Ddir=${RunCMake_TEST_BINARY_DIR} -P ${RunCMake_SOURCE_DIR}/SymlinkImplicitCheck.cmake) endfunction() run_SymlinkImplicit() + +function(run_Relative) + # Use a single build tree for a few tests without cleaning. + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/Relative-build) + set(RunCMake_TEST_NO_CLEAN 1) + if(NOT RunCMake_GENERATOR_IS_MULTI_CONFIG) + set(RunCMake_TEST_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + endif() + file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") + file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") + run_cmake(Relative) + run_cmake_command(Relative-build ${CMAKE_COMMAND} --build . --config Debug) +endfunction() +run_Relative() diff --git a/Tests/RunCMake/RuntimePath/main.c b/Tests/RunCMake/RuntimePath/main.c index 8488f4e..181cd09 100644 --- a/Tests/RunCMake/RuntimePath/main.c +++ b/Tests/RunCMake/RuntimePath/main.c @@ -1,4 +1,6 @@ +extern int libA(void); + int main(void) { - return 0; + return libA(); } diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt index 2441a9c..0bcf886 100644 --- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt +++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt @@ -26,6 +26,7 @@ \* CMP0073 \* CMP0076 \* CMP0081 + \* CMP0083 Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt index 6e89104..fec12ae 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadInvalidName-stderr.txt @@ -1,47 +1,47 @@ -^(CMake Error at BadInvalidName1/CMakeLists.txt:2 \(include_directories\): +^(CMake Error at BadInvalidName1/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$<TARGET_PROPERTY:Invali/dTarget,INCLUDE_DIRECTORIES> Target name not supported. -+)+(CMake Error at BadInvalidName2/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName2/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$<TARGET_PROPERTY:Invali/dTarget,Invali/dProperty> Target name and property name not supported. -+)+(CMake Error at BadInvalidName3/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName3/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$<TARGET_PROPERTY:Invali/dProperty> Property name not supported. -+)+(CMake Error at BadInvalidName4/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName4/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$<TARGET_PROPERTY:BadInvalidName4,Invali/dProperty> Property name not supported. -+)+(CMake Error at BadInvalidName5/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName5/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$<TARGET_PROPERTY:,> \$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name and property name. -+)+(CMake Error at BadInvalidName6/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName6/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$<TARGET_PROPERTY:,ValidProperty> \$<TARGET_PROPERTY:tgt,prop> expression requires a non-empty target name. -+)+(CMake Error at BadInvalidName7/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName7/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$<TARGET_PROPERTY:BadInvalidName7,> \$<TARGET_PROPERTY:...> expression requires a non-empty property name. -+)+(CMake Error at BadInvalidName8/CMakeLists.txt:2 \(include_directories\): ++)+(CMake Error at BadInvalidName8/CMakeLists\.txt:[0-9]+ \(include_directories\): Error evaluating generator expression: \$<TARGET_PROPERTY:> diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt index 3adf73e..75865ad 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/BadNonTarget-stderr.txt @@ -5,4 +5,4 @@ CMake Error at BadNonTarget.cmake:7 \(include_directories\): Target "NonExistent" not found. Call Stack \(most recent call first\): - CMakeLists.txt:8 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt index 7e002f5..8bff68e 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle1-stderr.txt @@ -7,4 +7,4 @@ CMake Error at LinkImplementationCycle1.cmake:5 \(target_link_libraries\): target property which is transitive over the link libraries, creating a recursion. Call Stack \(most recent call first\): - CMakeLists.txt:8 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt b/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt index 2f72de6..044b77c 100644 --- a/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt +++ b/Tests/RunCMake/TargetPropertyGeneratorExpressions/LinkImplementationCycle2-stderr.txt @@ -7,4 +7,4 @@ CMake Error at LinkImplementationCycle2.cmake:5 \(target_link_libraries\): target property which is transitive over the link libraries, creating a recursion. Call Stack \(most recent call first\): - CMakeLists.txt:8 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt b/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt index 217c762..bd888ee 100644 --- a/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt +++ b/Tests/RunCMake/TargetSources/CMP0076-WARN-stderr.txt @@ -1,4 +1,4 @@ -CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\): +CMake Warning \(dev\) at CMP0076-WARN/CMakeLists\.txt:[0-9]+ \(target_sources\): Policy CMP0076 is not set: target_sources\(\) command converts relative paths to absolute. Run "cmake --help-policy CMP0076" for policy details. Use the cmake_policy command to set the policy and suppress this warning. @@ -6,7 +6,7 @@ CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\): An interface source of target "publiclib" has a relative path. This warning is for project developers. Use -Wno-dev to suppress it. -CMake Warning \(dev\) at CMP0076-WARN/CMakeLists.txt:2 \(target_sources\): +CMake Warning \(dev\) at CMP0076-WARN/CMakeLists\.txt:[0-9]+ \(target_sources\): Policy CMP0076 is not set: target_sources\(\) command converts relative paths to absolute. Run "cmake --help-policy CMP0076" for policy details. Use the cmake_policy command to set the policy and suppress this warning. diff --git a/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt b/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt index 11bc96c..a40f463 100644 --- a/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt +++ b/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt @@ -4,7 +4,7 @@ CMake Debug Log at OriginDebug.cmake:13 \(add_library\): \* .*Tests/RunCMake/TargetSources/empty_2.cpp Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) .* CMake Debug Log at OriginDebug.cmake:16 \(set_property\): Used sources for target OriginDebug: @@ -12,7 +12,7 @@ CMake Debug Log at OriginDebug.cmake:16 \(set_property\): \* .*Tests/RunCMake/TargetSources/empty_3.cpp Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) .* CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): Used sources for target OriginDebug: @@ -20,7 +20,7 @@ CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): \* .*Tests/RunCMake/TargetSources/empty_4.cpp Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) .* CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): Used sources for target OriginDebug: @@ -28,4 +28,4 @@ CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): \* .*Tests/RunCMake/TargetSources/empty_1.cpp Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt b/Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt index bc8da4c..f0ed577 100644 --- a/Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt +++ b/Tests/RunCMake/UseSWIG/CMP0078-WARN-stderr.txt @@ -1,9 +1,10 @@ -CMake Warning \(dev\) at .*/Modules/UseSWIG.cmake:[0-9]+ \(message\): - Policy CMP0078 is not set. Run "cmake --help-policy CMP0078" for policy - details. Use the cmake_policy command to set the policy and suppress this - warning. +CMake Warning \(dev\) at .*/Modules/UseSWIG\.cmake:[0-9]+ \(message\): + Policy CMP0078 is not set: UseSWIG generates standard target names\. Run + "cmake --help-policy CMP0078" for policy details\. Use the cmake_policy + command to set the policy and suppress this warning\. + Call Stack \(most recent call first\): - CMP0078-common.cmake:6 \(swig_add_library\) - CMP0078-WARN.cmake:1 \(include\) - CMakeLists.txt:3 \(include\) + CMP0078-common\.cmake:6 \(swig_add_library\) + CMP0078-WARN\.cmake:1 \(include\) + CMakeLists\.txt:3 \(include\) This warning is for project developers. Use -Wno-dev to suppress it.$ diff --git a/Tests/RunCMake/WorkingDirectory/CTestConfig.cmake.in b/Tests/RunCMake/WorkingDirectory/CTestConfig.cmake.in deleted file mode 100644 index 0226230..0000000 --- a/Tests/RunCMake/WorkingDirectory/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestTestWorkingDir.@CASE_NAME@") diff --git a/Tests/RunCMake/WriteBasicConfigVersionFile/All.cmake b/Tests/RunCMake/WriteBasicConfigVersionFile/All.cmake new file mode 100644 index 0000000..4253652 --- /dev/null +++ b/Tests/RunCMake/WriteBasicConfigVersionFile/All.cmake @@ -0,0 +1,884 @@ +# Hard-code architecture for test without a real compiler. +set(CMAKE_SIZEOF_VOID_P 4) + +include(WriteBasicConfigVersionFile) + +set(_compatibilities AnyNewerVersion + SameMajorVersion + SameMinorVersion + ExactVersion) + +function(TEST_WRITE_BASIC_CONFIG_VERSION_FILE_PREPARE _version_installed) + set(_same_CMAKE_SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P}) + set(_no_CMAKE_SIZEOF_VOID_P "") + math(EXPR _diff_CMAKE_SIZEOF_VOID_P "${CMAKE_SIZEOF_VOID_P} + 1") + foreach(_compat ${_compatibilities}) + set(_pkg ${_compat}${_version_installed}) + string(REPLACE "." "" _pkg ${_pkg}) + set(_filename "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}ConfigVersion.cmake") + set(_filename_novoid "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}NoVoidConfigVersion.cmake") + set(_filename_diffvoid "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}DiffVoidConfigVersion.cmake") + + set(CMAKE_SIZEOF_VOID_P ${_same_CMAKE_SIZEOF_VOID_P}) + write_basic_config_version_file("${_filename}" + VERSION ${_version_installed} + COMPATIBILITY ${_compat}) + + # Test that an empty CMAKE_SIZEOF_VOID_P is accepted: + set(CMAKE_SIZEOF_VOID_P ${_no_CMAKE_SIZEOF_VOID_P}) + write_basic_config_version_file("${_filename_novoid}" + VERSION ${_version_installed} + COMPATIBILITY ${_compat}) + + # Test that a different CMAKE_SIZEOF_VOID_P results in + # PACKAGE_VERSION_UNSUITABLE + set(CMAKE_SIZEOF_VOID_P ${_diff_CMAKE_SIZEOF_VOID_P}) + write_basic_config_version_file("${_filename_diffvoid}" + VERSION ${_version_installed} + COMPATIBILITY ${_compat}) + endforeach() +endfunction() + +macro(TEST_WRITE_BASIC_CONFIG_VERSION_FILE_CHECK _filename) + include("${_filename}") + + if(_expected_compatible AND NOT PACKAGE_VERSION_COMPATIBLE) + message(SEND_ERROR "Did not find package with version ${_version_installed} (${_version_requested} was requested)!") + elseif(NOT _expected_compatible AND PACKAGE_VERSION_COMPATIBLE) + message(SEND_ERROR "Found package with version ${_version_installed}, but ${_version_requested} was requested!") + endif() + + if(${_expected_exact} AND NOT PACKAGE_VERSION_EXACT) + message(SEND_ERROR "PACKAGE_VERSION_EXACT not set, although it should be!") + elseif(NOT ${_expected_exact} AND PACKAGE_VERSION_EXACT) + message(SEND_ERROR "PACKAGE_VERSION_EXACT set, although it should not be!") + endif() + + if(${_expected_unsuitable} AND NOT PACKAGE_VERSION_UNSUITABLE) + message(SEND_ERROR "PACKAGE_VERSION_UNSUITABLE set, although it should not be!") + elseif(NOT ${_expected_unsuitable} AND PACKAGE_VERSION_UNSUITABLE) + message(SEND_ERROR "PACKAGE_VERSION_UNSUITABLE not set, although it should be!") + endif() + + unset(PACKAGE_VERSION_COMPATIBLE) + unset(PACKAGE_VERSION_EXACT) + unset(PACKAGE_VERSION_UNSUITABLE) +endmacro() + +function(TEST_WRITE_BASIC_CONFIG_VERSION_FILE _version_installed + _version_requested + _expected_compatible_AnyNewerVersion + _expected_compatible_SameMajorVersion + _expected_compatible_SameMinorVersion + _expected_compatible_ExactVersion) + set(PACKAGE_FIND_VERSION ${_version_requested}) + if("${PACKAGE_FIND_VERSION}" MATCHES [[(^([0-9]+)(\.([0-9]+)(\.([0-9]+)(\.([0-9]+))?)?)?)?$]]) + set(PACKAGE_FIND_VERSION_MAJOR "${CMAKE_MATCH_2}") + set(PACKAGE_FIND_VERSION_MINOR "${CMAKE_MATCH_4}") + set(PACKAGE_FIND_VERSION_PATCH "${CMAKE_MATCH_6}") + set(PACKAGE_FIND_VERSION_TWEAK "${CMAKE_MATCH_8}") + else() + message(FATAL_ERROR "_version_requested (${_version_requested}) should be a version number") + endif() + + if ("${_version_installed}" STREQUAL "${_version_requested}") + set(_expected_exact 1) + else() + set(_expected_exact 0) + endif() + + unset(PACKAGE_VERSION_COMPATIBLE) + unset(PACKAGE_VERSION_EXACT) + unset(PACKAGE_VERSION_UNSUITABLE) + + foreach(_compat ${_compatibilities}) + set(_pkg ${_compat}${_version_installed}) + string(REPLACE "." "" _pkg ${_pkg}) + set(_filename "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}ConfigVersion.cmake") + set(_filename_novoid "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}NoVoidConfigVersion.cmake") + set(_filename_diffvoid "${CMAKE_CURRENT_BINARY_DIR}/${_pkg}DiffVoidConfigVersion.cmake") + + set(_expected_compatible ${_expected_compatible_${_compat}}) + + # Test "normal" version + set(_expected_unsuitable 0) + message(STATUS "TEST write_basic_config_version_file(VERSION ${_version_installed} \ +COMPATIBILITY ${_compat}) vs. ${_version_requested} \ +(expected compatible = ${_expected_compatible}, exact = ${_expected_exact}, unsuitable = ${_expected_unsuitable})") + test_write_basic_config_version_file_check("${_filename}") + + # test empty CMAKE_SIZEOF_VOID_P version: + set(_expected_unsuitable 0) + message(STATUS "TEST write_basic_config_version_file(VERSION ${_version_installed} \ +COMPATIBILITY ${_compat}) vs. ${_version_requested} (no CMAKE_SIZEOF_VOID_P) \ +(expected compatible = ${_expected_compatible}, exact = ${_expected_exact}, unsuitable = ${_expected_unsuitable})") + test_write_basic_config_version_file_check("${_filename_novoid}") + + # test different CMAKE_SIZEOF_VOID_P version: + set(_expected_unsuitable 1) + message(STATUS "TEST write_basic_config_version_file(VERSION ${_version_installed} \ +COMPATIBILITY ${_compat}) vs. ${_version_requested} (different CMAKE_SIZEOF_VOID_P) \ +(expected compatible = ${_expected_compatible}, exact = ${_expected_exact}, unsuitable = ${_expected_unsuitable})") + test_write_basic_config_version_file_check("${_filename_diffvoid}") + + endforeach() +endfunction() + + +test_write_basic_config_version_file_prepare(4) +test_write_basic_config_version_file_prepare(4.5) +test_write_basic_config_version_file_prepare(4.5.6) +test_write_basic_config_version_file_prepare(4.5.6.7) + +# AnyNewerVersion +# | SameMajorVersion +# | | SameMinorVersion +# | | | ExactVersion +# | | | | +test_write_basic_config_version_file(4 0 1 0 0 0) # Request 0 +test_write_basic_config_version_file(4 2 1 0 0 0) # Request [older major] +test_write_basic_config_version_file(4 4 1 1 1 1) # Request [same major] +test_write_basic_config_version_file(4 9 0 0 0 0) # Request [newer major] + +test_write_basic_config_version_file(4 0.0 1 0 0 0) # Request 0.0 +test_write_basic_config_version_file(4 0.9 1 0 0 0) # Request 0.[newer minor] +test_write_basic_config_version_file(4 2.0 1 0 0 0) # Request [older major].0 +test_write_basic_config_version_file(4 2.9 1 0 0 0) # Request [older major].[newer minor] +test_write_basic_config_version_file(4 4.0 1 1 0 0) # Request [same major].0 +test_write_basic_config_version_file(4 4.9 0 0 0 0) # Request [same major].[newer minor] +test_write_basic_config_version_file(4 9.0 0 0 0 0) # Request [newer major].0 +test_write_basic_config_version_file(4 9.9 0 0 0 0) # Request [newer major].[newer minor] + +test_write_basic_config_version_file(4 0.0.0 1 0 0 0) # Request 0.0.0 +test_write_basic_config_version_file(4 0.0.9 1 0 0 0) # Request 0.0.[newer patch] +test_write_basic_config_version_file(4 0.9.0 1 0 0 0) # Request 0.[newer minor].0 +test_write_basic_config_version_file(4 0.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch] +test_write_basic_config_version_file(4 2.0.0 1 0 0 0) # Request [older major].0.0 +test_write_basic_config_version_file(4 2.0.9 1 0 0 0) # Request [older major].0.[newer patch] +test_write_basic_config_version_file(4 2.9.0 1 0 0 0) # Request [older major].[newer minor].0 +test_write_basic_config_version_file(4 2.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch] +test_write_basic_config_version_file(4 4.0.0 1 1 0 0) # Request [same major].0.0 +test_write_basic_config_version_file(4 4.0.9 0 0 0 0) # Request [same major].0.[newer patch] +test_write_basic_config_version_file(4 4.9.0 0 0 0 0) # Request [same major].[newer minor].0 +test_write_basic_config_version_file(4 4.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch] +test_write_basic_config_version_file(4 9.0.0 0 0 0 0) # Request [newer major].0.0 +test_write_basic_config_version_file(4 9.0.9 0 0 0 0) # Request [newer major].0.[newer patch] +test_write_basic_config_version_file(4 9.9.0 0 0 0 0) # Request [newer major].[newer minor].0 +test_write_basic_config_version_file(4 9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch] + +test_write_basic_config_version_file(4 0.0.0.0 1 0 0 0) # Request 0.0.0.0 +test_write_basic_config_version_file(4 0.0.0.9 1 0 0 0) # Request 0.0.0.[newer tweak] +test_write_basic_config_version_file(4 0.0.9.0 1 0 0 0) # Request 0.0.[newer patch].0 +test_write_basic_config_version_file(4 0.0.9.9 1 0 0 0) # Request 0.0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4 0.9.0.0 1 0 0 0) # Request 0.[newer minor].0.0 +test_write_basic_config_version_file(4 0.9.0.9 1 0 0 0) # Request 0.[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4 0.9.9.0 1 0 0 0) # Request 0.[newer minor].[newer patch].0 +test_write_basic_config_version_file(4 0.9.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4 2.0.0.0 1 0 0 0) # Request [older major].0.0.0 +test_write_basic_config_version_file(4 2.0.0.9 1 0 0 0) # Request [older major].0.0.[newer tweak] +test_write_basic_config_version_file(4 2.0.9.0 1 0 0 0) # Request [older major].0.[newer patch].0 +test_write_basic_config_version_file(4 2.0.9.9 1 0 0 0) # Request [older major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4 2.9.0.0 1 0 0 0) # Request [older major].[newer minor].0.0 +test_write_basic_config_version_file(4 2.9.0.9 1 0 0 0) # Request [older major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4 2.9.9.0 1 0 0 0) # Request [older major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4 2.9.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4 4.0.0.0 1 1 0 0) # Request [same major].0.0.0 +test_write_basic_config_version_file(4 4.0.0.9 0 0 0 0) # Request [same major].0.0.[newer tweak] +test_write_basic_config_version_file(4 4.0.9.0 0 0 0 0) # Request [same major].0.[newer patch].0 +test_write_basic_config_version_file(4 4.0.9.9 0 0 0 0) # Request [same major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4 4.9.0.0 0 0 0 0) # Request [same major].[newer minor].0.0 +test_write_basic_config_version_file(4 4.9.0.9 0 0 0 0) # Request [same major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4 4.9.9.0 0 0 0 0) # Request [same major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4 4.9.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4 9.0.0.0 0 0 0 0) # Request [newer major].0.0.0 +test_write_basic_config_version_file(4 9.0.0.9 0 0 0 0) # Request [newer major].0.0.[newer tweak] +test_write_basic_config_version_file(4 9.0.9.0 0 0 0 0) # Request [newer major].0.[newer patch].0 +test_write_basic_config_version_file(4 9.0.9.9 0 0 0 0) # Request [newer major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4 9.9.0.0 0 0 0 0) # Request [newer major].[newer minor].0.0 +test_write_basic_config_version_file(4 9.9.0.9 0 0 0 0) # Request [newer major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4 9.9.9.0 0 0 0 0) # Request [newer major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4 9.9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[newer tweak] + + + +test_write_basic_config_version_file(4.5 0 1 0 0 0) # Request 0 +test_write_basic_config_version_file(4.5 2 1 0 0 0) # Request [older major] +test_write_basic_config_version_file(4.5 4 1 1 0 0) # Request [same major] +test_write_basic_config_version_file(4.5 9 0 0 0 0) # Request [newer major] + +test_write_basic_config_version_file(4.5 0.0 1 0 0 0) # Request 0.0 +test_write_basic_config_version_file(4.5 0.2 1 0 0 0) # Request 0.[older minor] +test_write_basic_config_version_file(4.5 0.5 1 0 0 0) # Request 0.[same minor] +test_write_basic_config_version_file(4.5 0.9 1 0 0 0) # Request 0.[newer minor] +test_write_basic_config_version_file(4.5 2.0 1 0 0 0) # Request [older major].0 +test_write_basic_config_version_file(4.5 2.2 1 0 0 0) # Request [older major].[older minor] +test_write_basic_config_version_file(4.5 2.5 1 0 0 0) # Request [older major].[same minor] +test_write_basic_config_version_file(4.5 2.9 1 0 0 0) # Request [older major].[newer minor] +test_write_basic_config_version_file(4.5 4.0 1 1 0 0) # Request [same major].0 +test_write_basic_config_version_file(4.5 4.2 1 1 0 0) # Request [same major].[older minor] +test_write_basic_config_version_file(4.5 4.5 1 1 1 1) # Request [same major].[same minor] +test_write_basic_config_version_file(4.5 4.9 0 0 0 0) # Request [same major].[newer minor] +test_write_basic_config_version_file(4.5 9.0 0 0 0 0) # Request [newer major].0 +test_write_basic_config_version_file(4.5 9.1 0 0 0 0) # Request [newer major].[older minor] +test_write_basic_config_version_file(4.5 9.5 0 0 0 0) # Request [newer major].[same minor] +test_write_basic_config_version_file(4.5 9.9 0 0 0 0) # Request [newer major].[newer minor] + +test_write_basic_config_version_file(4.5 0.0.0 1 0 0 0) # Request 0.0.0 +test_write_basic_config_version_file(4.5 0.0.9 1 0 0 0) # Request 0.0.[newer patch] +test_write_basic_config_version_file(4.5 0.2.0 1 0 0 0) # Request 0.[older minor].0 +test_write_basic_config_version_file(4.5 0.2.9 1 0 0 0) # Request 0.[older minor].[newer patch] +test_write_basic_config_version_file(4.5 0.5.0 1 0 0 0) # Request 0.[same minor].0 +test_write_basic_config_version_file(4.5 0.5.9 1 0 0 0) # Request 0.[same minor].[newer patch] +test_write_basic_config_version_file(4.5 0.9.0 1 0 0 0) # Request 0.[newer minor].0 +test_write_basic_config_version_file(4.5 0.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch] +test_write_basic_config_version_file(4.5 2.0.0 1 0 0 0) # Request [older major].0.0 +test_write_basic_config_version_file(4.5 2.0.9 1 0 0 0) # Request [older major].0.[newer patch] +test_write_basic_config_version_file(4.5 2.2.0 1 0 0 0) # Request [older major].[older minor].0 +test_write_basic_config_version_file(4.5 2.2.9 1 0 0 0) # Request [older major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5 2.5.0 1 0 0 0) # Request [older major].[same minor].0 +test_write_basic_config_version_file(4.5 2.5.9 1 0 0 0) # Request [older major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5 2.9.0 1 0 0 0) # Request [older major].[newer minor].0 +test_write_basic_config_version_file(4.5 2.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch] +test_write_basic_config_version_file(4.5 4.0.0 1 1 0 0) # Request [same major].0.0 +test_write_basic_config_version_file(4.5 4.0.9 1 1 0 0) # Request [same major].0.[newer patch] +test_write_basic_config_version_file(4.5 4.2.0 1 1 0 0) # Request [same major].[older minor].0 +test_write_basic_config_version_file(4.5 4.2.9 1 1 0 0) # Request [same major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5 4.5.0 1 1 1 0) # Request [same major].[same minor].0 +test_write_basic_config_version_file(4.5 4.5.9 0 0 0 0) # Request [same major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5 4.9.0 0 0 0 0) # Request [same major].[newer minor].0 +test_write_basic_config_version_file(4.5 4.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch] +test_write_basic_config_version_file(4.5 9.0.0 0 0 0 0) # Request [newer major].0.0 +test_write_basic_config_version_file(4.5 9.0.9 0 0 0 0) # Request [newer major].0.[newer patch] +test_write_basic_config_version_file(4.5 9.2.0 0 0 0 0) # Request [newer major].[older minor].0 +test_write_basic_config_version_file(4.5 9.2.9 0 0 0 0) # Request [newer major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5 9.5.0 0 0 0 0) # Request [newer major].[same minor].0 +test_write_basic_config_version_file(4.5 9.5.9 0 0 0 0) # Request [newer major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5 9.9.0 0 0 0 0) # Request [newer major].[newer minor].0 +test_write_basic_config_version_file(4.5 9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch] + +test_write_basic_config_version_file(4.5 0.0.0.0 1 0 0 0) # Request 0.0.0.0 +test_write_basic_config_version_file(4.5 0.0.0.9 1 0 0 0) # Request 0.0.0.[newer tweak] +test_write_basic_config_version_file(4.5 0.0.9.0 1 0 0 0) # Request 0.0.[newer patch].0 +test_write_basic_config_version_file(4.5 0.0.9.9 1 0 0 0) # Request 0.0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 0.2.0.0 1 0 0 0) # Request 0.[older minor].0.0 +test_write_basic_config_version_file(4.5 0.2.0.9 1 0 0 0) # Request 0.[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 0.2.9.0 1 0 0 0) # Request 0.[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5 0.2.9.9 1 0 0 0) # Request 0.[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 0.5.0.0 1 0 0 0) # Request 0.[same minor].0.0 +test_write_basic_config_version_file(4.5 0.5.0.9 1 0 0 0) # Request 0.[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 0.5.9.0 1 0 0 0) # Request 0.[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5 0.5.9.9 1 0 0 0) # Request 0.[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 0.9.0.0 1 0 0 0) # Request 0.[newer minor].0.0 +test_write_basic_config_version_file(4.5 0.9.0.9 1 0 0 0) # Request 0.[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 0.9.9.0 1 0 0 0) # Request 0.[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5 0.9.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 2.0.0.0 1 0 0 0) # Request [older major].0.0.0 +test_write_basic_config_version_file(4.5 2.0.0.9 1 0 0 0) # Request [older major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5 2.0.9.0 1 0 0 0) # Request [older major].0.[newer patch].0 +test_write_basic_config_version_file(4.5 2.0.9.9 1 0 0 0) # Request [older major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 2.2.0.0 1 0 0 0) # Request [older major].[older minor].0.0 +test_write_basic_config_version_file(4.5 2.2.0.9 1 0 0 0) # Request [older major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 2.2.9.0 1 0 0 0) # Request [older major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5 2.2.9.9 1 0 0 0) # Request [older major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 2.5.0.0 1 0 0 0) # Request [older major].[same minor].0.0 +test_write_basic_config_version_file(4.5 2.5.0.9 1 0 0 0) # Request [older major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 2.5.9.0 1 0 0 0) # Request [older major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5 2.5.9.9 1 0 0 0) # Request [older major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 2.9.0.0 1 0 0 0) # Request [older major].[newer minor].0.0 +test_write_basic_config_version_file(4.5 2.9.0.9 1 0 0 0) # Request [older major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 2.9.9.0 1 0 0 0) # Request [older major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5 2.9.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 4.0.0.0 1 1 0 0) # Request [same major].0.0.0 +test_write_basic_config_version_file(4.5 4.0.0.9 1 1 0 0) # Request [same major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5 4.0.9.0 1 1 0 0) # Request [same major].0.[newer patch].0 +test_write_basic_config_version_file(4.5 4.0.9.9 1 1 0 0) # Request [same major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 4.2.0.0 1 1 0 0) # Request [same major].[older minor].0.0 +test_write_basic_config_version_file(4.5 4.2.0.9 1 1 0 0) # Request [same major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 4.2.9.0 1 1 0 0) # Request [same major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5 4.2.9.9 1 1 0 0) # Request [same major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 4.5.0.0 1 1 1 0) # Request [same major].[same minor].0.0 +test_write_basic_config_version_file(4.5 4.5.0.9 0 0 0 0) # Request [same major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 4.5.9.0 0 0 0 0) # Request [same major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5 4.5.9.9 0 0 0 0) # Request [same major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 4.9.0.0 0 0 0 0) # Request [same major].[newer minor].0.0 +test_write_basic_config_version_file(4.5 4.9.0.9 0 0 0 0) # Request [same major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 4.9.9.0 0 0 0 0) # Request [same major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5 4.9.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 9.0.0.0 0 0 0 0) # Request [newer major].0.0.0 +test_write_basic_config_version_file(4.5 9.0.0.9 0 0 0 0) # Request [newer major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5 9.0.9.0 0 0 0 0) # Request [newer major].0.[newer patch].0 +test_write_basic_config_version_file(4.5 9.0.9.9 0 0 0 0) # Request [newer major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 9.2.0.0 0 0 0 0) # Request [newer major].[older minor].0.0 +test_write_basic_config_version_file(4.5 9.2.0.9 0 0 0 0) # Request [newer major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 9.2.9.0 0 0 0 0) # Request [newer major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5 9.2.9.9 0 0 0 0) # Request [newer major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 9.5.0.0 0 0 0 0) # Request [newer major].[same minor].0.0 +test_write_basic_config_version_file(4.5 9.5.0.9 0 0 0 0) # Request [newer major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 9.5.9.0 0 0 0 0) # Request [newer major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5 9.5.9.9 0 0 0 0) # Request [newer major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5 9.9.0.0 0 0 0 0) # Request [newer major].[newer minor].0.0 +test_write_basic_config_version_file(4.5 9.9.0.9 0 0 0 0) # Request [newer major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5 9.9.9.0 0 0 0 0) # Request [newer major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5 9.9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[newer tweak] + + +test_write_basic_config_version_file(4.5.6 0 1 0 0 0) # Request 0 +test_write_basic_config_version_file(4.5.6 2 1 0 0 0) # Request [older major] +test_write_basic_config_version_file(4.5.6 4 1 1 0 0) # Request [same major] +test_write_basic_config_version_file(4.5.6 9 0 0 0 0) # Request [newer major] + +test_write_basic_config_version_file(4.5.6 0.0 1 0 0 0) # Request 0.0 +test_write_basic_config_version_file(4.5.6 0.2 1 0 0 0) # Request 0.[older minor] +test_write_basic_config_version_file(4.5.6 0.5 1 0 0 0) # Request 0.[same minor] +test_write_basic_config_version_file(4.5.6 0.9 1 0 0 0) # Request 0.[newer minor] +test_write_basic_config_version_file(4.5.6 2.0 1 0 0 0) # Request [older major].0 +test_write_basic_config_version_file(4.5.6 2.2 1 0 0 0) # Request [older major].[older minor] +test_write_basic_config_version_file(4.5.6 2.5 1 0 0 0) # Request [older major].[same minor] +test_write_basic_config_version_file(4.5.6 2.9 1 0 0 0) # Request [older major].[newer minor] +test_write_basic_config_version_file(4.5.6 4.0 1 1 0 0) # Request [same major].0 +test_write_basic_config_version_file(4.5.6 4.2 1 1 0 0) # Request [same major].[older minor] +test_write_basic_config_version_file(4.5.6 4.5 1 1 1 0) # Request [same major].[same minor] +test_write_basic_config_version_file(4.5.6 4.9 0 0 0 0) # Request [same major].[newer minor] +test_write_basic_config_version_file(4.5.6 9.0 0 0 0 0) # Request [newer major].0 +test_write_basic_config_version_file(4.5.6 9.1 0 0 0 0) # Request [newer major].[older minor] +test_write_basic_config_version_file(4.5.6 9.5 0 0 0 0) # Request [newer major].[same minor] +test_write_basic_config_version_file(4.5.6 9.9 0 0 0 0) # Request [newer major].[newer minor] + +test_write_basic_config_version_file(4.5.6 0.0.0 1 0 0 0) # Request 0.0.0 +test_write_basic_config_version_file(4.5.6 0.0.2 1 0 0 0) # Request 0.0.[older patch] +test_write_basic_config_version_file(4.5.6 0.0.6 1 0 0 0) # Request 0.0.[same patch] +test_write_basic_config_version_file(4.5.6 0.0.9 1 0 0 0) # Request 0.0.[newer patch] +test_write_basic_config_version_file(4.5.6 0.2.0 1 0 0 0) # Request 0.[older minor].0 +test_write_basic_config_version_file(4.5.6 0.2.2 1 0 0 0) # Request 0.[older minor].[older patch] +test_write_basic_config_version_file(4.5.6 0.2.6 1 0 0 0) # Request 0.[older minor].[same patch] +test_write_basic_config_version_file(4.5.6 0.2.9 1 0 0 0) # Request 0.[older minor].[newer patch] +test_write_basic_config_version_file(4.5.6 0.5.0 1 0 0 0) # Request 0.[same minor].0 +test_write_basic_config_version_file(4.5.6 0.5.2 1 0 0 0) # Request 0.[same minor].[older patch] +test_write_basic_config_version_file(4.5.6 0.5.6 1 0 0 0) # Request 0.[same minor].[same patch] +test_write_basic_config_version_file(4.5.6 0.5.9 1 0 0 0) # Request 0.[same minor].[newer patch] +test_write_basic_config_version_file(4.5.6 0.9.0 1 0 0 0) # Request 0.[newer minor].0 +test_write_basic_config_version_file(4.5.6 0.9.2 1 0 0 0) # Request 0.[newer minor].[older patch] +test_write_basic_config_version_file(4.5.6 0.9.6 1 0 0 0) # Request 0.[newer minor].[same patch] +test_write_basic_config_version_file(4.5.6 0.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch] +test_write_basic_config_version_file(4.5.6 2.0.0 1 0 0 0) # Request [older major].0.0 +test_write_basic_config_version_file(4.5.6 2.0.2 1 0 0 0) # Request [older major].0.[older patch] +test_write_basic_config_version_file(4.5.6 2.0.6 1 0 0 0) # Request [older major].0.[same patch] +test_write_basic_config_version_file(4.5.6 2.0.9 1 0 0 0) # Request [older major].0.[newer patch] +test_write_basic_config_version_file(4.5.6 2.2.0 1 0 0 0) # Request [older major].[older minor].0 +test_write_basic_config_version_file(4.5.6 2.2.2 1 0 0 0) # Request [older major].[older minor].[older patch] +test_write_basic_config_version_file(4.5.6 2.2.6 1 0 0 0) # Request [older major].[older minor].[same patch] +test_write_basic_config_version_file(4.5.6 2.2.9 1 0 0 0) # Request [older major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5.6 2.5.0 1 0 0 0) # Request [older major].[same minor].0 +test_write_basic_config_version_file(4.5.6 2.5.2 1 0 0 0) # Request [older major].[same minor].[older patch] +test_write_basic_config_version_file(4.5.6 2.5.6 1 0 0 0) # Request [older major].[same minor].[same patch] +test_write_basic_config_version_file(4.5.6 2.5.9 1 0 0 0) # Request [older major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5.6 2.9.0 1 0 0 0) # Request [older major].[newer minor].0 +test_write_basic_config_version_file(4.5.6 2.9.2 1 0 0 0) # Request [older major].[newer minor].[older patch] +test_write_basic_config_version_file(4.5.6 2.9.6 1 0 0 0) # Request [older major].[newer minor].[same patch] +test_write_basic_config_version_file(4.5.6 2.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch] +test_write_basic_config_version_file(4.5.6 4.0.0 1 1 0 0) # Request [same major].0.0 +test_write_basic_config_version_file(4.5.6 4.0.2 1 1 0 0) # Request [same major].0.[older patch] +test_write_basic_config_version_file(4.5.6 4.0.6 1 1 0 0) # Request [same major].0.[same patch] +test_write_basic_config_version_file(4.5.6 4.0.9 1 1 0 0) # Request [same major].0.[newer patch] +test_write_basic_config_version_file(4.5.6 4.2.0 1 1 0 0) # Request [same major].[older minor].0 +test_write_basic_config_version_file(4.5.6 4.2.2 1 1 0 0) # Request [same major].[older minor].[older patch] +test_write_basic_config_version_file(4.5.6 4.2.6 1 1 0 0) # Request [same major].[older minor].[same patch] +test_write_basic_config_version_file(4.5.6 4.2.9 1 1 0 0) # Request [same major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5.6 4.5.0 1 1 1 0) # Request [same major].[same minor].0 +test_write_basic_config_version_file(4.5.6 4.5.2 1 1 1 0) # Request [same major].[same minor].[older patch] +test_write_basic_config_version_file(4.5.6 4.5.6 1 1 1 1) # Request [same major].[same minor].[same patch] +test_write_basic_config_version_file(4.5.6 4.5.9 0 0 0 0) # Request [same major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5.6 4.9.0 0 0 0 0) # Request [same major].[newer minor].0 +test_write_basic_config_version_file(4.5.6 4.9.2 0 0 0 0) # Request [same major].[newer minor].[older patch] +test_write_basic_config_version_file(4.5.6 4.9.6 0 0 0 0) # Request [same major].[newer minor].[same patch] +test_write_basic_config_version_file(4.5.6 4.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch] +test_write_basic_config_version_file(4.5.6 9.0.0 0 0 0 0) # Request [newer major].0.0 +test_write_basic_config_version_file(4.5.6 9.0.2 0 0 0 0) # Request [newer major].0.[older patch] +test_write_basic_config_version_file(4.5.6 9.0.6 0 0 0 0) # Request [newer major].0.[same patch] +test_write_basic_config_version_file(4.5.6 9.0.9 0 0 0 0) # Request [newer major].0.[newer patch] +test_write_basic_config_version_file(4.5.6 9.2.0 0 0 0 0) # Request [newer major].[older minor].0 +test_write_basic_config_version_file(4.5.6 9.2.2 0 0 0 0) # Request [newer major].[older minor].[older patch] +test_write_basic_config_version_file(4.5.6 9.2.6 0 0 0 0) # Request [newer major].[older minor].[same patch] +test_write_basic_config_version_file(4.5.6 9.2.9 0 0 0 0) # Request [newer major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5.6 9.5.0 0 0 0 0) # Request [newer major].[same minor].0 +test_write_basic_config_version_file(4.5.6 9.5.2 0 0 0 0) # Request [newer major].[same minor].[older patch] +test_write_basic_config_version_file(4.5.6 9.5.6 0 0 0 0) # Request [newer major].[same minor].[same patch] +test_write_basic_config_version_file(4.5.6 9.5.9 0 0 0 0) # Request [newer major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5.6 9.9.0 0 0 0 0) # Request [newer major].[newer minor].0 +test_write_basic_config_version_file(4.5.6 9.9.2 0 0 0 0) # Request [newer major].[newer minor].[older patch] +test_write_basic_config_version_file(4.5.6 9.9.6 0 0 0 0) # Request [newer major].[newer minor].[same patch] +test_write_basic_config_version_file(4.5.6 9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch] + +test_write_basic_config_version_file(4.5.6 0.0.0.0 1 0 0 0) # Request 0.0.0.0 +test_write_basic_config_version_file(4.5.6 0.0.0.9 1 0 0 0) # Request 0.0.0.[newer tweak] +test_write_basic_config_version_file(4.5.6 0.0.2.0 1 0 0 0) # Request 0.0.[older patch].0 +test_write_basic_config_version_file(4.5.6 0.0.2.9 1 0 0 0) # Request 0.0.[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.0.6.0 1 0 0 0) # Request 0.0.[same patch].0 +test_write_basic_config_version_file(4.5.6 0.0.6.9 1 0 0 0) # Request 0.0.[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.0.9.0 1 0 0 0) # Request 0.0.[newer patch].0 +test_write_basic_config_version_file(4.5.6 0.0.9.9 1 0 0 0) # Request 0.0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.2.0.0 1 0 0 0) # Request 0.[older minor].0.0 +test_write_basic_config_version_file(4.5.6 0.2.0.9 1 0 0 0) # Request 0.[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 0.2.2.0 1 0 0 0) # Request 0.[older minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 0.2.2.9 1 0 0 0) # Request 0.[older minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.2.6.0 1 0 0 0) # Request 0.[older minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 0.2.6.9 1 0 0 0) # Request 0.[older minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.2.9.0 1 0 0 0) # Request 0.[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 0.2.9.9 1 0 0 0) # Request 0.[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.5.0.0 1 0 0 0) # Request 0.[same minor].0.0 +test_write_basic_config_version_file(4.5.6 0.5.0.9 1 0 0 0) # Request 0.[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 0.5.2.0 1 0 0 0) # Request 0.[same minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 0.5.2.9 1 0 0 0) # Request 0.[same minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.5.6.0 1 0 0 0) # Request 0.[same minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 0.5.6.9 1 0 0 0) # Request 0.[same minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.5.9.0 1 0 0 0) # Request 0.[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 0.5.9.9 1 0 0 0) # Request 0.[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.9.0.0 1 0 0 0) # Request 0.[newer minor].0.0 +test_write_basic_config_version_file(4.5.6 0.9.0.9 1 0 0 0) # Request 0.[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 0.9.2.0 1 0 0 0) # Request 0.[newer minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 0.9.2.9 1 0 0 0) # Request 0.[newer minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.9.6.0 1 0 0 0) # Request 0.[newer minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 0.9.6.9 1 0 0 0) # Request 0.[newer minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 0.9.9.0 1 0 0 0) # Request 0.[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 0.9.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.0.0.0 1 0 0 0) # Request [older major].0.0.0 +test_write_basic_config_version_file(4.5.6 2.0.0.9 1 0 0 0) # Request [older major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5.6 2.0.2.0 1 0 0 0) # Request [older major].0.[older patch].0 +test_write_basic_config_version_file(4.5.6 2.0.2.9 1 0 0 0) # Request [older major].0.[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.0.6.0 1 0 0 0) # Request [older major].0.[same patch].0 +test_write_basic_config_version_file(4.5.6 2.0.6.9 1 0 0 0) # Request [older major].0.[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.0.9.0 1 0 0 0) # Request [older major].0.[newer patch].0 +test_write_basic_config_version_file(4.5.6 2.0.9.9 1 0 0 0) # Request [older major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.2.0.0 1 0 0 0) # Request [older major].[older minor].0.0 +test_write_basic_config_version_file(4.5.6 2.2.0.9 1 0 0 0) # Request [older major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 2.2.2.0 1 0 0 0) # Request [older major].[older minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 2.2.2.9 1 0 0 0) # Request [older major].[older minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.2.6.0 1 0 0 0) # Request [older major].[older minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 2.2.6.9 1 0 0 0) # Request [older major].[older minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.2.9.0 1 0 0 0) # Request [older major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 2.2.9.9 1 0 0 0) # Request [older major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.5.0.0 1 0 0 0) # Request [older major].[same minor].0.0 +test_write_basic_config_version_file(4.5.6 2.5.0.9 1 0 0 0) # Request [older major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 2.5.2.0 1 0 0 0) # Request [older major].[same minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 2.5.2.9 1 0 0 0) # Request [older major].[same minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.5.6.0 1 0 0 0) # Request [older major].[same minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 2.5.6.9 1 0 0 0) # Request [older major].[same minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.5.9.0 1 0 0 0) # Request [older major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 2.5.9.9 1 0 0 0) # Request [older major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.9.0.0 1 0 0 0) # Request [older major].[newer minor].0.0 +test_write_basic_config_version_file(4.5.6 2.9.0.9 1 0 0 0) # Request [older major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 2.9.2.0 1 0 0 0) # Request [older major].[newer minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 2.9.2.9 1 0 0 0) # Request [older major].[newer minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.9.6.0 1 0 0 0) # Request [older major].[newer minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 2.9.6.9 1 0 0 0) # Request [older major].[newer minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 2.9.9.0 1 0 0 0) # Request [older major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 2.9.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.0.0.0 1 1 0 0) # Request [same major].0.0.0 +test_write_basic_config_version_file(4.5.6 4.0.0.9 1 1 0 0) # Request [same major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5.6 4.0.2.0 1 1 0 0) # Request [same major].0.[older patch].0 +test_write_basic_config_version_file(4.5.6 4.0.2.9 1 1 0 0) # Request [same major].0.[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.0.6.0 1 1 0 0) # Request [same major].0.[same patch].0 +test_write_basic_config_version_file(4.5.6 4.0.6.9 1 1 0 0) # Request [same major].0.[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.0.9.0 1 1 0 0) # Request [same major].0.[newer patch].0 +test_write_basic_config_version_file(4.5.6 4.0.9.9 1 1 0 0) # Request [same major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.2.0.0 1 1 0 0) # Request [same major].[older minor].0.0 +test_write_basic_config_version_file(4.5.6 4.2.0.9 1 1 0 0) # Request [same major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 4.2.2.0 1 1 0 0) # Request [same major].[older minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 4.2.2.9 1 1 0 0) # Request [same major].[older minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.2.6.0 1 1 0 0) # Request [same major].[older minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 4.2.6.9 1 1 0 0) # Request [same major].[older minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.2.9.0 1 1 0 0) # Request [same major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 4.2.9.9 1 1 0 0) # Request [same major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.5.0.0 1 1 1 0) # Request [same major].[same minor].0.0 +test_write_basic_config_version_file(4.5.6 4.5.0.9 1 1 1 0) # Request [same major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 4.5.2.0 1 1 1 0) # Request [same major].[same minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 4.5.2.9 1 1 1 0) # Request [same major].[same minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.5.6.0 1 1 1 1) # Request [same major].[same minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 4.5.6.9 0 0 0 1) # Request [same major].[same minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.5.9.0 0 0 0 0) # Request [same major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 4.5.9.9 0 0 0 0) # Request [same major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.9.0.0 0 0 0 0) # Request [same major].[newer minor].0.0 +test_write_basic_config_version_file(4.5.6 4.9.0.9 0 0 0 0) # Request [same major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 4.9.2.0 0 0 0 0) # Request [same major].[newer minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 4.9.2.9 0 0 0 0) # Request [same major].[newer minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.9.6.0 0 0 0 0) # Request [same major].[newer minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 4.9.6.9 0 0 0 0) # Request [same major].[newer minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 4.9.9.0 0 0 0 0) # Request [same major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 4.9.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.0.0.0 0 0 0 0) # Request [newer major].0.0.0 +test_write_basic_config_version_file(4.5.6 9.0.0.9 0 0 0 0) # Request [newer major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5.6 9.0.2.0 0 0 0 0) # Request [newer major].0.[older patch].0 +test_write_basic_config_version_file(4.5.6 9.0.2.9 0 0 0 0) # Request [newer major].0.[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.0.6.0 0 0 0 0) # Request [newer major].0.[same patch].0 +test_write_basic_config_version_file(4.5.6 9.0.6.9 0 0 0 0) # Request [newer major].0.[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.0.9.0 0 0 0 0) # Request [newer major].0.[newer patch].0 +test_write_basic_config_version_file(4.5.6 9.0.9.9 0 0 0 0) # Request [newer major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.2.0.0 0 0 0 0) # Request [newer major].[older minor].0.0 +test_write_basic_config_version_file(4.5.6 9.2.0.9 0 0 0 0) # Request [newer major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 9.2.2.0 0 0 0 0) # Request [newer major].[older minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 9.2.2.9 0 0 0 0) # Request [newer major].[older minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.2.6.0 0 0 0 0) # Request [newer major].[older minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 9.2.6.9 0 0 0 0) # Request [newer major].[older minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.2.9.0 0 0 0 0) # Request [newer major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 9.2.9.9 0 0 0 0) # Request [newer major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.5.0.0 0 0 0 0) # Request [newer major].[same minor].0.0 +test_write_basic_config_version_file(4.5.6 9.5.0.9 0 0 0 0) # Request [newer major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 9.5.2.0 0 0 0 0) # Request [newer major].[same minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 9.5.2.9 0 0 0 0) # Request [newer major].[same minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.5.6.0 0 0 0 0) # Request [newer major].[same minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 9.5.6.9 0 0 0 0) # Request [newer major].[same minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.5.9.0 0 0 0 0) # Request [newer major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 9.5.9.9 0 0 0 0) # Request [newer major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.9.0.0 0 0 0 0) # Request [newer major].[newer minor].0.0 +test_write_basic_config_version_file(4.5.6 9.9.0.9 0 0 0 0) # Request [newer major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6 9.9.2.0 0 0 0 0) # Request [newer major].[newer minor].[older patch].0 +test_write_basic_config_version_file(4.5.6 9.9.2.9 0 0 0 0) # Request [newer major].[newer minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.9.6.0 0 0 0 0) # Request [newer major].[newer minor].[same patch].0 +test_write_basic_config_version_file(4.5.6 9.9.6.9 0 0 0 0) # Request [newer major].[newer minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6 9.9.9.0 0 0 0 0) # Request [newer major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6 9.9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[newer tweak] + + +test_write_basic_config_version_file(4.5.6.7 0 1 0 0 0) # Request 0 +test_write_basic_config_version_file(4.5.6.7 2 1 0 0 0) # Request [older major] +test_write_basic_config_version_file(4.5.6.7 4 1 1 0 0) # Request [same major] +test_write_basic_config_version_file(4.5.6.7 9 0 0 0 0) # Request [newer major] + +test_write_basic_config_version_file(4.5.6.7 0.0 1 0 0 0) # Request 0.0 +test_write_basic_config_version_file(4.5.6.7 0.2 1 0 0 0) # Request 0.[older minor] +test_write_basic_config_version_file(4.5.6.7 0.5 1 0 0 0) # Request 0.[same minor] +test_write_basic_config_version_file(4.5.6.7 0.9 1 0 0 0) # Request 0.[newer minor] +test_write_basic_config_version_file(4.5.6.7 2.0 1 0 0 0) # Request [older major].0 +test_write_basic_config_version_file(4.5.6.7 2.2 1 0 0 0) # Request [older major].[older minor] +test_write_basic_config_version_file(4.5.6.7 2.5 1 0 0 0) # Request [older major].[same minor] +test_write_basic_config_version_file(4.5.6.7 2.9 1 0 0 0) # Request [older major].[newer minor] +test_write_basic_config_version_file(4.5.6.7 4.0 1 1 0 0) # Request [same major].0 +test_write_basic_config_version_file(4.5.6.7 4.2 1 1 0 0) # Request [same major].[older minor] +test_write_basic_config_version_file(4.5.6.7 4.5 1 1 1 0) # Request [same major].[same minor] +test_write_basic_config_version_file(4.5.6.7 4.9 0 0 0 0) # Request [same major].[newer minor] +test_write_basic_config_version_file(4.5.6.7 9.0 0 0 0 0) # Request [newer major].0 +test_write_basic_config_version_file(4.5.6.7 9.1 0 0 0 0) # Request [newer major].[older minor] +test_write_basic_config_version_file(4.5.6.7 9.5 0 0 0 0) # Request [newer major].[same minor] +test_write_basic_config_version_file(4.5.6.7 9.9 0 0 0 0) # Request [newer major].[newer minor] + +test_write_basic_config_version_file(4.5.6.7 0.0.0 1 0 0 0) # Request 0.0.0 +test_write_basic_config_version_file(4.5.6.7 0.0.2 1 0 0 0) # Request 0.0.[older patch] +test_write_basic_config_version_file(4.5.6.7 0.0.6 1 0 0 0) # Request 0.0.[same patch] +test_write_basic_config_version_file(4.5.6.7 0.0.9 1 0 0 0) # Request 0.0.[newer patch] +test_write_basic_config_version_file(4.5.6.7 0.2.0 1 0 0 0) # Request 0.[older minor].0 +test_write_basic_config_version_file(4.5.6.7 0.2.2 1 0 0 0) # Request 0.[older minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 0.2.6 1 0 0 0) # Request 0.[older minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 0.2.9 1 0 0 0) # Request 0.[older minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 0.5.0 1 0 0 0) # Request 0.[same minor].0 +test_write_basic_config_version_file(4.5.6.7 0.5.2 1 0 0 0) # Request 0.[same minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 0.5.6 1 0 0 0) # Request 0.[same minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 0.5.9 1 0 0 0) # Request 0.[same minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 0.9.0 1 0 0 0) # Request 0.[newer minor].0 +test_write_basic_config_version_file(4.5.6.7 0.9.2 1 0 0 0) # Request 0.[newer minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 0.9.6 1 0 0 0) # Request 0.[newer minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 0.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 2.0.0 1 0 0 0) # Request [older major].0.0 +test_write_basic_config_version_file(4.5.6.7 2.0.2 1 0 0 0) # Request [older major].0.[older patch] +test_write_basic_config_version_file(4.5.6.7 2.0.6 1 0 0 0) # Request [older major].0.[same patch] +test_write_basic_config_version_file(4.5.6.7 2.0.9 1 0 0 0) # Request [older major].0.[newer patch] +test_write_basic_config_version_file(4.5.6.7 2.2.0 1 0 0 0) # Request [older major].[older minor].0 +test_write_basic_config_version_file(4.5.6.7 2.2.2 1 0 0 0) # Request [older major].[older minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 2.2.6 1 0 0 0) # Request [older major].[older minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 2.2.9 1 0 0 0) # Request [older major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 2.5.0 1 0 0 0) # Request [older major].[same minor].0 +test_write_basic_config_version_file(4.5.6.7 2.5.2 1 0 0 0) # Request [older major].[same minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 2.5.6 1 0 0 0) # Request [older major].[same minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 2.5.9 1 0 0 0) # Request [older major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 2.9.0 1 0 0 0) # Request [older major].[newer minor].0 +test_write_basic_config_version_file(4.5.6.7 2.9.2 1 0 0 0) # Request [older major].[newer minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 2.9.6 1 0 0 0) # Request [older major].[newer minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 2.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 4.0.0 1 1 0 0) # Request [same major].0.0 +test_write_basic_config_version_file(4.5.6.7 4.0.2 1 1 0 0) # Request [same major].0.[older patch] +test_write_basic_config_version_file(4.5.6.7 4.0.6 1 1 0 0) # Request [same major].0.[same patch] +test_write_basic_config_version_file(4.5.6.7 4.0.9 1 1 0 0) # Request [same major].0.[newer patch] +test_write_basic_config_version_file(4.5.6.7 4.2.0 1 1 0 0) # Request [same major].[older minor].0 +test_write_basic_config_version_file(4.5.6.7 4.2.2 1 1 0 0) # Request [same major].[older minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 4.2.6 1 1 0 0) # Request [same major].[older minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 4.2.9 1 1 0 0) # Request [same major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 4.5.0 1 1 1 0) # Request [same major].[same minor].0 +test_write_basic_config_version_file(4.5.6.7 4.5.2 1 1 1 0) # Request [same major].[same minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 4.5.6 1 1 1 1) # Request [same major].[same minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 4.5.9 0 0 0 0) # Request [same major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 4.9.0 0 0 0 0) # Request [same major].[newer minor].0 +test_write_basic_config_version_file(4.5.6.7 4.9.2 0 0 0 0) # Request [same major].[newer minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 4.9.6 0 0 0 0) # Request [same major].[newer minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 4.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 9.0.0 0 0 0 0) # Request [newer major].0.0 +test_write_basic_config_version_file(4.5.6.7 9.0.2 0 0 0 0) # Request [newer major].0.[older patch] +test_write_basic_config_version_file(4.5.6.7 9.0.6 0 0 0 0) # Request [newer major].0.[same patch] +test_write_basic_config_version_file(4.5.6.7 9.0.9 0 0 0 0) # Request [newer major].0.[newer patch] +test_write_basic_config_version_file(4.5.6.7 9.2.0 0 0 0 0) # Request [newer major].[older minor].0 +test_write_basic_config_version_file(4.5.6.7 9.2.2 0 0 0 0) # Request [newer major].[older minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 9.2.6 0 0 0 0) # Request [newer major].[older minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 9.2.9 0 0 0 0) # Request [newer major].[older minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 9.5.0 0 0 0 0) # Request [newer major].[same minor].0 +test_write_basic_config_version_file(4.5.6.7 9.5.2 0 0 0 0) # Request [newer major].[same minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 9.5.6 0 0 0 0) # Request [newer major].[same minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 9.5.9 0 0 0 0) # Request [newer major].[same minor].[newer patch] +test_write_basic_config_version_file(4.5.6.7 9.9.0 0 0 0 0) # Request [newer major].[newer minor].0 +test_write_basic_config_version_file(4.5.6.7 9.9.2 0 0 0 0) # Request [newer major].[newer minor].[older patch] +test_write_basic_config_version_file(4.5.6.7 9.9.6 0 0 0 0) # Request [newer major].[newer minor].[same patch] +test_write_basic_config_version_file(4.5.6.7 9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch] + +test_write_basic_config_version_file(4.5.6.7 0.0.0.0 1 0 0 0) # Request 0.0.0.0 +test_write_basic_config_version_file(4.5.6.7 0.0.0.2 1 0 0 0) # Request 0.0.0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.0.7 1 0 0 0) # Request 0.0.0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.0.9 1 0 0 0) # Request 0.0.0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.2.0 1 0 0 0) # Request 0.0.[older patch].0 +test_write_basic_config_version_file(4.5.6.7 0.0.2.2 1 0 0 0) # Request 0.0.[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.2.7 1 0 0 0) # Request 0.0.[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.2.9 1 0 0 0) # Request 0.0.[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.6.0 1 0 0 0) # Request 0.0.[same patch].0 +test_write_basic_config_version_file(4.5.6.7 0.0.6.2 1 0 0 0) # Request 0.0.[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.6.7 1 0 0 0) # Request 0.0.[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.6.9 1 0 0 0) # Request 0.0.[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.9.0 1 0 0 0) # Request 0.0.[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 0.0.9.2 1 0 0 0) # Request 0.0.[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.9.7 1 0 0 0) # Request 0.0.[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.0.9.9 1 0 0 0) # Request 0.0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.0.0 1 0 0 0) # Request 0.[older minor].0.0 +test_write_basic_config_version_file(4.5.6.7 0.2.0.2 1 0 0 0) # Request 0.[older minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.0.7 1 0 0 0) # Request 0.[older minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.0.9 1 0 0 0) # Request 0.[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.2.0 1 0 0 0) # Request 0.[older minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 0.2.2.2 1 0 0 0) # Request 0.[older minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.2.7 1 0 0 0) # Request 0.[older minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.2.9 1 0 0 0) # Request 0.[older minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.6.0 1 0 0 0) # Request 0.[older minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 0.2.6.2 1 0 0 0) # Request 0.[older minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.6.7 1 0 0 0) # Request 0.[older minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.6.9 1 0 0 0) # Request 0.[older minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.9.0 1 0 0 0) # Request 0.[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 0.2.9.2 1 0 0 0) # Request 0.[older minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.9.7 1 0 0 0) # Request 0.[older minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.2.9.9 1 0 0 0) # Request 0.[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.0.0 1 0 0 0) # Request 0.[same minor].0.0 +test_write_basic_config_version_file(4.5.6.7 0.5.0.2 1 0 0 0) # Request 0.[same minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.0.7 1 0 0 0) # Request 0.[same minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.0.9 1 0 0 0) # Request 0.[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.2.0 1 0 0 0) # Request 0.[same minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 0.5.2.2 1 0 0 0) # Request 0.[same minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.2.7 1 0 0 0) # Request 0.[same minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.2.9 1 0 0 0) # Request 0.[same minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.6.0 1 0 0 0) # Request 0.[same minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 0.5.6.2 1 0 0 0) # Request 0.[same minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.6.7 1 0 0 0) # Request 0.[same minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.6.9 1 0 0 0) # Request 0.[same minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.9.0 1 0 0 0) # Request 0.[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 0.5.9.2 1 0 0 0) # Request 0.[same minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.9.7 1 0 0 0) # Request 0.[same minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.5.9.9 1 0 0 0) # Request 0.[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.0.0 1 0 0 0) # Request 0.[newer minor].0.0 +test_write_basic_config_version_file(4.5.6.7 0.9.0.2 1 0 0 0) # Request 0.[newer minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.0.7 1 0 0 0) # Request 0.[newer minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.0.9 1 0 0 0) # Request 0.[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.2.0 1 0 0 0) # Request 0.[newer minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 0.9.2.2 1 0 0 0) # Request 0.[newer minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.2.7 1 0 0 0) # Request 0.[newer minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.2.9 1 0 0 0) # Request 0.[newer minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.6.0 1 0 0 0) # Request 0.[newer minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 0.9.6.2 1 0 0 0) # Request 0.[newer minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.6.7 1 0 0 0) # Request 0.[newer minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.6.9 1 0 0 0) # Request 0.[newer minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.9.0 1 0 0 0) # Request 0.[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 0.9.9.2 1 0 0 0) # Request 0.[newer minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.9.7 1 0 0 0) # Request 0.[newer minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 0.9.9.9 1 0 0 0) # Request 0.[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.0.0 1 0 0 0) # Request [older major].0.0.0 +test_write_basic_config_version_file(4.5.6.7 2.0.0.2 1 0 0 0) # Request [older major].0.0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.0.7 1 0 0 0) # Request [older major].0.0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.0.9 1 0 0 0) # Request [older major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.2.0 1 0 0 0) # Request [older major].0.[older patch].0 +test_write_basic_config_version_file(4.5.6.7 2.0.2.2 1 0 0 0) # Request [older major].0.[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.2.7 1 0 0 0) # Request [older major].0.[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.2.9 1 0 0 0) # Request [older major].0.[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.6.0 1 0 0 0) # Request [older major].0.[same patch].0 +test_write_basic_config_version_file(4.5.6.7 2.0.6.2 1 0 0 0) # Request [older major].0.[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.6.7 1 0 0 0) # Request [older major].0.[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.6.9 1 0 0 0) # Request [older major].0.[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.9.0 1 0 0 0) # Request [older major].0.[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 2.0.9.2 1 0 0 0) # Request [older major].0.[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.9.7 1 0 0 0) # Request [older major].0.[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.0.9.9 1 0 0 0) # Request [older major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.0.0 1 0 0 0) # Request [older major].[older minor].0.0 +test_write_basic_config_version_file(4.5.6.7 2.2.0.2 1 0 0 0) # Request [older major].[older minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.0.7 1 0 0 0) # Request [older major].[older minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.0.9 1 0 0 0) # Request [older major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.2.0 1 0 0 0) # Request [older major].[older minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 2.2.2.2 1 0 0 0) # Request [older major].[older minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.2.7 1 0 0 0) # Request [older major].[older minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.2.9 1 0 0 0) # Request [older major].[older minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.6.0 1 0 0 0) # Request [older major].[older minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 2.2.6.2 1 0 0 0) # Request [older major].[older minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.6.7 1 0 0 0) # Request [older major].[older minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.6.9 1 0 0 0) # Request [older major].[older minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.9.0 1 0 0 0) # Request [older major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 2.2.9.2 1 0 0 0) # Request [older major].[older minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.9.7 1 0 0 0) # Request [older major].[older minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.2.9.9 1 0 0 0) # Request [older major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.0.0 1 0 0 0) # Request [older major].[same minor].0.0 +test_write_basic_config_version_file(4.5.6.7 2.5.0.2 1 0 0 0) # Request [older major].[same minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.0.7 1 0 0 0) # Request [older major].[same minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.0.9 1 0 0 0) # Request [older major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.2.0 1 0 0 0) # Request [older major].[same minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 2.5.2.2 1 0 0 0) # Request [older major].[same minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.2.7 1 0 0 0) # Request [older major].[same minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.2.9 1 0 0 0) # Request [older major].[same minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.6.0 1 0 0 0) # Request [older major].[same minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 2.5.6.2 1 0 0 0) # Request [older major].[same minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.6.7 1 0 0 0) # Request [older major].[same minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.6.9 1 0 0 0) # Request [older major].[same minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.9.0 1 0 0 0) # Request [older major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 2.5.9.2 1 0 0 0) # Request [older major].[same minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.9.7 1 0 0 0) # Request [older major].[same minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.5.9.9 1 0 0 0) # Request [older major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.0.0 1 0 0 0) # Request [older major].[newer minor].0.0 +test_write_basic_config_version_file(4.5.6.7 2.9.0.2 1 0 0 0) # Request [older major].[newer minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.0.7 1 0 0 0) # Request [older major].[newer minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.0.9 1 0 0 0) # Request [older major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.2.0 1 0 0 0) # Request [older major].[newer minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 2.9.2.2 1 0 0 0) # Request [older major].[newer minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.2.7 1 0 0 0) # Request [older major].[newer minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.2.9 1 0 0 0) # Request [older major].[newer minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.6.0 1 0 0 0) # Request [older major].[newer minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 2.9.6.2 1 0 0 0) # Request [older major].[newer minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.6.7 1 0 0 0) # Request [older major].[newer minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.6.9 1 0 0 0) # Request [older major].[newer minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.9.0 1 0 0 0) # Request [older major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 2.9.9.2 1 0 0 0) # Request [older major].[newer minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.9.7 1 0 0 0) # Request [older major].[newer minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 2.9.9.9 1 0 0 0) # Request [older major].[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.0.0 1 1 0 0) # Request [same major].0.0.0 +test_write_basic_config_version_file(4.5.6.7 4.0.0.2 1 1 0 0) # Request [same major].0.0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.0.7 1 1 0 0) # Request [same major].0.0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.0.9 1 1 0 0) # Request [same major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.2.0 1 1 0 0) # Request [same major].0.[older patch].0 +test_write_basic_config_version_file(4.5.6.7 4.0.2.2 1 1 0 0) # Request [same major].0.[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.2.7 1 1 0 0) # Request [same major].0.[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.2.9 1 1 0 0) # Request [same major].0.[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.6.0 1 1 0 0) # Request [same major].0.[same patch].0 +test_write_basic_config_version_file(4.5.6.7 4.0.6.2 1 1 0 0) # Request [same major].0.[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.6.7 1 1 0 0) # Request [same major].0.[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.6.9 1 1 0 0) # Request [same major].0.[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.9.0 1 1 0 0) # Request [same major].0.[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 4.0.9.2 1 1 0 0) # Request [same major].0.[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.9.7 1 1 0 0) # Request [same major].0.[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.0.9.9 1 1 0 0) # Request [same major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.0.0 1 1 0 0) # Request [same major].[older minor].0.0 +test_write_basic_config_version_file(4.5.6.7 4.2.0.2 1 1 0 0) # Request [same major].[older minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.0.7 1 1 0 0) # Request [same major].[older minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.0.9 1 1 0 0) # Request [same major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.2.0 1 1 0 0) # Request [same major].[older minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 4.2.2.2 1 1 0 0) # Request [same major].[older minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.2.7 1 1 0 0) # Request [same major].[older minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.2.9 1 1 0 0) # Request [same major].[older minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.6.0 1 1 0 0) # Request [same major].[older minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 4.2.6.2 1 1 0 0) # Request [same major].[older minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.6.7 1 1 0 0) # Request [same major].[older minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.6.9 1 1 0 0) # Request [same major].[older minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.9.0 1 1 0 0) # Request [same major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 4.2.9.2 1 1 0 0) # Request [same major].[older minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.9.7 1 1 0 0) # Request [same major].[older minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.2.9.9 1 1 0 0) # Request [same major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.0.0 1 1 1 0) # Request [same major].[same minor].0.0 +test_write_basic_config_version_file(4.5.6.7 4.5.0.2 1 1 1 0) # Request [same major].[same minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.0.7 1 1 1 0) # Request [same major].[same minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.0.9 1 1 1 0) # Request [same major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.2.0 1 1 1 0) # Request [same major].[same minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 4.5.2.2 1 1 1 0) # Request [same major].[same minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.2.7 1 1 1 0) # Request [same major].[same minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.2.9 1 1 1 0) # Request [same major].[same minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.6.0 1 1 1 1) # Request [same major].[same minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 4.5.6.2 1 1 1 1) # Request [same major].[same minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.6.7 1 1 1 1) # Request [same major].[same minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.6.9 0 0 0 1) # Request [same major].[same minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.9.0 0 0 0 0) # Request [same major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 4.5.9.2 0 0 0 0) # Request [same major].[same minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.9.7 0 0 0 0) # Request [same major].[same minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.5.9.9 0 0 0 0) # Request [same major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.0.0 0 0 0 0) # Request [same major].[newer minor].0.0 +test_write_basic_config_version_file(4.5.6.7 4.9.0.2 0 0 0 0) # Request [same major].[newer minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.0.7 0 0 0 0) # Request [same major].[newer minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.0.9 0 0 0 0) # Request [same major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.2.0 0 0 0 0) # Request [same major].[newer minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 4.9.2.2 0 0 0 0) # Request [same major].[newer minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.2.7 0 0 0 0) # Request [same major].[newer minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.2.9 0 0 0 0) # Request [same major].[newer minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.6.0 0 0 0 0) # Request [same major].[newer minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 4.9.6.2 0 0 0 0) # Request [same major].[newer minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.6.7 0 0 0 0) # Request [same major].[newer minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.6.9 0 0 0 0) # Request [same major].[newer minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.9.0 0 0 0 0) # Request [same major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 4.9.9.2 0 0 0 0) # Request [same major].[newer minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.9.7 0 0 0 0) # Request [same major].[newer minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 4.9.9.9 0 0 0 0) # Request [same major].[newer minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.0.0 0 0 0 0) # Request [newer major].0.0.0 +test_write_basic_config_version_file(4.5.6.7 9.0.0.2 0 0 0 0) # Request [newer major].0.0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.0.7 0 0 0 0) # Request [newer major].0.0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.0.9 0 0 0 0) # Request [newer major].0.0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.2.0 0 0 0 0) # Request [newer major].0.[older patch].0 +test_write_basic_config_version_file(4.5.6.7 9.0.2.2 0 0 0 0) # Request [newer major].0.[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.2.7 0 0 0 0) # Request [newer major].0.[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.2.9 0 0 0 0) # Request [newer major].0.[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.6.0 0 0 0 0) # Request [newer major].0.[same patch].0 +test_write_basic_config_version_file(4.5.6.7 9.0.6.2 0 0 0 0) # Request [newer major].0.[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.6.7 0 0 0 0) # Request [newer major].0.[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.6.9 0 0 0 0) # Request [newer major].0.[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.9.0 0 0 0 0) # Request [newer major].0.[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 9.0.9.2 0 0 0 0) # Request [newer major].0.[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.9.7 0 0 0 0) # Request [newer major].0.[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.0.9.9 0 0 0 0) # Request [newer major].0.[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.0.0 0 0 0 0) # Request [newer major].[older minor].0.0 +test_write_basic_config_version_file(4.5.6.7 9.2.0.2 0 0 0 0) # Request [newer major].[older minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.0.7 0 0 0 0) # Request [newer major].[older minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.0.9 0 0 0 0) # Request [newer major].[older minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.2.0 0 0 0 0) # Request [newer major].[older minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 9.2.2.2 0 0 0 0) # Request [newer major].[older minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.2.7 0 0 0 0) # Request [newer major].[older minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.2.9 0 0 0 0) # Request [newer major].[older minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.6.0 0 0 0 0) # Request [newer major].[older minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 9.2.6.2 0 0 0 0) # Request [newer major].[older minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.6.7 0 0 0 0) # Request [newer major].[older minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.6.9 0 0 0 0) # Request [newer major].[older minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.9.0 0 0 0 0) # Request [newer major].[older minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 9.2.9.2 0 0 0 0) # Request [newer major].[older minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.9.7 0 0 0 0) # Request [newer major].[older minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.2.9.9 0 0 0 0) # Request [newer major].[older minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.0.0 0 0 0 0) # Request [newer major].[same minor].0.0 +test_write_basic_config_version_file(4.5.6.7 9.5.0.2 0 0 0 0) # Request [newer major].[same minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.0.7 0 0 0 0) # Request [newer major].[same minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.0.9 0 0 0 0) # Request [newer major].[same minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.2.0 0 0 0 0) # Request [newer major].[same minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 9.5.2.2 0 0 0 0) # Request [newer major].[same minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.2.7 0 0 0 0) # Request [newer major].[same minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.2.9 0 0 0 0) # Request [newer major].[same minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.6.0 0 0 0 0) # Request [newer major].[same minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 9.5.6.2 0 0 0 0) # Request [newer major].[same minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.6.7 0 0 0 0) # Request [newer major].[same minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.6.9 0 0 0 0) # Request [newer major].[same minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.9.0 0 0 0 0) # Request [newer major].[same minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 9.5.9.2 0 0 0 0) # Request [newer major].[same minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.9.7 0 0 0 0) # Request [newer major].[same minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.5.9.9 0 0 0 0) # Request [newer major].[same minor].[newer patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.0.0 0 0 0 0) # Request [newer major].[newer minor].0.0 +test_write_basic_config_version_file(4.5.6.7 9.9.0.2 0 0 0 0) # Request [newer major].[newer minor].0.[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.0.7 0 0 0 0) # Request [newer major].[newer minor].0.[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.0.9 0 0 0 0) # Request [newer major].[newer minor].0.[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.2.0 0 0 0 0) # Request [newer major].[newer minor].[older patch].0 +test_write_basic_config_version_file(4.5.6.7 9.9.2.2 0 0 0 0) # Request [newer major].[newer minor].[older patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.2.7 0 0 0 0) # Request [newer major].[newer minor].[older patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.2.9 0 0 0 0) # Request [newer major].[newer minor].[older patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.6.0 0 0 0 0) # Request [newer major].[newer minor].[same patch].0 +test_write_basic_config_version_file(4.5.6.7 9.9.6.2 0 0 0 0) # Request [newer major].[newer minor].[same patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.6.7 0 0 0 0) # Request [newer major].[newer minor].[same patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.6.9 0 0 0 0) # Request [newer major].[newer minor].[same patch].[newer tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.9.0 0 0 0 0) # Request [newer major].[newer minor].[newer patch].0 +test_write_basic_config_version_file(4.5.6.7 9.9.9.2 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[older tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.9.7 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[same tweak] +test_write_basic_config_version_file(4.5.6.7 9.9.9.9 0 0 0 0) # Request [newer major].[newer minor].[newer patch].[newer tweak] diff --git a/Tests/RunCMake/WriteBasicConfigVersionFile/ArchIndependent.cmake b/Tests/RunCMake/WriteBasicConfigVersionFile/ArchIndependent.cmake new file mode 100644 index 0000000..13ec5d1 --- /dev/null +++ b/Tests/RunCMake/WriteBasicConfigVersionFile/ArchIndependent.cmake @@ -0,0 +1,63 @@ +# Hard-code architecture for test without a real compiler. +set(CMAKE_SIZEOF_VOID_P 4) + +include(WriteBasicConfigVersionFile) + +set(_dummy_version 1.0.0) + +set(_compatibilities AnyNewerVersion + SameMajorVersion + SameMinorVersion + ExactVersion) + +function(test_write_basic_config_version_file_arch_prepare filename_out compat arch_independent arch) + if(arch_independent) + set(arch_arg ARCH_INDEPENDENT) + else() + set(arch_arg ) + endif() + + set(filename "${CMAKE_CURRENT_BINARY_DIR}/${compat}Arch${arch_arg}ConfigVersion.cmake") + + set(CMAKE_SIZEOF_VOID_P "${arch}") + + write_basic_config_version_file("${filename}" + VERSION "${_dummy_version}" + COMPATIBILITY "${compat}" + ${arch_arg}) + + set("${filename_out}" "${filename}" PARENT_SCOPE) +endfunction() + +function(test_write_basic_config_version_file_arch_check unsuitable_out filename arch) + set(CMAKE_SIZEOF_VOID_P "${arch}") + set(PACKAGE_FIND_VERSION "${_dummy_version}") + + include("${filename}") + + set("${unsuitable_out}" "${PACKAGE_VERSION_UNSUITABLE}" PARENT_SCOPE) +endfunction() + +function(test_write_basic_config_version_file_arch_test expected_unsuitable compat arch_independent source_arch user_arch) + test_write_basic_config_version_file_arch_prepare(filename "${compat}" "${arch_independent}" "${source_arch}") + test_write_basic_config_version_file_arch_check(unsuitable "${filename}" "${user_arch}") + if(unsuitable AND NOT expected_unsuitable) + message(SEND_ERROR "Architecture was checked when it shouldn't have been. Compatibility: ${compat} ARCH_INDEPENDENT: ${arch_independent}.") + elseif(expected_unsuitable AND NOT unsuitable) + message(SEND_ERROR "Requested architecture check not performed. Compatibility: ${compat} ARCH_INDEPENDENT: ${arch_independent}.") + endif() +endfunction() + +set(_unsuitable TRUE) +set(_suitable FALSE) + +foreach(compat ${_compatibilities}) + test_write_basic_config_version_file_arch_test("${_suitable}" "${compat}" TRUE 4 4) + test_write_basic_config_version_file_arch_test("${_suitable}" "${compat}" FALSE 4 4) + test_write_basic_config_version_file_arch_test("${_suitable}" "${compat}" TRUE 4 8) + test_write_basic_config_version_file_arch_test("${_unsuitable}" "${compat}" FALSE 4 8) + test_write_basic_config_version_file_arch_test("${_suitable}" "${compat}" TRUE 8 4) + test_write_basic_config_version_file_arch_test("${_unsuitable}" "${compat}" FALSE 8 4) + test_write_basic_config_version_file_arch_test("${_suitable}" "${compat}" TRUE 8 8) + test_write_basic_config_version_file_arch_test("${_suitable}" "${compat}" FALSE 8 8) +endforeach() diff --git a/Tests/RunCMake/WriteBasicConfigVersionFile/CMakeLists.txt b/Tests/RunCMake/WriteBasicConfigVersionFile/CMakeLists.txt new file mode 100644 index 0000000..44025d3 --- /dev/null +++ b/Tests/RunCMake/WriteBasicConfigVersionFile/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.12) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/WriteBasicConfigVersionFile/RunCMakeTest.cmake b/Tests/RunCMake/WriteBasicConfigVersionFile/RunCMakeTest.cmake new file mode 100644 index 0000000..5db33f7 --- /dev/null +++ b/Tests/RunCMake/WriteBasicConfigVersionFile/RunCMakeTest.cmake @@ -0,0 +1,4 @@ +include(RunCMake) + +run_cmake(All) +run_cmake(ArchIndependent) diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt new file mode 100644 index 0000000..1bd7f49 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-ExcludeFromAll/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(STATUS \"exclude\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt new file mode 100644 index 0000000..7d76ed9 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- sub +-- top$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt new file mode 100644 index 0000000..35b0bb5 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NEW-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- sub +-- top$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake new file mode 100644 index 0000000..56c1b81 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NEW.cmake @@ -0,0 +1,3 @@ +add_subdirectory(CMP0082) +add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt new file mode 100644 index 0000000..8f26c24 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-Nested/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(sub) diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt new file mode 100644 index 0000000..91a8936 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-Nested/sub/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(STATUS \"sub\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt new file mode 100644 index 0000000..52a0665 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/CMakeLists.txt @@ -0,0 +1,2 @@ +add_subdirectory(sub) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt new file mode 100644 index 0000000..91a8936 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-NestedSub/sub/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(STATUS \"sub\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-None/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082-None/CMakeLists.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-None/CMakeLists.txt diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt new file mode 100644 index 0000000..4b39789 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt new file mode 100644 index 0000000..8f3a5f7 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake new file mode 100644 index 0000000..56c1b81 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-OLD.cmake @@ -0,0 +1,3 @@ +add_subdirectory(CMP0082) +add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt new file mode 100644 index 0000000..4b39789 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt new file mode 100644 index 0000000..8f3a5f7 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt new file mode 100644 index 0000000..3624c43 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) in CMakeLists\.txt: + Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are + interleaved with those in caller\. Run "cmake --help-policy CMP0082" for + policy details\. Use the cmake_policy command to set the policy and + suppress this warning\. + +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake new file mode 100644 index 0000000..df5688a --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-Nested.cmake @@ -0,0 +1,2 @@ +add_subdirectory(CMP0082-Nested) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt new file mode 100644 index 0000000..4b39789 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt new file mode 100644 index 0000000..8f3a5f7 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt new file mode 100644 index 0000000..9362905 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) in CMP0082-NestedSub/CMakeLists\.txt: + Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are + interleaved with those in caller\. Run "cmake --help-policy CMP0082" for + policy details\. Use the cmake_policy command to set the policy and + suppress this warning\. + +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake new file mode 100644 index 0000000..88a0856 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NestedSub.cmake @@ -0,0 +1 @@ +add_subdirectory(CMP0082-NestedSub) diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt new file mode 100644 index 0000000..f7a331d --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-component-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt new file mode 100644 index 0000000..6f22ae2 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall-install-stdout.txt @@ -0,0 +1,2 @@ +^-- Install configuration: "[^\n]*" +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake new file mode 100644 index 0000000..70bc9ed --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-NoTopInstall.cmake @@ -0,0 +1 @@ +add_subdirectory(CMP0082) diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt new file mode 100644 index 0000000..157ab37 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-component-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt new file mode 100644 index 0000000..9e15872 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None-install-stdout.txt @@ -0,0 +1,2 @@ +^-- Install configuration: "[^\n]*" +-- top$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake new file mode 100644 index 0000000..670f89b --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-None.cmake @@ -0,0 +1,2 @@ +add_subdirectory(CMP0082-None) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt new file mode 100644 index 0000000..4b39789 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-component-stdout.txt @@ -0,0 +1,4 @@ +^-- Install configuration: "[^\n]*" +-- Install component: "Unspecified" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt new file mode 100644 index 0000000..8f3a5f7 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-install-stdout.txt @@ -0,0 +1,3 @@ +^-- Install configuration: "[^\n]*" +-- top +-- sub$ diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt new file mode 100644 index 0000000..3624c43 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN-stderr.txt @@ -0,0 +1,7 @@ +CMake Warning \(dev\) in CMakeLists\.txt: + Policy CMP0082 is not set: Install rules from add_subdirectory\(\) are + interleaved with those in caller\. Run "cmake --help-policy CMP0082" for + policy details\. Use the cmake_policy command to set the policy and + suppress this warning\. + +This warning is for project developers\. Use -Wno-dev to suppress it\. diff --git a/Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake b/Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake new file mode 100644 index 0000000..56c1b81 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082-WARN.cmake @@ -0,0 +1,3 @@ +add_subdirectory(CMP0082) +add_subdirectory(CMP0082-ExcludeFromAll EXCLUDE_FROM_ALL) +install(CODE "message(STATUS \"top\")") diff --git a/Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt new file mode 100644 index 0000000..91a8936 --- /dev/null +++ b/Tests/RunCMake/add_subdirectory/CMP0082/CMakeLists.txt @@ -0,0 +1 @@ +install(CODE "message(STATUS \"sub\")") diff --git a/Tests/RunCMake/add_subdirectory/CMakeLists.txt b/Tests/RunCMake/add_subdirectory/CMakeLists.txt index 18dfd26..47d249c 100644 --- a/Tests/RunCMake/add_subdirectory/CMakeLists.txt +++ b/Tests/RunCMake/add_subdirectory/CMakeLists.txt @@ -1,3 +1,10 @@ cmake_minimum_required(VERSION 3.2) + +# Have to set policy here due to policy scope +if(DEFINED CMP0082_VALUE) + cmake_policy(SET CMP0082 "${CMP0082_VALUE}") +endif() +set(CMAKE_POLICY_WARNING_CMP0082 ON) + project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt b/Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt index 369a956..0130581 100644 --- a/Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt +++ b/Tests/RunCMake/add_subdirectory/DoesNotExist-stderr.txt @@ -2,4 +2,4 @@ add_subdirectory given source "DoesNotExist" which is not an existing directory. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_subdirectory/Missing-stderr.txt b/Tests/RunCMake/add_subdirectory/Missing-stderr.txt index aba0675..dd83140 100644 --- a/Tests/RunCMake/add_subdirectory/Missing-stderr.txt +++ b/Tests/RunCMake/add_subdirectory/Missing-stderr.txt @@ -5,4 +5,4 @@ does not contain a CMakeLists.txt file. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake index 88b9283..343e65b 100644 --- a/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake +++ b/Tests/RunCMake/add_subdirectory/RunCMakeTest.cmake @@ -4,6 +4,28 @@ run_cmake(DoesNotExist) run_cmake(Missing) run_cmake(Function) +macro(run_cmake_install case) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${case}-build) + set(RunCMake_TEST_NO_CLEAN 1) + set(RunCMake_TEST_OPTIONS ${ARGN}) + + run_cmake(${case}) + run_cmake_command(${case}-install ${CMAKE_COMMAND} -P cmake_install.cmake) + run_cmake_command(${case}-install-component ${CMAKE_COMMAND} -DCOMPONENT=Unspecified -P cmake_install.cmake) + + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_NO_CLEAN) + unset(RunCMake_TEST_OPTIONS) +endmacro() + +run_cmake_install(CMP0082-WARN) +run_cmake_install(CMP0082-WARN-Nested) +run_cmake_install(CMP0082-WARN-NestedSub) +run_cmake_install(CMP0082-WARN-None) +run_cmake_install(CMP0082-WARN-NoTopInstall) +run_cmake_install(CMP0082-OLD -DCMP0082_VALUE=OLD) +run_cmake_install(CMP0082-NEW -DCMP0082_VALUE=NEW) + set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/ExcludeFromAll-build) set(RunCMake_TEST_NO_CLEAN 1) diff --git a/Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt b/Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt index 2e59d99..cc9085f 100644 --- a/Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt +++ b/Tests/RunCMake/ctest_build/BuildQuiet-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_build/BuildQuiet Build directory: .*/Tests/RunCMake/ctest_build/BuildQuiet-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_build/BuildQuiet/CTestConfig.cmake Site: test-site Build name: test-build-name Use Experimental tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_build/CTestConfig.cmake.in b/Tests/RunCMake/ctest_build/CTestConfig.cmake.in deleted file mode 100644 index 097f82c..0000000 --- a/Tests/RunCMake/ctest_build/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestBuild@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_cmake_error/CTestConfig.cmake.in b/Tests/RunCMake/ctest_cmake_error/CTestConfig.cmake.in deleted file mode 100644 index 1f679d5..0000000 --- a/Tests/RunCMake/ctest_cmake_error/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestCoverage@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_configure/CTestConfig.cmake.in b/Tests/RunCMake/ctest_configure/CTestConfig.cmake.in deleted file mode 100644 index 7e30ab9..0000000 --- a/Tests/RunCMake/ctest_configure/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestConfigure@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt b/Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt index 015644d..98f5a4c 100644 --- a/Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt +++ b/Tests/RunCMake/ctest_configure/ConfigureQuiet-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet Build directory: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_configure/ConfigureQuiet/CTestConfig.cmake Site: test-site Build name: test-build-name Use Experimental tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_coverage/CTestConfig.cmake.in b/Tests/RunCMake/ctest_coverage/CTestConfig.cmake.in deleted file mode 100644 index 1f679d5..0000000 --- a/Tests/RunCMake/ctest_coverage/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestCoverage@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in b/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in deleted file mode 100644 index c0d7e42..0000000 --- a/Tests/RunCMake/ctest_disabled_test/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_fixtures/CTestConfig.cmake.in b/Tests/RunCMake/ctest_fixtures/CTestConfig.cmake.in deleted file mode 100644 index 9823562..0000000 --- a/Tests/RunCMake/ctest_fixtures/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestTestFixtures.@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in index 1e1905b..5d83530 100644 --- a/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in +++ b/Tests/RunCMake/ctest_labels_for_subprojects/CTestConfig.cmake.in @@ -1,2 +1 @@ -set(CTEST_PROJECT_NAME "CTestLabelsForSubprojects@CASE_NAME@") @CTEST_EXTRA_CONFIG@ diff --git a/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in b/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in index 6d4a718..53bdd20 100644 --- a/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in +++ b/Tests/RunCMake/ctest_memcheck/CTestConfig.cmake.in @@ -1,9 +1,6 @@ -set (CTEST_PROJECT_NAME "CTestTestMemcheck@CASE_NAME@") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") -set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") set(CTEST_DROP_SITE "open.cdash.org") set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") -set(CTEST_DROP_SITE_CDASH TRUE) @CTEST_EXTRA_CONFIG@ diff --git a/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in b/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in deleted file mode 100644 index c0d7e42..0000000 --- a/Tests/RunCMake/ctest_skipped_test/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_start/AppendDifferentModel-stdout.txt b/Tests/RunCMake/ctest_start/AppendDifferentModel-stdout.txt index bc9a4c8..78f36a1 100644 --- a/Tests/RunCMake/ctest_start/AppendDifferentModel-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendDifferentModel-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/AppendDifferentModel Build directory: .*/Tests/RunCMake/ctest_start/AppendDifferentModel-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendDifferentModel/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ContinuousTrack diff --git a/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt b/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt index ab1c1f7..25085ef 100644 --- a/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendDifferentTrack-stdout.txt @@ -2,7 +2,6 @@ Run dashboard with to-be-determined model Source directory: .*/Tests/RunCMake/ctest_start/AppendDifferentTrack Build directory: .*/Tests/RunCMake/ctest_start/AppendDifferentTrack-build Track: ExperimentalDifferent - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendDifferentTrack/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ExperimentalDifferent diff --git a/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-stdout.txt b/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-stdout.txt index 55f2d8e..5780629 100644 --- a/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Continuous Source directory: .*/Tests/RunCMake/ctest_start/AppendNoMatchingTrack Build directory: .*/Tests/RunCMake/ctest_start/AppendNoMatchingTrack-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendNoMatchingTrack/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - SomeWeirdTrackName diff --git a/Tests/RunCMake/ctest_start/AppendNoModel-stdout.txt b/Tests/RunCMake/ctest_start/AppendNoModel-stdout.txt index f909a44..bcd0125 100644 --- a/Tests/RunCMake/ctest_start/AppendNoModel-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendNoModel-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with to-be-determined model Source directory: .*/Tests/RunCMake/ctest_start/AppendNoModel Build directory: .*/Tests/RunCMake/ctest_start/AppendNoModel-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendNoModel/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ContinuousTrack diff --git a/Tests/RunCMake/ctest_start/AppendOldContinuous-stdout.txt b/Tests/RunCMake/ctest_start/AppendOldContinuous-stdout.txt index 0660f5d..e58cd9c 100644 --- a/Tests/RunCMake/ctest_start/AppendOldContinuous-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendOldContinuous-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Continuous Source directory: .*/Tests/RunCMake/ctest_start/AppendOldContinuous Build directory: .*/Tests/RunCMake/ctest_start/AppendOldContinuous-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendOldContinuous/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ContinuousTrack diff --git a/Tests/RunCMake/ctest_start/AppendOldNoModel-stdout.txt b/Tests/RunCMake/ctest_start/AppendOldNoModel-stdout.txt index 0bdf9e4..47331e6 100644 --- a/Tests/RunCMake/ctest_start/AppendOldNoModel-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendOldNoModel-stdout.txt @@ -1,6 +1,5 @@ Run dashboard with to-be-determined model Source directory: .*/Tests/RunCMake/ctest_start/AppendOldNoModel Build directory: .*/Tests/RunCMake/ctest_start/AppendOldNoModel-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendOldNoModel/CTestConfig.cmake Site: test-site Build name: test-build-name diff --git a/Tests/RunCMake/ctest_start/AppendSameModel-stdout.txt b/Tests/RunCMake/ctest_start/AppendSameModel-stdout.txt index 4f43626..3abd51e 100644 --- a/Tests/RunCMake/ctest_start/AppendSameModel-stdout.txt +++ b/Tests/RunCMake/ctest_start/AppendSameModel-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Continuous Source directory: .*/Tests/RunCMake/ctest_start/AppendSameModel Build directory: .*/Tests/RunCMake/ctest_start/AppendSameModel-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/AppendSameModel/CTestConfig.cmake Site: test-site Build name: test-build-name Use existing tag: 19551112-2204 - ContinuousTrack diff --git a/Tests/RunCMake/ctest_start/CTestConfig.cmake.in b/Tests/RunCMake/ctest_start/CTestConfig.cmake.in deleted file mode 100644 index e75d14f..0000000 --- a/Tests/RunCMake/ctest_start/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestStart@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_start/ConfigInBuild-stdout.txt b/Tests/RunCMake/ctest_start/ConfigInBuild-stdout.txt index 7e94b8a..f4a0ba3 100644 --- a/Tests/RunCMake/ctest_start/ConfigInBuild-stdout.txt +++ b/Tests/RunCMake/ctest_start/ConfigInBuild-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/ConfigInBuild Build directory: .*/Tests/RunCMake/ctest_start/ConfigInBuild-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/ConfigInBuild-build/CTestConfig.cmake Site: test-site Build name: test-build-name Use Experimental tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/ConfigInSource-stdout.txt b/Tests/RunCMake/ctest_start/ConfigInSource-stdout.txt index c390372..5f98b4e 100644 --- a/Tests/RunCMake/ctest_start/ConfigInSource-stdout.txt +++ b/Tests/RunCMake/ctest_start/ConfigInSource-stdout.txt @@ -1,7 +1,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/ConfigInSource Build directory: .*/Tests/RunCMake/ctest_start/ConfigInSource-build - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/ConfigInSource/CTestConfig.cmake Site: test-site Build name: test-build-name Use Experimental tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt b/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt index 4a6f1e9..20a29be 100644 --- a/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt +++ b/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-stdout.txt @@ -2,7 +2,6 @@ Run dashboard with model Experimental Source directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack Build directory: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack-build Track: ExperimentalDifferent - Reading ctest configuration file: .*/Tests/RunCMake/ctest_start/NoAppendDifferentTrack/CTestConfig.cmake Site: test-site Build name: test-build-name Use ExperimentalDifferent tag: [0-9-]+ diff --git a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake index 9b57b1b..905ad00 100644 --- a/Tests/RunCMake/ctest_start/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_start/RunCMakeTest.cmake @@ -48,8 +48,6 @@ function(run_ConfigInBuild) set(RunCMake_TEST_NO_CLEAN 1) file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}") file(MAKE_DIRECTORY "${RunCMake_TEST_BINARY_DIR}") - configure_file(${RunCMake_SOURCE_DIR}/CTestConfig.cmake.in - ${RunCMake_BINARY_DIR}/ConfigInBuild-build/CTestConfig.cmake @ONLY) run_ctest_start(ConfigInBuild Experimental) endfunction() run_ConfigInBuild() diff --git a/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in b/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in index 378a85a..140e4be 100644 --- a/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in +++ b/Tests/RunCMake/ctest_submit/CTestConfig.cmake.in @@ -1,4 +1,3 @@ -set(CTEST_PROJECT_NAME "CTestSubmit@CASE_NAME@") # Intentionally leave out other upload-related CTestConfig.cmake settings # so that any ctest_submit calls fail with an error message. diff --git a/Tests/RunCMake/ctest_submit/FailDrop-cp-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-cp-result.txt deleted file mode 100644 index b57e2de..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-cp-result.txt +++ /dev/null @@ -1 +0,0 @@ -(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-cp-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-cp-stderr.txt deleted file mode 100644 index 00a60ac..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-cp-stderr.txt +++ /dev/null @@ -1,3 +0,0 @@ -Missing arguments for submit via cp: -.* - Problems when submitting via CP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-cp-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-cp-stdout.txt deleted file mode 100644 index fa6e004..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-cp-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -Submit files \(using cp\) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-ftp-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-ftp-result.txt deleted file mode 100644 index b57e2de..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-ftp-result.txt +++ /dev/null @@ -1 +0,0 @@ -(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-ftp-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-ftp-stderr.txt deleted file mode 100644 index b9d9394..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-ftp-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) - Problems when submitting via FTP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-ftp-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-ftp-stdout.txt deleted file mode 100644 index 345bb62..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-ftp-stdout.txt +++ /dev/null @@ -1,3 +0,0 @@ -Submit files \(using ftp\) - Using FTP submit method - Drop site: ftp:// diff --git a/Tests/RunCMake/ctest_submit/FailDrop-scp-result.txt b/Tests/RunCMake/ctest_submit/FailDrop-scp-result.txt deleted file mode 100644 index b57e2de..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-scp-result.txt +++ /dev/null @@ -1 +0,0 @@ -(-1|255) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-scp-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-scp-stderr.txt deleted file mode 100644 index ef67149..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-scp-stderr.txt +++ /dev/null @@ -1 +0,0 @@ - Problems when submitting via SCP diff --git a/Tests/RunCMake/ctest_submit/FailDrop-scp-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-scp-stdout.txt deleted file mode 100644 index ec2ce92..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-scp-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -Submit files \(using scp\) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stderr.txt b/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stderr.txt deleted file mode 100644 index c0f718e..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stderr.txt +++ /dev/null @@ -1 +0,0 @@ - (Problems when submitting via XML-RPC|Submission method "xmlrpc" not compiled into CTest!) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stdout.txt b/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stdout.txt deleted file mode 100644 index ed2acb5..0000000 --- a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-stdout.txt +++ /dev/null @@ -1 +0,0 @@ -Submit files \(using xmlrpc\) diff --git a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-result.txt b/Tests/RunCMake/ctest_submit/PARTSDone-result.txt index b57e2de..b57e2de 100644 --- a/Tests/RunCMake/ctest_submit/FailDrop-xmlrpc-result.txt +++ b/Tests/RunCMake/ctest_submit/PARTSDone-result.txt diff --git a/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt b/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt new file mode 100644 index 0000000..0020a0f --- /dev/null +++ b/Tests/RunCMake/ctest_submit/PARTSDone-stderr.txt @@ -0,0 +1,3 @@ + *Error when uploading file: .*/Done.xml + *Error message was: ([Cc]ould *n.t resolve host:? '?-no-site-'?.*|The requested URL returned error:.*) + *Problems when submitting via HTTP diff --git a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake index 952368d..4d7d29b 100644 --- a/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake +++ b/Tests/RunCMake/ctest_submit/RunCMakeTest.cmake @@ -24,6 +24,7 @@ run_ctest_submit(BadFILES FILES bad-file) run_ctest_submit(RepeatRETURN_VALUE RETURN_VALUE res RETURN_VALUE res) run_ctest_submit(PARTSCDashUpload PARTS Configure CDASH_UPLOAD) run_ctest_submit(PARTSCDashUploadType PARTS Configure CDASH_UPLOAD_TYPE) +run_ctest_submit(PARTSDone PARTS Done) run_ctest_submit(CDashUploadPARTS CDASH_UPLOAD bad-upload PARTS) run_ctest_submit(CDashUploadFILES CDASH_UPLOAD bad-upload FILES) run_ctest_submit(CDashUploadNone CDASH_UPLOAD) @@ -48,9 +49,5 @@ function(run_ctest_submit_FailDrop CASE_DROP_METHOD) run_ctest(FailDrop-${CASE_DROP_METHOD}) endfunction() -run_ctest_submit_FailDrop(cp) -run_ctest_submit_FailDrop(ftp) run_ctest_submit_FailDrop(http) run_ctest_submit_FailDrop(https) -run_ctest_submit_FailDrop(scp) -run_ctest_submit_FailDrop(xmlrpc) diff --git a/Tests/RunCMake/ctest_test/CTestConfig.cmake.in b/Tests/RunCMake/ctest_test/CTestConfig.cmake.in deleted file mode 100644 index 9004419..0000000 --- a/Tests/RunCMake/ctest_test/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestTest@CASE_NAME@") diff --git a/Tests/RunCMake/ctest_upload/CTestConfig.cmake.in b/Tests/RunCMake/ctest_upload/CTestConfig.cmake.in deleted file mode 100644 index 52665a8..0000000 --- a/Tests/RunCMake/ctest_upload/CTestConfig.cmake.in +++ /dev/null @@ -1 +0,0 @@ -set(CTEST_PROJECT_NAME "CTestUpload@CASE_NAME@") diff --git a/Tests/RunCMake/file/FileOpenFailRead-stderr.txt b/Tests/RunCMake/file/FileOpenFailRead-stderr.txt index 23d4337..9f8cee2 100644 --- a/Tests/RunCMake/file/FileOpenFailRead-stderr.txt +++ b/Tests/RunCMake/file/FileOpenFailRead-stderr.txt @@ -3,4 +3,4 @@ CMake Error at FileOpenFailRead.cmake:[0-9]+ \(file\): .*/Tests/RunCMake/file/does_not_exist/file.txt Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt b/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt index 557b817..bb7e4d2 100644 --- a/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt +++ b/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt @@ -2,31 +2,31 @@ CMake Error at INSTALL-MESSAGE-bad.cmake:1 \(file\): file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are mutually exclusive. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:2 \(file\): file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are mutually exclusive. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:3 \(file\): file INSTALL options MESSAGE_ALWAYS, MESSAGE_LAZY, and MESSAGE_NEVER are mutually exclusive. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:4 \(file\): file option MESSAGE_ALWAYS may not appear after PATTERN or REGEX. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:5 \(file\): file option MESSAGE_LAZY may not appear after PATTERN or REGEX. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) + CMake Error at INSTALL-MESSAGE-bad.cmake:6 \(file\): file option MESSAGE_NEVER may not appear after PATTERN or REGEX. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake index b383230..b9d76bf 100644 --- a/Tests/RunCMake/file/RunCMakeTest.cmake +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -36,6 +36,8 @@ run_cmake(READ_ELF) run_cmake(GLOB) run_cmake(GLOB_RECURSE) run_cmake(GLOB_RECURSE-noexp-FOLLOW_SYMLINKS) +run_cmake(SIZE) +run_cmake(SIZE-error-does-not-exist) # tests are valid both for GLOB and GLOB_RECURSE run_cmake(GLOB-sort-dedup) diff --git a/Tests/RunCMake/file/SIZE-error-does-not-exist-result.txt b/Tests/RunCMake/file/SIZE-error-does-not-exist-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/SIZE-error-does-not-exist-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/SIZE-error-does-not-exist-stderr.txt b/Tests/RunCMake/file/SIZE-error-does-not-exist-stderr.txt new file mode 100644 index 0000000..b797a41 --- /dev/null +++ b/Tests/RunCMake/file/SIZE-error-does-not-exist-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at SIZE-error-does-not-exist.cmake:[0-9]+ \(file\): + file SIZE requested of path that is not readable + /a/file/that/does-not-exist +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/file/SIZE-error-does-not-exist.cmake b/Tests/RunCMake/file/SIZE-error-does-not-exist.cmake new file mode 100644 index 0000000..edcc222 --- /dev/null +++ b/Tests/RunCMake/file/SIZE-error-does-not-exist.cmake @@ -0,0 +1,3 @@ +set(file "/a/file/that/does-not-exist") + +file(SIZE "${file}" CALCULATED_SIZE) diff --git a/Tests/RunCMake/file/SIZE.cmake b/Tests/RunCMake/file/SIZE.cmake new file mode 100644 index 0000000..4d9dbd2 --- /dev/null +++ b/Tests/RunCMake/file/SIZE.cmake @@ -0,0 +1,9 @@ +set(file "${CMAKE_CURRENT_BINARY_DIR}/a-test-file") + +file(WRITE "${file}" "test") + +file(SIZE "${file}" CALCULATED_SIZE) + +if (NOT CALCULATED_SIZE EQUAL 4) + message(FATAL_ERROR "Unexpected file size") +endif() diff --git a/Tests/RunCMake/find_package/CMP0084-NEW-stderr.txt b/Tests/RunCMake/find_package/CMP0084-NEW-stderr.txt new file mode 100644 index 0000000..280ff8c --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-NEW-stderr.txt @@ -0,0 +1,20 @@ +^CMake Warning at CMP0084-NEW\.cmake:[0-9]+ \(find_package\): + No "FindQt\.cmake" found in CMAKE_MODULE_PATH\. +Call Stack \(most recent call first\): + CMakeLists\.txt:3 \(include\) ++ +CMake Warning \(dev\) at CMP0084-NEW\.cmake:[0-9]+ \(find_package\): + FindQt\.cmake must either be part of this project itself, in this case + adjust CMAKE_MODULE_PATH so that it points to the correct location inside + its source tree\. + + Or it must be installed by a package which has already been found via + find_package\(\)\. In this case make sure that package has indeed been found + and adjust CMAKE_MODULE_PATH to contain the location where that package has + installed FindQt\.cmake\. This must be a location provided by that package\. + This error in general means that the buildsystem of this project is relying + on a Find-module without ensuring that it is actually available\. + +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/CMP0084-NEW.cmake b/Tests/RunCMake/find_package/CMP0084-NEW.cmake new file mode 100644 index 0000000..68fd6cf --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-NEW.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0084 NEW) +set(_findqt_testing TRUE) +find_package(Qt MODULE) + +if(_findqt_included) + message(FATAL_ERROR "FindQt.cmake erroneously included") +endif() diff --git a/Tests/RunCMake/find_package/CMP0084-OLD.cmake b/Tests/RunCMake/find_package/CMP0084-OLD.cmake new file mode 100644 index 0000000..7bd4726 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-OLD.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0084 OLD) +set(_findqt_testing TRUE) +find_package(Qt MODULE) + +if(NOT _findqt_included) + message(FATAL_ERROR "FindQt.cmake not included") +endif() diff --git a/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt b/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt new file mode 100644 index 0000000..9ecebd3 --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-WARN-stderr.txt @@ -0,0 +1,8 @@ +^CMake Warning \(dev\) at CMP0084-WARN\.cmake:[0-9]+ \(find_package\): + Policy CMP0084 is not set: The FindQt module does not exist for + find_package\(\)\. Run "cmake --help-policy CMP0084" 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/CMP0084-WARN.cmake b/Tests/RunCMake/find_package/CMP0084-WARN.cmake new file mode 100644 index 0000000..4ea22cb --- /dev/null +++ b/Tests/RunCMake/find_package/CMP0084-WARN.cmake @@ -0,0 +1,6 @@ +set(_findqt_testing TRUE) +find_package(Qt MODULE) + +if(NOT _findqt_included) + message(FATAL_ERROR "FindQt.cmake not included") +endif() diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake index c068402..e9f3558 100644 --- a/Tests/RunCMake/find_package/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake @@ -23,3 +23,6 @@ run_cmake(PolicyPop) run_cmake(SetFoundFALSE) run_cmake(WrongVersion) run_cmake(WrongVersionConfig) +run_cmake(CMP0084-OLD) +run_cmake(CMP0084-WARN) +run_cmake(CMP0084-NEW) diff --git a/Tests/RunCMake/get_property/BadArgument-stderr.txt b/Tests/RunCMake/get_property/BadArgument-stderr.txt index 37c4477..ce5a209 100644 --- a/Tests/RunCMake/get_property/BadArgument-stderr.txt +++ b/Tests/RunCMake/get_property/BadArgument-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at BadArgument.cmake:1 \(get_property\): get_property given invalid argument "FOO". Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/BadDirectory-stderr.txt b/Tests/RunCMake/get_property/BadDirectory-stderr.txt index 98464f8..6afec03 100644 --- a/Tests/RunCMake/get_property/BadDirectory-stderr.txt +++ b/Tests/RunCMake/get_property/BadDirectory-stderr.txt @@ -3,4 +3,4 @@ found. This could be because the directory argument was invalid or, it is valid but has not been processed yet. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/BadScope-stderr.txt b/Tests/RunCMake/get_property/BadScope-stderr.txt index 4cc32c8..3084bb7 100644 --- a/Tests/RunCMake/get_property/BadScope-stderr.txt +++ b/Tests/RunCMake/get_property/BadScope-stderr.txt @@ -2,4 +2,4 @@ get_property given invalid scope FOO. Valid scopes are GLOBAL, DIRECTORY, TARGET, SOURCE, TEST, VARIABLE, CACHE, INSTALL. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/BadTarget-stderr.txt b/Tests/RunCMake/get_property/BadTarget-stderr.txt index 45a0df6..e857117 100644 --- a/Tests/RunCMake/get_property/BadTarget-stderr.txt +++ b/Tests/RunCMake/get_property/BadTarget-stderr.txt @@ -2,4 +2,4 @@ get_property could not find TARGET FOO. Perhaps it has not yet been created. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/BadTest-stderr.txt b/Tests/RunCMake/get_property/BadTest-stderr.txt index 819c070..aec9e9e 100644 --- a/Tests/RunCMake/get_property/BadTest-stderr.txt +++ b/Tests/RunCMake/get_property/BadTest-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at BadTest.cmake:1 \(get_property\): get_property given TEST name that does not exist: FOO Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/GlobalName-stderr.txt b/Tests/RunCMake/get_property/GlobalName-stderr.txt index a7d4971..4ddceb2 100644 --- a/Tests/RunCMake/get_property/GlobalName-stderr.txt +++ b/Tests/RunCMake/get_property/GlobalName-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at GlobalName.cmake:1 \(get_property\): get_property given name for GLOBAL scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/MissingArgument-stderr.txt b/Tests/RunCMake/get_property/MissingArgument-stderr.txt index 8722712..00d3311 100644 --- a/Tests/RunCMake/get_property/MissingArgument-stderr.txt +++ b/Tests/RunCMake/get_property/MissingArgument-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at MissingArgument.cmake:1 \(get_property\): get_property called with incorrect number of arguments Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoCache-stderr.txt b/Tests/RunCMake/get_property/NoCache-stderr.txt index defafb6..7348cff 100644 --- a/Tests/RunCMake/get_property/NoCache-stderr.txt +++ b/Tests/RunCMake/get_property/NoCache-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoCache.cmake:1 \(get_property\): get_property not given name for CACHE scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoProperty-stderr.txt b/Tests/RunCMake/get_property/NoProperty-stderr.txt index 0ef147f..79b8c87 100644 --- a/Tests/RunCMake/get_property/NoProperty-stderr.txt +++ b/Tests/RunCMake/get_property/NoProperty-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoProperty.cmake:1 \(get_property\): get_property not given a PROPERTY <name> argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoSource-stderr.txt b/Tests/RunCMake/get_property/NoSource-stderr.txt index 59fd0ad..cefff41 100644 --- a/Tests/RunCMake/get_property/NoSource-stderr.txt +++ b/Tests/RunCMake/get_property/NoSource-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoSource.cmake:1 \(get_property\): get_property not given name for SOURCE scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoTarget-stderr.txt b/Tests/RunCMake/get_property/NoTarget-stderr.txt index a0e1a94..fb1c8f4 100644 --- a/Tests/RunCMake/get_property/NoTarget-stderr.txt +++ b/Tests/RunCMake/get_property/NoTarget-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoTarget.cmake:1 \(get_property\): get_property not given name for TARGET scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/NoTest-stderr.txt b/Tests/RunCMake/get_property/NoTest-stderr.txt index c90a0ffc..93c3e98 100644 --- a/Tests/RunCMake/get_property/NoTest-stderr.txt +++ b/Tests/RunCMake/get_property/NoTest-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at NoTest.cmake:1 \(get_property\): get_property not given name for TEST scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/get_property/VariableName-stderr.txt b/Tests/RunCMake/get_property/VariableName-stderr.txt index e9f3827..250d920 100644 --- a/Tests/RunCMake/get_property/VariableName-stderr.txt +++ b/Tests/RunCMake/get_property/VariableName-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at VariableName.cmake:1 \(get_property\): get_property given name for VARIABLE scope. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt b/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt index cdd33ac..698e89a 100644 --- a/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt +++ b/Tests/RunCMake/include_guard/InvalidArgumentsNumber-stderr.txt @@ -2,4 +2,4 @@ CMake Error at InvalidArgumentsNumber.cmake:1 \(include_guard\): include_guard given an invalid number of arguments. The command takes at most 1 argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/include_guard/InvalidScope-stderr.txt b/Tests/RunCMake/include_guard/InvalidScope-stderr.txt index 456709d..58f62a3 100644 --- a/Tests/RunCMake/include_guard/InvalidScope-stderr.txt +++ b/Tests/RunCMake/include_guard/InvalidScope-stderr.txt @@ -1,4 +1,4 @@ CMake Error at InvalidScope.cmake:1 \(include_guard\): include_guard given an invalid scope: INVALID Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE-result.txt b/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE-stderr.txt b/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE-stderr.txt new file mode 100644 index 0000000..c847c43 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at DIRECTORY-DESTINATION-TYPE\.cmake:[0-9]+ \(install\): + install DIRECTORY given both TYPE and DESTINATION arguments\. You may only + specify one\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE.cmake b/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE.cmake new file mode 100644 index 0000000..4404d6b --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-DESTINATION-TYPE.cmake @@ -0,0 +1 @@ +install(DIRECTORY dir TYPE BIN DESTINATION mybin) diff --git a/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt index 166ba6f..c8074e9 100644 --- a/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt +++ b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt @@ -1,4 +1,4 @@ CMake Error at DIRECTORY-PATTERN-MESSAGE_NEVER.cmake:[0-9]+ \(install\): install DIRECTORY does not allow "MESSAGE_NEVER" after PATTERN or REGEX. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/install/DIRECTORY-TYPE-Cache-all-check.cmake b/Tests/RunCMake/install/DIRECTORY-TYPE-Cache-all-check.cmake new file mode 100644 index 0000000..fb393e3 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-TYPE-Cache-all-check.cmake @@ -0,0 +1,42 @@ +set(_check_files + [[mybin]] + [[mybin/dir]] + [[mybin/dir/empty\.txt]] + [[mycom]] + [[mycom/dir]] + [[mycom/dir/empty\.txt]] + [[mydoc]] + [[mydoc/dir]] + [[mydoc/dir/empty\.txt]] + [[myetc]] + [[myetc/dir]] + [[myetc/dir/empty\.txt]] + [[myinclude]] + [[myinclude/dir]] + [[myinclude/dir/empty\.txt]] + [[myinfo]] + [[myinfo/dir]] + [[myinfo/dir/empty\.txt]] + [[mylib]] + [[mylib/dir]] + [[mylib/dir/empty\.txt]] + [[mylocale]] + [[mylocale/dir]] + [[mylocale/dir/empty\.txt]] + [[myman]] + [[myman/dir]] + [[myman/dir/empty\.txt]] + [[myrun]] + [[myrun/dir]] + [[myrun/dir/empty\.txt]] + [[mysbin]] + [[mysbin/dir]] + [[mysbin/dir/empty\.txt]] + [[myshare]] + [[myshare/dir]] + [[myshare/dir/empty\.txt]] + [[myvar]] + [[myvar/dir]] + [[myvar/dir/empty\.txt]] + ) +check_installed("^${_check_files}$") diff --git a/Tests/RunCMake/install/DIRECTORY-TYPE-Cache.cmake b/Tests/RunCMake/install/DIRECTORY-TYPE-Cache.cmake new file mode 100644 index 0000000..53e95f8 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-TYPE-Cache.cmake @@ -0,0 +1,13 @@ +install(DIRECTORY dir TYPE BIN) +install(DIRECTORY dir TYPE SBIN) +install(DIRECTORY dir TYPE LIB) +install(DIRECTORY dir TYPE INCLUDE) +install(DIRECTORY dir TYPE SYSCONF) +install(DIRECTORY dir TYPE SHAREDSTATE) +install(DIRECTORY dir TYPE LOCALSTATE) +install(DIRECTORY dir TYPE RUNSTATE) +install(DIRECTORY dir TYPE DATA) +install(DIRECTORY dir TYPE INFO) +install(DIRECTORY dir TYPE LOCALE) +install(DIRECTORY dir TYPE MAN) +install(DIRECTORY dir TYPE DOC) diff --git a/Tests/RunCMake/install/DIRECTORY-TYPE-CacheDependent-all-check.cmake b/Tests/RunCMake/install/DIRECTORY-TYPE-CacheDependent-all-check.cmake new file mode 100644 index 0000000..03f7bd6 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-TYPE-CacheDependent-all-check.cmake @@ -0,0 +1,24 @@ +set(_check_files + [[myshare]] + [[myshare/dir]] + [[myshare/dir/empty\.txt]] + [[myshare/doc]] + [[myshare/doc/dir]] + [[myshare/doc/dir/empty\.txt]] + [[myshare/info]] + [[myshare/info/dir]] + [[myshare/info/dir/empty\.txt]] + [[myshare/locale]] + [[myshare/locale/dir]] + [[myshare/locale/dir/empty\.txt]] + [[myshare/man]] + [[myshare/man/dir]] + [[myshare/man/dir/empty.txt]] + [[myvar]] + [[myvar/dir]] + [[myvar/dir/empty\.txt]] + [[myvar/run]] + [[myvar/run/dir]] + [[myvar/run/dir/empty\.txt]] + ) +check_installed("^${_check_files}$") diff --git a/Tests/RunCMake/install/DIRECTORY-TYPE-CacheDependent.cmake b/Tests/RunCMake/install/DIRECTORY-TYPE-CacheDependent.cmake new file mode 100644 index 0000000..e797abb --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-TYPE-CacheDependent.cmake @@ -0,0 +1,7 @@ +install(DIRECTORY dir TYPE LOCALSTATE) +install(DIRECTORY dir TYPE RUNSTATE) +install(DIRECTORY dir TYPE DATA) +install(DIRECTORY dir TYPE INFO) +install(DIRECTORY dir TYPE LOCALE) +install(DIRECTORY dir TYPE MAN) +install(DIRECTORY dir TYPE DOC) diff --git a/Tests/RunCMake/install/DIRECTORY-TYPE-all-check.cmake b/Tests/RunCMake/install/DIRECTORY-TYPE-all-check.cmake new file mode 100644 index 0000000..03fa3c8 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-TYPE-all-check.cmake @@ -0,0 +1,42 @@ +set(_check_files + [[bin]] + [[bin/dir]] + [[bin/dir/empty\.txt]] + [[com]] + [[com/dir]] + [[com/dir/empty\.txt]] + [[etc]] + [[etc/dir]] + [[etc/dir/empty\.txt]] + [[include]] + [[include/dir]] + [[include/dir/empty\.txt]] + [[lib]] + [[lib/dir]] + [[lib/dir/empty\.txt]] + [[sbin]] + [[sbin/dir]] + [[sbin/dir/empty\.txt]] + [[share]] + [[share/dir]] + [[share/dir/empty\.txt]] + [[share/doc]] + [[share/doc/dir]] + [[share/doc/dir/empty\.txt]] + [[share/info]] + [[share/info/dir]] + [[share/info/dir/empty\.txt]] + [[share/locale]] + [[share/locale/dir]] + [[share/locale/dir/empty\.txt]] + [[share/man]] + [[share/man/dir]] + [[share/man/dir/empty\.txt]] + [[var]] + [[var/dir]] + [[var/dir/empty\.txt]] + [[var/run]] + [[var/run/dir]] + [[var/run/dir/empty\.txt]] + ) +check_installed("^${_check_files}$") diff --git a/Tests/RunCMake/install/DIRECTORY-TYPE.cmake b/Tests/RunCMake/install/DIRECTORY-TYPE.cmake new file mode 100644 index 0000000..53e95f8 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-TYPE.cmake @@ -0,0 +1,13 @@ +install(DIRECTORY dir TYPE BIN) +install(DIRECTORY dir TYPE SBIN) +install(DIRECTORY dir TYPE LIB) +install(DIRECTORY dir TYPE INCLUDE) +install(DIRECTORY dir TYPE SYSCONF) +install(DIRECTORY dir TYPE SHAREDSTATE) +install(DIRECTORY dir TYPE LOCALSTATE) +install(DIRECTORY dir TYPE RUNSTATE) +install(DIRECTORY dir TYPE DATA) +install(DIRECTORY dir TYPE INFO) +install(DIRECTORY dir TYPE LOCALE) +install(DIRECTORY dir TYPE MAN) +install(DIRECTORY dir TYPE DOC) diff --git a/Tests/RunCMake/install/FILES-DESTINATION-TYPE-result.txt b/Tests/RunCMake/install/FILES-DESTINATION-TYPE-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/install/FILES-DESTINATION-TYPE-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/install/FILES-DESTINATION-TYPE-stderr.txt b/Tests/RunCMake/install/FILES-DESTINATION-TYPE-stderr.txt new file mode 100644 index 0000000..ce8fc23 --- /dev/null +++ b/Tests/RunCMake/install/FILES-DESTINATION-TYPE-stderr.txt @@ -0,0 +1,5 @@ +^CMake Error at FILES-DESTINATION-TYPE\.cmake:[0-9]+ \(install\): + install FILES given both TYPE and DESTINATION arguments\. You may only + specify one\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/install/FILES-DESTINATION-TYPE.cmake b/Tests/RunCMake/install/FILES-DESTINATION-TYPE.cmake new file mode 100644 index 0000000..576c98f --- /dev/null +++ b/Tests/RunCMake/install/FILES-DESTINATION-TYPE.cmake @@ -0,0 +1 @@ +install(FILES main.c TYPE BIN DESTINATION mybin) diff --git a/Tests/RunCMake/install/FILES-TYPE-Cache-all-check.cmake b/Tests/RunCMake/install/FILES-TYPE-Cache-all-check.cmake new file mode 100644 index 0000000..dfb90cf --- /dev/null +++ b/Tests/RunCMake/install/FILES-TYPE-Cache-all-check.cmake @@ -0,0 +1,29 @@ +set(_check_files + [[mybin]] + [[mybin/main\.c]] + [[mycom]] + [[mycom/main\.c]] + [[mydoc]] + [[mydoc/main\.c]] + [[myetc]] + [[myetc/main\.c]] + [[myinclude]] + [[myinclude/main\.c]] + [[myinfo]] + [[myinfo/main\.c]] + [[mylib]] + [[mylib/main\.c]] + [[mylocale]] + [[mylocale/main\.c]] + [[myman]] + [[myman/main\.c]] + [[myrun]] + [[myrun/main\.c]] + [[mysbin]] + [[mysbin/main\.c]] + [[myshare]] + [[myshare/main\.c]] + [[myvar]] + [[myvar/main\.c]] + ) +check_installed("^${_check_files}$") diff --git a/Tests/RunCMake/install/FILES-TYPE-Cache.cmake b/Tests/RunCMake/install/FILES-TYPE-Cache.cmake new file mode 100644 index 0000000..2e2bfc7 --- /dev/null +++ b/Tests/RunCMake/install/FILES-TYPE-Cache.cmake @@ -0,0 +1,13 @@ +install(FILES main.c TYPE BIN) +install(FILES main.c TYPE SBIN) +install(FILES main.c TYPE LIB) +install(FILES main.c TYPE INCLUDE) +install(FILES main.c TYPE SYSCONF) +install(FILES main.c TYPE SHAREDSTATE) +install(FILES main.c TYPE LOCALSTATE) +install(FILES main.c TYPE RUNSTATE) +install(FILES main.c TYPE DATA) +install(FILES main.c TYPE INFO) +install(FILES main.c TYPE LOCALE) +install(FILES main.c TYPE MAN) +install(FILES main.c TYPE DOC) diff --git a/Tests/RunCMake/install/FILES-TYPE-CacheDependent-all-check.cmake b/Tests/RunCMake/install/FILES-TYPE-CacheDependent-all-check.cmake new file mode 100644 index 0000000..e58c80a --- /dev/null +++ b/Tests/RunCMake/install/FILES-TYPE-CacheDependent-all-check.cmake @@ -0,0 +1,17 @@ +set(_check_files + [[myshare]] + [[myshare/doc]] + [[myshare/doc/main\.c]] + [[myshare/info]] + [[myshare/info/main\.c]] + [[myshare/locale]] + [[myshare/locale/main\.c]] + [[myshare/main\.c]] + [[myshare/man]] + [[myshare/man/main\.c]] + [[myvar]] + [[myvar/main\.c]] + [[myvar/run]] + [[myvar/run/main\.c]] + ) +check_installed("^${_check_files}$") diff --git a/Tests/RunCMake/install/FILES-TYPE-CacheDependent.cmake b/Tests/RunCMake/install/FILES-TYPE-CacheDependent.cmake new file mode 100644 index 0000000..d7d5aaa --- /dev/null +++ b/Tests/RunCMake/install/FILES-TYPE-CacheDependent.cmake @@ -0,0 +1,7 @@ +install(FILES main.c TYPE LOCALSTATE) +install(FILES main.c TYPE RUNSTATE) +install(FILES main.c TYPE DATA) +install(FILES main.c TYPE INFO) +install(FILES main.c TYPE LOCALE) +install(FILES main.c TYPE MAN) +install(FILES main.c TYPE DOC) diff --git a/Tests/RunCMake/install/FILES-TYPE-all-check.cmake b/Tests/RunCMake/install/FILES-TYPE-all-check.cmake new file mode 100644 index 0000000..c4ec661 --- /dev/null +++ b/Tests/RunCMake/install/FILES-TYPE-all-check.cmake @@ -0,0 +1,29 @@ +set(_check_files + [[bin]] + [[bin/main\.c]] + [[com]] + [[com/main\.c]] + [[etc]] + [[etc/main\.c]] + [[include]] + [[include/main\.c]] + [[lib]] + [[lib/main\.c]] + [[sbin]] + [[sbin/main\.c]] + [[share]] + [[share/doc]] + [[share/doc/main\.c]] + [[share/info]] + [[share/info/main\.c]] + [[share/locale]] + [[share/locale/main\.c]] + [[share/main\.c]] + [[share/man]] + [[share/man/main\.c]] + [[var]] + [[var/main\.c]] + [[var/run]] + [[var/run/main\.c]] + ) +check_installed("^${_check_files}$") diff --git a/Tests/RunCMake/install/FILES-TYPE.cmake b/Tests/RunCMake/install/FILES-TYPE.cmake new file mode 100644 index 0000000..2e2bfc7 --- /dev/null +++ b/Tests/RunCMake/install/FILES-TYPE.cmake @@ -0,0 +1,13 @@ +install(FILES main.c TYPE BIN) +install(FILES main.c TYPE SBIN) +install(FILES main.c TYPE LIB) +install(FILES main.c TYPE INCLUDE) +install(FILES main.c TYPE SYSCONF) +install(FILES main.c TYPE SHAREDSTATE) +install(FILES main.c TYPE LOCALSTATE) +install(FILES main.c TYPE RUNSTATE) +install(FILES main.c TYPE DATA) +install(FILES main.c TYPE INFO) +install(FILES main.c TYPE LOCALE) +install(FILES main.c TYPE MAN) +install(FILES main.c TYPE DOC) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index ec022ca..f7e1dee 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -65,6 +65,12 @@ run_cmake(CMP0062-NEW) run_cmake(CMP0062-WARN) run_cmake(TARGETS-NAMELINK_COMPONENT-bad-all) run_cmake(TARGETS-NAMELINK_COMPONENT-bad-exc) +run_cmake(FILES-DESTINATION-TYPE) +run_cmake(DIRECTORY-DESTINATION-TYPE) + +if(APPLE) + run_cmake(TARGETS-Apple-Defaults) +endif() if(NOT RunCMake_GENERATOR STREQUAL "Xcode" OR NOT "$ENV{CMAKE_OSX_ARCHITECTURES}" MATCHES "[;$]") run_install_test(FILES-TARGET_OBJECTS) @@ -74,6 +80,46 @@ run_install_test(TARGETS-InstallFromSubDir) run_install_test(TARGETS-OPTIONAL) run_install_test(FILES-OPTIONAL) run_install_test(DIRECTORY-OPTIONAL) +run_install_test(TARGETS-Defaults) + +set(RunCMake_TEST_OPTIONS + "-DCMAKE_INSTALL_BINDIR:PATH=mybin" + "-DCMAKE_INSTALL_LIBDIR:PATH=mylib" + "-DCMAKE_INSTALL_INCLUDEDIR:PATH=myinclude" + ) +run_install_test(TARGETS-Defaults-Cache) +unset(RunCMake_TEST_OPTIONS) + +run_install_test(FILES-TYPE) +run_install_test(DIRECTORY-TYPE) + +set(RunCMake_TEST_OPTIONS + "-DCMAKE_INSTALL_BINDIR:PATH=mybin" + "-DCMAKE_INSTALL_SBINDIR:PATH=mysbin" + "-DCMAKE_INSTALL_LIBEXECDIR:PATH=mylibexec" + "-DCMAKE_INSTALL_LIBDIR:PATH=mylib" + "-DCMAKE_INSTALL_INCLUDEDIR:PATH=myinclude" + "-DCMAKE_INSTALL_SYSCONFDIR:PATH=myetc" + "-DCMAKE_INSTALL_SHAREDSTATEDIR:PATH=mycom" + "-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=myvar" + "-DCMAKE_INSTALL_RUNSTATEDIR:PATH=myrun" + "-DCMAKE_INSTALL_DATADIR:PATH=myshare" + "-DCMAKE_INSTALL_INFODIR:PATH=myinfo" + "-DCMAKE_INSTALL_LOCALEDIR:PATH=mylocale" + "-DCMAKE_INSTALL_MANDIR:PATH=myman" + "-DCMAKE_INSTALL_DOCDIR:PATH=mydoc" + ) +run_install_test(FILES-TYPE-Cache) +run_install_test(DIRECTORY-TYPE-Cache) +unset(RunCMake_TEST_OPTIONS) + +set(RunCMake_TEST_OPTIONS + "-DCMAKE_INSTALL_LOCALSTATEDIR:PATH=myvar" + "-DCMAKE_INSTALL_DATAROOTDIR:PATH=myshare" + ) +run_install_test(FILES-TYPE-CacheDependent) +run_install_test(DIRECTORY-TYPE-CacheDependent) +unset(RunCMake_TEST_OPTIONS) set(RunCMake_TEST_OPTIONS "-DCMAKE_BUILD_TYPE:STRING=Debug") run_install_test(TARGETS-OUTPUT_NAME) diff --git a/Tests/RunCMake/install/TARGETS-Apple-Defaults-result.txt b/Tests/RunCMake/install/TARGETS-Apple-Defaults-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-Apple-Defaults-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/install/TARGETS-Apple-Defaults-stderr.txt b/Tests/RunCMake/install/TARGETS-Apple-Defaults-stderr.txt new file mode 100644 index 0000000..645882f --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-Apple-Defaults-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at TARGETS-Apple-Defaults\.cmake:[0-9]+ \(install\): + install TARGETS given no BUNDLE DESTINATION for MACOSX_BUNDLE executable + target "exe"\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\) + + +CMake Error at TARGETS-Apple-Defaults\.cmake:[0-9]+ \(install\): + install TARGETS given no FRAMEWORK DESTINATION for shared library FRAMEWORK + target "lib1"\. +Call Stack \(most recent call first\): + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/install/TARGETS-Apple-Defaults.cmake b/Tests/RunCMake/install/TARGETS-Apple-Defaults.cmake new file mode 100644 index 0000000..b60c318 --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-Apple-Defaults.cmake @@ -0,0 +1,8 @@ +enable_language(C) + +add_executable(exe MACOSX_BUNDLE main.c) +add_library(lib1 SHARED obj1.c) +set_property(TARGET lib1 PROPERTY FRAMEWORK ON) + +install(TARGETS exe) +install(TARGETS lib1) diff --git a/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake b/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake new file mode 100644 index 0000000..6fc735c --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-Defaults-Cache-all-check.cmake @@ -0,0 +1,49 @@ +if(WIN32) + set(_check_files + [[lib3]] + [[lib3/(lib)?lib3\.(dll\.a|lib)]] + [[lib4]] + [[lib4/(lib)?lib4\.dll]] + [[mybin]] + [[mybin/exe\.exe]] + [[mybin/(lib)?lib1\.dll]] + [[myinclude]] + [[myinclude/obj4\.h]] + [[myinclude/obj5\.h]] + [[mylib]] + [[mylib/(lib)?lib1\.(dll\.a|lib)]] + [[mylib/(lib)?lib2\.(a|lib)]] + ) +elseif(CYGWIN) + set(_check_files + [[lib3]] + [[lib3/liblib3\.dll\.a]] + [[lib4]] + [[lib4/cyglib4\.dll]] + [[mybin]] + [[mybin/exe\.exe]] + [[mybin/cyglib1\.dll]] + [[myinclude]] + [[myinclude/obj4\.h]] + [[myinclude/obj5\.h]] + [[mylib]] + [[mylib/liblib1\.dll\.a]] + [[mylib/liblib2\.a]] + ) +else() + set(_check_files + [[lib3]] + [[lib3/liblib3\.(dylib|so)]] + [[lib4]] + [[lib4/liblib4\.(dylib|so)]] + [[mybin]] + [[mybin/exe]] + [[myinclude]] + [[myinclude/obj4\.h]] + [[myinclude/obj5\.h]] + [[mylib]] + [[mylib/liblib1\.(dylib|so)]] + [[mylib/liblib2\.a]] + ) +endif() +check_installed("^${_check_files}$") diff --git a/Tests/RunCMake/install/TARGETS-Defaults-Cache.cmake b/Tests/RunCMake/install/TARGETS-Defaults-Cache.cmake new file mode 100644 index 0000000..bfd8c2c --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-Defaults-Cache.cmake @@ -0,0 +1,19 @@ +enable_language(C) + +add_executable(exe main.c) +add_library(lib1 SHARED obj1.c) +add_library(lib2 STATIC obj3.c) +add_library(lib3 SHARED obj4.c) +set_property(TARGET lib3 PROPERTY PRIVATE_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/obj4.h) +add_library(lib4 SHARED obj5.c) +set_property(TARGET lib4 PROPERTY PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/obj5.h) + +install(TARGETS exe lib1 lib2) +install(TARGETS lib3 + LIBRARY DESTINATION lib3 + ARCHIVE DESTINATION lib3 + ) +install(TARGETS lib4 + LIBRARY DESTINATION lib4 + RUNTIME DESTINATION lib4 + ) diff --git a/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake b/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake new file mode 100644 index 0000000..59209e6 --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-Defaults-all-check.cmake @@ -0,0 +1,49 @@ +if(WIN32) + set(_check_files + [[bin]] + [[bin/exe\.exe]] + [[bin/(lib)?lib1\.dll]] + [[include]] + [[include/obj4\.h]] + [[include/obj5\.h]] + [[lib]] + [[lib/(lib)?lib1\.(dll\.a|lib)]] + [[lib/(lib)?lib2\.(a|lib)]] + [[lib3]] + [[lib3/(lib)?lib3\.(dll\.a|lib)]] + [[lib4]] + [[lib4/(lib)?lib4\.dll]] + ) +elseif(CYGWIN) + set(_check_files + [[bin]] + [[bin/exe\.exe]] + [[bin/cyglib1\.dll]] + [[include]] + [[include/obj4\.h]] + [[include/obj5\.h]] + [[lib]] + [[lib/liblib1\.dll\.a]] + [[lib/liblib2\.a]] + [[lib3]] + [[lib3/liblib3\.dll\.a]] + [[lib4]] + [[lib4/cyglib4\.dll]] + ) +else() + set(_check_files + [[bin]] + [[bin/exe]] + [[include]] + [[include/obj4\.h]] + [[include/obj5\.h]] + [[lib]] + [[lib/liblib1\.(dylib|so)]] + [[lib/liblib2\.a]] + [[lib3]] + [[lib3/liblib3\.(dylib|so)]] + [[lib4]] + [[lib4/liblib4\.(dylib|so)]] + ) +endif() +check_installed("^${_check_files}$") diff --git a/Tests/RunCMake/install/TARGETS-Defaults.cmake b/Tests/RunCMake/install/TARGETS-Defaults.cmake new file mode 100644 index 0000000..bfd8c2c --- /dev/null +++ b/Tests/RunCMake/install/TARGETS-Defaults.cmake @@ -0,0 +1,19 @@ +enable_language(C) + +add_executable(exe main.c) +add_library(lib1 SHARED obj1.c) +add_library(lib2 STATIC obj3.c) +add_library(lib3 SHARED obj4.c) +set_property(TARGET lib3 PROPERTY PRIVATE_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/obj4.h) +add_library(lib4 SHARED obj5.c) +set_property(TARGET lib4 PROPERTY PUBLIC_HEADER ${CMAKE_CURRENT_SOURCE_DIR}/obj5.h) + +install(TARGETS exe lib1 lib2) +install(TARGETS lib3 + LIBRARY DESTINATION lib3 + ARCHIVE DESTINATION lib3 + ) +install(TARGETS lib4 + LIBRARY DESTINATION lib4 + RUNTIME DESTINATION lib4 + ) diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt index 187a826..fe65fd3 100644 --- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt +++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-all-stderr.txt @@ -2,4 +2,4 @@ install TARGETS given NAMELINK_COMPONENT option not in LIBRARY group\. The NAMELINK_COMPONENT option may be specified only following LIBRARY\. Call Stack \(most recent call first\): - CMakeLists\.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt index d1002ba..60f52c4 100644 --- a/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt +++ b/Tests/RunCMake/install/TARGETS-NAMELINK_COMPONENT-bad-exc-stderr.txt @@ -2,4 +2,4 @@ install TARGETS given NAMELINK_COMPONENT option not in LIBRARY group\. The NAMELINK_COMPONENT option may be specified only following LIBRARY\. Call Stack \(most recent call first\): - CMakeLists\.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/install/obj3.c b/Tests/RunCMake/install/obj3.c new file mode 100644 index 0000000..991fed3 --- /dev/null +++ b/Tests/RunCMake/install/obj3.c @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif + int obj3(void) +{ + return 0; +} diff --git a/Tests/RunCMake/install/obj3.h b/Tests/RunCMake/install/obj3.h new file mode 100644 index 0000000..9e8bb76 --- /dev/null +++ b/Tests/RunCMake/install/obj3.h @@ -0,0 +1,6 @@ +#ifndef OBJ3_H +#define OBJ3_H + +int obj3(void); + +#endif /* OBJ3_H */ diff --git a/Tests/RunCMake/install/obj4.c b/Tests/RunCMake/install/obj4.c new file mode 100644 index 0000000..edd6172 --- /dev/null +++ b/Tests/RunCMake/install/obj4.c @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif + int obj4(void) +{ + return 0; +} diff --git a/Tests/RunCMake/install/obj4.h b/Tests/RunCMake/install/obj4.h new file mode 100644 index 0000000..6195aa7 --- /dev/null +++ b/Tests/RunCMake/install/obj4.h @@ -0,0 +1,6 @@ +#ifndef OBJ4_H +#define OBJ4_H + +int obj4(void); + +#endif /* OBJ4_H */ diff --git a/Tests/RunCMake/install/obj5.c b/Tests/RunCMake/install/obj5.c new file mode 100644 index 0000000..df3e997 --- /dev/null +++ b/Tests/RunCMake/install/obj5.c @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif + int obj5(void) +{ + return 0; +} diff --git a/Tests/RunCMake/install/obj5.h b/Tests/RunCMake/install/obj5.h new file mode 100644 index 0000000..a16a1b0 --- /dev/null +++ b/Tests/RunCMake/install/obj5.h @@ -0,0 +1,6 @@ +#ifndef OBJ5_H +#define OBJ5_H + +int obj5(void); + +#endif /* OBJ5_H */ diff --git a/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt b/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt index b24a0ed..9368e88 100644 --- a/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt +++ b/Tests/RunCMake/list/EmptyRemoveAt0-stderr.txt @@ -1,4 +1,4 @@ CMake Error at EmptyRemoveAt0.cmake:2 \(list\): - list REMOVE_AT given empty list + list index: mylist, 0 out of range \(0, 0\) Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/FILTER-NotList-stderr.txt b/Tests/RunCMake/list/FILTER-NotList-stderr.txt deleted file mode 100644 index 159c28d..0000000 --- a/Tests/RunCMake/list/FILTER-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at FILTER-NotList.cmake:2 \(list\): - list sub-command FILTER requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/FILTER-NotList.cmake b/Tests/RunCMake/list/FILTER-NotList.cmake index 1e15635..bf09ec7 100644 --- a/Tests/RunCMake/list/FILTER-NotList.cmake +++ b/Tests/RunCMake/list/FILTER-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(FILTER nosuchlist EXCLUDE REGEX "^FILTER_THIS_.+") +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(FILTER) created our list") +endif () diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt b/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt b/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt new file mode 100644 index 0000000..582b74b --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at REMOVE_AT-EmptyList.cmake:2 \(list\): + list index: nosuchlist, 0 out of range \(0, 0\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake b/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake new file mode 100644 index 0000000..ff0dde8 --- /dev/null +++ b/Tests/RunCMake/list/REMOVE_AT-EmptyList.cmake @@ -0,0 +1,6 @@ +set(nosuchlist "") +list(REMOVE_AT nosuchlist 0) +if (NOT DEFINED nosuchlist OR NOT nosuchlist STREQUAL "") + message(FATAL_ERROR + "list(REMOVE_AT) modified our list") +endif () diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt index d6e8d85..563d865 100644 --- a/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt +++ b/Tests/RunCMake/list/REMOVE_AT-NotList-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at REMOVE_AT-NotList.cmake:2 \(list\): - list sub-command REMOVE_AT requires list to be present. + list index: nosuchlist, 0 out of range \(0, 0\) Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake index 5266c7f..090df49 100644 --- a/Tests/RunCMake/list/REMOVE_AT-NotList.cmake +++ b/Tests/RunCMake/list/REMOVE_AT-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(REMOVE_AT nosuchlist 0) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(REMOVE_AT) created our list") +endif () diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt deleted file mode 100644 index 96f3446..0000000 --- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at REMOVE_DUPLICATES-NotList.cmake:2 \(list\): - list sub-command REMOVE_DUPLICATES requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake index 218f227..b9f3999 100644 --- a/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake +++ b/Tests/RunCMake/list/REMOVE_DUPLICATES-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(REMOVE_DUPLICATES nosuchlist) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(REMOVE_DUPLICATES) created our list") +endif () diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt b/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt deleted file mode 100644 index c32a4c0..0000000 --- a/Tests/RunCMake/list/REMOVE_ITEM-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at REMOVE_ITEM-NotList.cmake:2 \(list\): - list sub-command REMOVE_ITEM requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake b/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake index 079e7fb..0c66837 100644 --- a/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake +++ b/Tests/RunCMake/list/REMOVE_ITEM-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(REMOVE_ITEM nosuchlist alpha) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(REMOVE_ITEM) created our list") +endif () diff --git a/Tests/RunCMake/list/REVERSE-NotList-stderr.txt b/Tests/RunCMake/list/REVERSE-NotList-stderr.txt deleted file mode 100644 index e9dcc06..0000000 --- a/Tests/RunCMake/list/REVERSE-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at REVERSE-NotList.cmake:2 \(list\): - list sub-command REVERSE requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/REVERSE-NotList.cmake b/Tests/RunCMake/list/REVERSE-NotList.cmake index 977e2cc..7138329 100644 --- a/Tests/RunCMake/list/REVERSE-NotList.cmake +++ b/Tests/RunCMake/list/REVERSE-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(REVERSE nosuchlist) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(REVERSE) created our list") +endif () diff --git a/Tests/RunCMake/list/RunCMakeTest.cmake b/Tests/RunCMake/list/RunCMakeTest.cmake index a8a0b57..bf3d22d 100644 --- a/Tests/RunCMake/list/RunCMakeTest.cmake +++ b/Tests/RunCMake/list/RunCMakeTest.cmake @@ -22,6 +22,8 @@ run_cmake(REMOVE_DUPLICATES-TooManyArguments) run_cmake(REVERSE-TooManyArguments) run_cmake(SUBLIST-TooManyArguments) +run_cmake(REMOVE_AT-EmptyList) + run_cmake(FILTER-NotList) run_cmake(REMOVE_AT-NotList) run_cmake(REMOVE_DUPLICATES-NotList) diff --git a/Tests/RunCMake/list/SORT-NotList-stderr.txt b/Tests/RunCMake/list/SORT-NotList-stderr.txt deleted file mode 100644 index 396c5b5..0000000 --- a/Tests/RunCMake/list/SORT-NotList-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Error at SORT-NotList.cmake:2 \(list\): - list sub-command SORT requires list to be present. -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/list/SORT-NotList.cmake b/Tests/RunCMake/list/SORT-NotList.cmake index 8f48e10..6314f14 100644 --- a/Tests/RunCMake/list/SORT-NotList.cmake +++ b/Tests/RunCMake/list/SORT-NotList.cmake @@ -1,2 +1,6 @@ unset(nosuchlist) list(SORT nosuchlist) +if (DEFINED nosuchlist) + message(FATAL_ERROR + "list(SORT) created our list") +endif () diff --git a/Tests/RunCMake/pseudo_cppcheck.c b/Tests/RunCMake/pseudo_cppcheck.c index 75f3cec..5b1531b 100644 --- a/Tests/RunCMake/pseudo_cppcheck.c +++ b/Tests/RunCMake/pseudo_cppcheck.c @@ -5,13 +5,16 @@ int main(int argc, char* argv[]) { int i; + int result = 0; for (i = 1; i < argc; ++i) { - if (strcmp(argv[i], "-bad") == 0) - if (strcmp(argv[i], "-bad") == 0) { - fprintf(stdout, "stdout from bad command line arg '-bad'\n"); - fprintf(stderr, "stderr from bad command line arg '-bad'\n"); - return 1; - } + if (strcmp(argv[i], "-bad") == 0) { + fprintf(stdout, "stdout from bad command line arg '-bad'\n"); + fprintf(stderr, "stderr from bad command line arg '-bad'\n"); + return 1; + } else if (strcmp(argv[i], "-error") == 0) { + // The real cppcheck allows to set the exitcode with --error-exitcode + result = 5; + } } fprintf(stderr, "[/foo/bar.c:2]: (error) Array 'abc[10]' accessed at index 12," @@ -31,6 +34,6 @@ int main(int argc, char* argv[]) fprintf(stderr, "[/foo/bar.c:2]: (information) cannot find all the include " "files (use --check-config for details)\n"); - // we allow this to return 1 as we ignore it - return 1; + + return result; } diff --git a/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt index f21b1de..e45fc64 100644 --- a/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt +++ b/Tests/RunCMake/set_property/IMPORTED_GLOBAL-stderr.txt @@ -3,7 +3,7 @@ \(\"ImportedGlobalTarget\"\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) CMake Error at IMPORTED_GLOBAL.cmake:16 \(set_property\): @@ -11,7 +11,7 @@ CMake Error at IMPORTED_GLOBAL.cmake:16 \(set_property\): \(\"ImportedGlobalTarget\"\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) CMake Error at IMPORTED_GLOBAL.cmake:26 \(set_property\): @@ -19,7 +19,7 @@ CMake Error at IMPORTED_GLOBAL.cmake:26 \(set_property\): \(\"ImportedLocalTarget\"\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) CMake Error at IMPORTED_GLOBAL.cmake:32 \(set_property\): @@ -27,10 +27,10 @@ CMake Error at IMPORTED_GLOBAL.cmake:32 \(set_property\): \(\"NonImportedTarget\"\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) -CMake Error at IMPORTED_GLOBAL/CMakeLists.txt:8 \(set_property\): +CMake Error at IMPORTED_GLOBAL/CMakeLists\.txt:[0-9]+ \(set_property\): Attempt to promote imported target \"ImportedLocalTarget2\" to global scope \(by setting IMPORTED_GLOBAL\) which is not built in this directory. @@ -45,7 +45,7 @@ CMake Error at IMPORTED_GLOBAL.cmake:50 \(set_property\): Attempt to promote imported target \"ImportedSubdirTarget1\" to global scope \(by setting IMPORTED_GLOBAL\) which is not built in this directory. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) CMake Error in IMPORTED_GLOBAL/CMakeLists.txt: @@ -58,4 +58,4 @@ CMake Error at IMPORTED_GLOBAL.cmake:52 \(set_property\): Attempt to promote imported target \"ImportedSubdirTarget2\" to global scope \(by setting IMPORTED_GLOBAL\) which is not built in this directory. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/string/AppendNoArgs-stderr.txt b/Tests/RunCMake/string/AppendNoArgs-stderr.txt index 75ad427..9b7e9fa 100644 --- a/Tests/RunCMake/string/AppendNoArgs-stderr.txt +++ b/Tests/RunCMake/string/AppendNoArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at AppendNoArgs.cmake:1 \(string\): string sub-command APPEND requires at least one argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/ConcatNoArgs-stderr.txt b/Tests/RunCMake/string/ConcatNoArgs-stderr.txt index efea5f1..22b608d 100644 --- a/Tests/RunCMake/string/ConcatNoArgs-stderr.txt +++ b/Tests/RunCMake/string/ConcatNoArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at ConcatNoArgs.cmake:1 \(string\): string sub-command CONCAT requires at least one argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/JoinNoArgs-stderr.txt b/Tests/RunCMake/string/JoinNoArgs-stderr.txt index d9dcec3..7fcd352 100644 --- a/Tests/RunCMake/string/JoinNoArgs-stderr.txt +++ b/Tests/RunCMake/string/JoinNoArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at JoinNoArgs.cmake:1 \(string\): string sub-command JOIN requires at least two arguments. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/JoinNoVar-stderr.txt b/Tests/RunCMake/string/JoinNoVar-stderr.txt index 90701a9..b4a09c3 100644 --- a/Tests/RunCMake/string/JoinNoVar-stderr.txt +++ b/Tests/RunCMake/string/JoinNoVar-stderr.txt @@ -1,4 +1,4 @@ CMake Error at JoinNoVar.cmake:1 \(string\): string sub-command JOIN requires at least two arguments. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/PrependNoArgs-stderr.txt b/Tests/RunCMake/string/PrependNoArgs-stderr.txt index 8d433f9..c8acba8 100644 --- a/Tests/RunCMake/string/PrependNoArgs-stderr.txt +++ b/Tests/RunCMake/string/PrependNoArgs-stderr.txt @@ -1,4 +1,4 @@ CMake Error at PrependNoArgs.cmake:1 \(string\): string sub-command PREPEND requires at least one argument. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidBadNamespace-stderr.txt b/Tests/RunCMake/string/UuidBadNamespace-stderr.txt index cb12903..340189b 100644 --- a/Tests/RunCMake/string/UuidBadNamespace-stderr.txt +++ b/Tests/RunCMake/string/UuidBadNamespace-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidBadNamespace.cmake:3 \(string\): string UUID sub-command, malformed NAMESPACE UUID. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidBadType-stderr.txt b/Tests/RunCMake/string/UuidBadType-stderr.txt index 1993c04..2734d86 100644 --- a/Tests/RunCMake/string/UuidBadType-stderr.txt +++ b/Tests/RunCMake/string/UuidBadType-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidBadType.cmake:3 \(string\): string UUID sub-command, unknown TYPE 'FOO'. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt b/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt index 0b7cde4..79819a9 100644 --- a/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt +++ b/Tests/RunCMake/string/UuidMissingNameValue-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidMissingNameValue.cmake:3 \(string\): string UUID sub-command, NAME requires a value. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt b/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt index dfcfe42..1ffc53f 100644 --- a/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt +++ b/Tests/RunCMake/string/UuidMissingNamespace-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidMissingNamespace.cmake:3 \(string\): string UUID sub-command, malformed NAMESPACE UUID. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt b/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt index 86585ad..2a73d3f 100644 --- a/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt +++ b/Tests/RunCMake/string/UuidMissingNamespaceValue-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidMissingNamespaceValue.cmake:3 \(string\): string UUID sub-command, NAMESPACE requires a value. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt b/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt index 70252f8..44bd479 100644 --- a/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt +++ b/Tests/RunCMake/string/UuidMissingTypeValue-stderr.txt @@ -1,4 +1,4 @@ CMake Error at UuidMissingTypeValue.cmake:3 \(string\): string UUID sub-command, TYPE requires a value. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_definitions/CMakeLists.txt b/Tests/RunCMake/target_compile_definitions/CMakeLists.txt new file mode 100644 index 0000000..14ef56e --- /dev/null +++ b/Tests/RunCMake/target_compile_definitions/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.11) + +project(${RunCMake_TEST} LANGUAGES NONE) + +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake new file mode 100644 index 0000000..b67c598 --- /dev/null +++ b/Tests/RunCMake/target_compile_definitions/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(empty_keyword_args) diff --git a/Tests/RunCMake/target_compile_definitions/empty_keyword_args.cmake b/Tests/RunCMake/target_compile_definitions/empty_keyword_args.cmake new file mode 100644 index 0000000..cb94e87 --- /dev/null +++ b/Tests/RunCMake/target_compile_definitions/empty_keyword_args.cmake @@ -0,0 +1,5 @@ +add_library(iface INTERFACE) +target_compile_definitions(iface PUBLIC PRIVATE INTERFACE) +# Cannot be called with non-compilable targets. +#add_library(imported UNKNOWN IMPORTED) +#target_compile_definitions(imported PUBLIC PRIVATE INTERFACE) diff --git a/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake index 1f67f11..f8b0809 100644 --- a/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake @@ -12,3 +12,4 @@ run_cmake(no_matching_cxx_feature) run_cmake(not_a_c_feature) run_cmake(no_matching_c_feature) run_cmake(cxx_not_enabled) +run_cmake(empty_keyword_args) diff --git a/Tests/RunCMake/target_compile_features/alias_target-stderr.txt b/Tests/RunCMake/target_compile_features/alias_target-stderr.txt index 5ebe170..1658f58 100644 --- a/Tests/RunCMake/target_compile_features/alias_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/alias_target-stderr.txt @@ -1,4 +1,4 @@ CMake Error at alias_target.cmake:[0-9]+ \(target_compile_features\): target_compile_features can not be used on an ALIAS target. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt index 4f707c7..5b4761c 100644 --- a/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt +++ b/Tests/RunCMake/target_compile_features/cxx_not_enabled-stderr.txt @@ -1,4 +1,4 @@ ^CMake Error at cxx_not_enabled.cmake:[0-9]+ \(target_compile_features\): target_compile_features cannot use features from non-enabled language CXX Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/target_compile_features/empty_keyword_args.cmake b/Tests/RunCMake/target_compile_features/empty_keyword_args.cmake new file mode 100644 index 0000000..8d57c1c --- /dev/null +++ b/Tests/RunCMake/target_compile_features/empty_keyword_args.cmake @@ -0,0 +1,5 @@ +add_library(iface INTERFACE) +target_compile_features(iface PUBLIC PRIVATE INTERFACE) +# Cannot be called with non-compilable targets. +#add_library(imported UNKNOWN IMPORTED) +#target_compile_features(imported PUBLIC PRIVATE INTERFACE) diff --git a/Tests/RunCMake/target_compile_features/imported_target-stderr.txt b/Tests/RunCMake/target_compile_features/imported_target-stderr.txt index afad537..f2a1aba 100644 --- a/Tests/RunCMake/target_compile_features/imported_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/imported_target-stderr.txt @@ -2,4 +2,4 @@ target_compile_features may only set INTERFACE properties on INTERFACE targets Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\)$ + CMakeLists\.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt b/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt index 9917be7..ee57b54 100644 --- a/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt +++ b/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt @@ -1,4 +1,4 @@ CMake Error at invalid_args.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with invalid arguments Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt index 23a8eeb..d6564f4 100644 --- a/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt +++ b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt @@ -2,4 +2,4 @@ CMake Error at invalid_args_on_interface.cmake:[0-9]+ \(target_compile_features\ target_compile_features may only set INTERFACE properties on INTERFACE targets Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt b/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt index 1875d12..07ddd6a 100644 --- a/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt @@ -5,4 +5,4 @@ CMake Error at no_matching_c_feature.cmake:[0-9]+ \((target_compile_features|mes version 4.8.1. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt index 90d41c9..9392f4b 100644 --- a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt @@ -5,4 +5,4 @@ CMake Error at no_matching_cxx_feature.cmake:[0-9]+ \((target_compile_features|m version *[.0-9]+\. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/no_target-stderr.txt b/Tests/RunCMake/target_compile_features/no_target-stderr.txt index 65974b4..7b62c94 100644 --- a/Tests/RunCMake/target_compile_features/no_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/no_target-stderr.txt @@ -2,4 +2,4 @@ CMake Error at no_target.cmake:[0-9]+ \(target_compile_features\): Cannot specify compile features for target "main" which is not built by this project. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt b/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt index 493c582..8a4055d 100644 --- a/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt @@ -2,4 +2,4 @@ CMake Error at not_a_c_feature.cmake:[0-9]+ \(target_compile_features\): target_compile_features specified unknown feature "c_not_a_feature" for target "main". Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt index 3dbf0e6..bd7f2c6 100644 --- a/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt @@ -2,4 +2,4 @@ CMake Error at not_a_cxx_feature.cmake:[0-9]+ \(target_compile_features\): target_compile_features specified unknown feature "cxx_not_a_feature" for target "main". Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt b/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt index c0c2efa..34f1ce2 100644 --- a/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt +++ b/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt @@ -1,4 +1,4 @@ CMake Error at not_enough_args.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with incorrect number of arguments Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_features/utility_target-stderr.txt b/Tests/RunCMake/target_compile_features/utility_target-stderr.txt index ff03310..0c01377 100644 --- a/Tests/RunCMake/target_compile_features/utility_target-stderr.txt +++ b/Tests/RunCMake/target_compile_features/utility_target-stderr.txt @@ -1,4 +1,4 @@ CMake Error at utility_target.cmake:[0-9]+ \(target_compile_features\): target_compile_features called with non-compilable target type Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_compile_options/CMakeLists.txt b/Tests/RunCMake/target_compile_options/CMakeLists.txt new file mode 100644 index 0000000..14ef56e --- /dev/null +++ b/Tests/RunCMake/target_compile_options/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.11) + +project(${RunCMake_TEST} LANGUAGES NONE) + +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake new file mode 100644 index 0000000..b67c598 --- /dev/null +++ b/Tests/RunCMake/target_compile_options/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(empty_keyword_args) diff --git a/Tests/RunCMake/target_compile_options/empty_keyword_args.cmake b/Tests/RunCMake/target_compile_options/empty_keyword_args.cmake new file mode 100644 index 0000000..8b92fcf --- /dev/null +++ b/Tests/RunCMake/target_compile_options/empty_keyword_args.cmake @@ -0,0 +1,5 @@ +add_library(iface INTERFACE) +target_compile_options(iface PUBLIC PRIVATE INTERFACE) +# Cannot be called with non-compilable targets. +#add_library(imported UNKNOWN IMPORTED) +#target_compile_options(imported PUBLIC PRIVATE INTERFACE) diff --git a/Tests/RunCMake/target_include_directories/CMakeLists.txt b/Tests/RunCMake/target_include_directories/CMakeLists.txt new file mode 100644 index 0000000..14ef56e --- /dev/null +++ b/Tests/RunCMake/target_include_directories/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.11) + +project(${RunCMake_TEST} LANGUAGES NONE) + +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_include_directories/RunCMakeTest.cmake b/Tests/RunCMake/target_include_directories/RunCMakeTest.cmake new file mode 100644 index 0000000..b67c598 --- /dev/null +++ b/Tests/RunCMake/target_include_directories/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(empty_keyword_args) diff --git a/Tests/RunCMake/target_include_directories/empty_keyword_args.cmake b/Tests/RunCMake/target_include_directories/empty_keyword_args.cmake new file mode 100644 index 0000000..08eaf91 --- /dev/null +++ b/Tests/RunCMake/target_include_directories/empty_keyword_args.cmake @@ -0,0 +1,5 @@ +add_library(iface INTERFACE) +target_include_directories(iface PUBLIC PRIVATE INTERFACE) +# Cannot be called with non-compilable targets. +#add_library(imported UNKNOWN IMPORTED) +#target_include_directories(imported PUBLIC PRIVATE INTERFACE) diff --git a/Tests/RunCMake/target_link_directories/CMakeLists.txt b/Tests/RunCMake/target_link_directories/CMakeLists.txt new file mode 100644 index 0000000..14ef56e --- /dev/null +++ b/Tests/RunCMake/target_link_directories/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.11) + +project(${RunCMake_TEST} LANGUAGES NONE) + +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_link_directories/RunCMakeTest.cmake b/Tests/RunCMake/target_link_directories/RunCMakeTest.cmake new file mode 100644 index 0000000..b67c598 --- /dev/null +++ b/Tests/RunCMake/target_link_directories/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(empty_keyword_args) diff --git a/Tests/RunCMake/target_link_directories/empty_keyword_args.cmake b/Tests/RunCMake/target_link_directories/empty_keyword_args.cmake new file mode 100644 index 0000000..aadf80a --- /dev/null +++ b/Tests/RunCMake/target_link_directories/empty_keyword_args.cmake @@ -0,0 +1,5 @@ +add_library(iface INTERFACE) +target_link_directories(iface PUBLIC PRIVATE INTERFACE) +# Cannot be called with non-compilable targets. +#add_library(imported UNKNOWN IMPORTED) +#target_link_directories(imported PUBLIC PRIVATE INTERFACE) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt index 8e3f315..12c00fb 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-2-stderr.txt @@ -8,4 +8,4 @@ CMake Error at CMP0023-NEW-2.cmake:11 \(target_link_libraries\): \* CMP0023-NEW-2.cmake:10 \(target_link_libraries\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt index 2ef2290..117c806 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0023-NEW-stderr.txt @@ -8,4 +8,4 @@ CMake Error at CMP0023-NEW.cmake:11 \(target_link_libraries\): \* CMP0023-NEW.cmake:10 \(target_link_libraries\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt index 5147861..7e49d52 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-2-stderr.txt @@ -13,4 +13,4 @@ CMake Warning \(dev\) at CMP0023-WARN-2.cmake:9 \(target_link_libraries\): \* CMP0023-WARN-2.cmake:8 \(target_link_libraries\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt index a7474fa..df1288e 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0023-WARN-stderr.txt @@ -13,4 +13,4 @@ CMake Warning \(dev\) at CMP0023-WARN.cmake:9 \(target_link_libraries\): \* CMP0023-WARN.cmake:8 \(target_link_libraries\) Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/CMP0079-link-NEW-bogus-stderr.txt b/Tests/RunCMake/target_link_libraries/CMP0079-link-NEW-bogus-stderr.txt index b9fe3f6..8ef35c1 100644 --- a/Tests/RunCMake/target_link_libraries/CMP0079-link-NEW-bogus-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/CMP0079-link-NEW-bogus-stderr.txt @@ -3,4 +3,4 @@ found. Perhaps a find_package\(\) call is missing for an IMPORTED target, or an ALIAS target is missing\? Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt b/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt index c6237f4..5b0caf7 100644 --- a/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt +++ b/Tests/RunCMake/target_link_libraries/MixedSignature-stderr.txt @@ -2,4 +2,4 @@ CMake Error at MixedSignature.cmake:6 \(target_link_libraries\): The INTERFACE, PUBLIC or PRIVATE option must appear as the second argument, just after the target name. Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) + CMakeLists\.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake index a041d6d..0152d4c 100644 --- a/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_libraries/RunCMakeTest.cmake @@ -19,3 +19,4 @@ run_cmake(SharedDepNotTarget) run_cmake(StaticPrivateDepNotExported) run_cmake(StaticPrivateDepNotTarget) run_cmake(UNKNOWN-IMPORTED-GLOBAL) +run_cmake(empty_keyword_args) diff --git a/Tests/RunCMake/target_link_libraries/empty_keyword_args.cmake b/Tests/RunCMake/target_link_libraries/empty_keyword_args.cmake new file mode 100644 index 0000000..440fa06 --- /dev/null +++ b/Tests/RunCMake/target_link_libraries/empty_keyword_args.cmake @@ -0,0 +1,4 @@ +add_library(iface INTERFACE) +target_link_libraries(iface PUBLIC PRIVATE INTERFACE) +add_library(imported UNKNOWN IMPORTED) +target_link_libraries(imported PUBLIC PRIVATE INTERFACE) diff --git a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake index 1eaa5d2..1d9ef8b 100644 --- a/Tests/RunCMake/target_link_options/RunCMakeTest.cmake +++ b/Tests/RunCMake/target_link_options/RunCMakeTest.cmake @@ -39,3 +39,5 @@ if(RunCMake_GENERATOR MATCHES "(Ninja|Makefile)") run_cmake_target(LINKER_expansion LINKER linker) run_cmake_target(LINKER_expansion LINKER_SHELL linker_shell) endif() + +run_cmake(empty_keyword_args) diff --git a/Tests/RunCMake/target_link_options/empty_keyword_args.cmake b/Tests/RunCMake/target_link_options/empty_keyword_args.cmake new file mode 100644 index 0000000..a1a297e --- /dev/null +++ b/Tests/RunCMake/target_link_options/empty_keyword_args.cmake @@ -0,0 +1,5 @@ +add_library(iface INTERFACE) +target_link_options(iface PUBLIC PRIVATE INTERFACE) +# Cannot be called with non-compilable targets. +#add_library(imported UNKNOWN IMPORTED) +#target_link_options(imported PUBLIC PRIVATE INTERFACE) diff --git a/Tests/RunCMake/target_sources/CMakeLists.txt b/Tests/RunCMake/target_sources/CMakeLists.txt new file mode 100644 index 0000000..14ef56e --- /dev/null +++ b/Tests/RunCMake/target_sources/CMakeLists.txt @@ -0,0 +1,5 @@ +cmake_minimum_required(VERSION 3.11) + +project(${RunCMake_TEST} LANGUAGES NONE) + +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_sources/RunCMakeTest.cmake b/Tests/RunCMake/target_sources/RunCMakeTest.cmake new file mode 100644 index 0000000..b67c598 --- /dev/null +++ b/Tests/RunCMake/target_sources/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(empty_keyword_args) diff --git a/Tests/RunCMake/target_sources/empty_keyword_args.cmake b/Tests/RunCMake/target_sources/empty_keyword_args.cmake new file mode 100644 index 0000000..5cee451 --- /dev/null +++ b/Tests/RunCMake/target_sources/empty_keyword_args.cmake @@ -0,0 +1,5 @@ +add_library(iface INTERFACE) +target_sources(iface PUBLIC PRIVATE INTERFACE) +# Cannot be called with non-compilable targets. +#add_library(imported UNKNOWN IMPORTED) +#target_sources(imported PUBLIC PRIVATE INTERFACE) diff --git a/Tests/RunCMake/try_compile/LinkOptions.cmake b/Tests/RunCMake/try_compile/LinkOptions.cmake new file mode 100644 index 0000000..9b246c4 --- /dev/null +++ b/Tests/RunCMake/try_compile/LinkOptions.cmake @@ -0,0 +1,38 @@ + +enable_language(C) + +cmake_policy(SET CMP0054 NEW) + +set (lib_name "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}lib${CMAKE_STATIC_LIBRARY_SUFFIX}") +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if (RunCMake_C_COMPILER_ID STREQUAL "MSVC") + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set (undef_flag /INCLUDE:_func) + else() + set (undef_flag /INCLUDE:func) + endif() + else() + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set (undef_flag -u _func) + else() + set (undef_flag -u func) + endif() + endif() +elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set (undef_flag -u _func) +else() + set (undef_flag -u func) +endif() + +set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) +try_compile(result ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib.c + COPY_FILE "${lib_name}") + +set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE) +try_compile(result ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/main.c + OUTPUT_VARIABLE out + LINK_OPTIONS ${undef_flag} "${lib_name}") + +if(NOT result) + message(FATAL_ERROR "try_compile(... LINK_OPTIONS ...) failed:\n${out}") +endif() diff --git a/Tests/RunCMake/try_compile/RunCMakeTest.cmake b/Tests/RunCMake/try_compile/RunCMakeTest.cmake index 6a1bc64..77fb7a0 100644 --- a/Tests/RunCMake/try_compile/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_compile/RunCMakeTest.cmake @@ -25,6 +25,13 @@ run_cmake(TargetTypeExe) run_cmake(TargetTypeInvalid) run_cmake(TargetTypeStatic) +if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$" AND + CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|Clang|AppleClang)$") + set (RunCMake_TEST_OPTIONS -DRunCMake_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}) + run_cmake(LinkOptions) + unset (RunCMake_TEST_OPTIONS) +endif() + if(CMAKE_C_STANDARD_DEFAULT) run_cmake(CStandard) elseif(DEFINED CMAKE_C_STANDARD_DEFAULT) diff --git a/Tests/RunCMake/try_compile/lib.c b/Tests/RunCMake/try_compile/lib.c new file mode 100644 index 0000000..b00c576 --- /dev/null +++ b/Tests/RunCMake/try_compile/lib.c @@ -0,0 +1,4 @@ + +void func() +{ +} diff --git a/Tests/RunCMake/try_compile/main.c b/Tests/RunCMake/try_compile/main.c new file mode 100644 index 0000000..2128ead --- /dev/null +++ b/Tests/RunCMake/try_compile/main.c @@ -0,0 +1,8 @@ +extern void func(); + +int main(void) +{ + func(); + + return 0; +} diff --git a/Tests/RunCMake/try_run/LinkOptions.cmake b/Tests/RunCMake/try_run/LinkOptions.cmake new file mode 100644 index 0000000..17af2f7 --- /dev/null +++ b/Tests/RunCMake/try_run/LinkOptions.cmake @@ -0,0 +1,42 @@ + +enable_language(C) + +cmake_policy(SET CMP0054 NEW) + +set (lib_name "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}lib${CMAKE_STATIC_LIBRARY_SUFFIX}") +if (CMAKE_SYSTEM_NAME STREQUAL "Windows") + if (RunCMake_C_COMPILER_ID STREQUAL "MSVC") + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set (undef_flag /INCLUDE:_func) + else() + set (undef_flag /INCLUDE:func) + endif() + else() + if (CMAKE_SIZEOF_VOID_P EQUAL 4) + set (undef_flag -u _func) + else() + set (undef_flag -u func) + endif() + endif() +elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set (undef_flag -u _func) +else() + set (undef_flag -u func) +endif() + +set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY) +try_compile(result ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/lib.c + COPY_FILE "${lib_name}") + +set(CMAKE_TRY_COMPILE_TARGET_TYPE EXECUTABLE) +try_run(run_result compile_result ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/main.c + COMPILE_OUTPUT_VARIABLE compile_out + RUN_OUTPUT_VARIABLE run_out + LINK_OPTIONS ${undef_flag} "${lib_name}") + +if(NOT compile_result) + message(FATAL_ERROR "try_run(... LINK_OPTIONS ...) compilation failed:\n${compile_out}") +endif() +if(run_result STREQUAL "FAILED_TO_RUN") + message(FATAL_ERROR "try_run(... LINK_OPTIONS ...) execution failed:\n${run_out}") +endif() diff --git a/Tests/RunCMake/try_run/RunCMakeTest.cmake b/Tests/RunCMake/try_run/RunCMakeTest.cmake index 1ec9a55..3689562 100644 --- a/Tests/RunCMake/try_run/RunCMakeTest.cmake +++ b/Tests/RunCMake/try_run/RunCMakeTest.cmake @@ -1,3 +1,10 @@ include(RunCMake) run_cmake(BadLinkLibraries) + +if (CMAKE_SYSTEM_NAME MATCHES "^(Linux|Darwin|Windows)$" AND + CMAKE_C_COMPILER_ID MATCHES "^(MSVC|GNU|Clang|AppleClang)$") + set (RunCMake_TEST_OPTIONS -DRunCMake_C_COMPILER_ID=${CMAKE_C_COMPILER_ID}) + run_cmake(LinkOptions) + unset (RunCMake_TEST_OPTIONS) +endif() diff --git a/Tests/RunCMake/try_run/lib.c b/Tests/RunCMake/try_run/lib.c new file mode 100644 index 0000000..b00c576 --- /dev/null +++ b/Tests/RunCMake/try_run/lib.c @@ -0,0 +1,4 @@ + +void func() +{ +} diff --git a/Tests/RunCMake/try_run/main.c b/Tests/RunCMake/try_run/main.c new file mode 100644 index 0000000..2128ead --- /dev/null +++ b/Tests/RunCMake/try_run/main.c @@ -0,0 +1,8 @@ +extern void func(); + +int main(void) +{ + func(); + + return 0; +} |