diff options
Diffstat (limited to 'Tests')
48 files changed, 123 insertions, 125 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index fff04ce..dc65a2e 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -1365,6 +1365,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release add_subdirectory(FindOpenSSL) endif() + add_subdirectory(FindThreads) + # Matlab module if(CMake_TEST_FindMatlab) ADD_TEST_MACRO(FindMatlab.basic_checks ${CMAKE_CTEST_COMMAND} -C $<CONFIGURATION>) diff --git a/Tests/CPackComponentsDEB/CMakeLists.txt b/Tests/CPackComponentsDEB/CMakeLists.txt index 093b23f..98ed911 100644 --- a/Tests/CPackComponentsDEB/CMakeLists.txt +++ b/Tests/CPackComponentsDEB/CMakeLists.txt @@ -110,8 +110,9 @@ install(FILES ${CPackComponentsDEB_BINARY_DIR}/symtest if(EXISTS "./dirtest") execute_process(COMMAND ${CMAKE_COMMAND} -E remove_directory ./dirtest) endif() -# NOTE: directory left empty on purpose execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ./dirtest) +# BUG: apparently cannot add an empty directory +execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../mylibapp ./dirtest/symtest) # NOTE: we should not add the trailing "/" to dirtest install(DIRECTORY ${CPackComponentsDEB_BINARY_DIR}/dirtest DESTINATION bin/ diff --git a/Tests/ExportImport/Export/CMakeLists.txt b/Tests/ExportImport/Export/CMakeLists.txt index f71fa18..aedc89b 100644 --- a/Tests/ExportImport/Export/CMakeLists.txt +++ b/Tests/ExportImport/Export/CMakeLists.txt @@ -551,5 +551,5 @@ install( ARCHIVE DESTINATION lib INCLUDES DESTINATION include/abs ) -install(DIRECTORY include/abs DESTINATION include) +install(DIRECTORY include/abs DESTINATION $<1:include>$<0:/wrong>) install(EXPORT expAbs NAMESPACE expAbs_ DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/expAbs) diff --git a/Tests/FindThreads/C-only/CMakeLists.txt b/Tests/FindThreads/C-only/CMakeLists.txt new file mode 100644 index 0000000..ab4ca0d --- /dev/null +++ b/Tests/FindThreads/C-only/CMakeLists.txt @@ -0,0 +1,10 @@ +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(FindThreads_C-only C) + +set(CMAKE_THREAD_PREFER_PTHREAD On) +find_package(Threads REQUIRED) + +if (NOT WIN32) + add_executable(thr ${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules/CheckForPthreads.c) + target_link_libraries(thr Threads::Threads) +endif () diff --git a/Tests/FindThreads/CMakeLists.txt b/Tests/FindThreads/CMakeLists.txt new file mode 100644 index 0000000..aa9499b --- /dev/null +++ b/Tests/FindThreads/CMakeLists.txt @@ -0,0 +1,11 @@ +foreach (_lang IN ITEMS C CXX) + add_test(NAME FindThreads.${_lang}-only COMMAND ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/FindThreads/${_lang}-only" + "${CMake_BINARY_DIR}/Tests/FindThreads/${_lang}-only" + ${build_generator_args} + --build-project FindThreads_${_lang}-only + --build-options ${build_options} + --test-command ${CMAKE_CTEST_COMMAND} -V + ) +endforeach () diff --git a/Tests/FindThreads/CXX-only/CMakeLists.txt b/Tests/FindThreads/CXX-only/CMakeLists.txt new file mode 100644 index 0000000..9993123 --- /dev/null +++ b/Tests/FindThreads/CXX-only/CMakeLists.txt @@ -0,0 +1,13 @@ +cmake_minimum_required(VERSION 3.3 FATAL_ERROR) +project(FindThreads_CXX-only CXX) + +set(CMAKE_THREAD_PREFER_PTHREAD On) +find_package(Threads REQUIRED) + +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules/CheckForPthreads.c + ${CMAKE_CURRENT_BINARY_DIR}/CheckForPthreads.cxx) + +if (NOT WIN32) + add_executable(thr ${CMAKE_CURRENT_BINARY_DIR}/CheckForPthreads.cxx) + target_link_libraries(thr Threads::Threads) +endif () diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index 758165c..27f33a2 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -66,7 +66,7 @@ add_custom_target(check-part1 ALL -Dtest_colons_4=$<1:C:\\CMake> -Dtest_colons_5=$<1:C:/CMake> -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part1.cmake - COMMAND ${CMAKE_COMMAND} -E echo "check done (part 1 of 3)" + COMMAND ${CMAKE_COMMAND} -E echo "check done (part 1 of 4)" VERBATIM ) @@ -137,7 +137,7 @@ add_custom_target(check-part2 ALL -Dtest_arbitrary_content_comma_9=$<1:a,,b,,> -Dtest_arbitrary_content_comma_10=$<1:,,a,,b,,> -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part2.cmake - COMMAND ${CMAKE_COMMAND} -E echo "check done (part 2 of 3)" + COMMAND ${CMAKE_COMMAND} -E echo "check done (part 2 of 4)" VERBATIM ) @@ -221,7 +221,27 @@ add_custom_target(check-part3 ALL -Dequal22=$<EQUAL:10,-012> -Dequal23=$<EQUAL:-10,-012> -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part3.cmake - COMMAND ${CMAKE_COMMAND} -E echo "check done (part 3 of 3)" + COMMAND ${CMAKE_COMMAND} -E echo "check done (part 3 of 4)" + VERBATIM + ) + +if(WIN32) + set(test_shell_path c:/shell/path) +else() + set(test_shell_path /shell/path) +endif() +set(path_prefix BYPASS_FURTHER_CONVERSION) + +add_custom_target(check-part4 ALL + COMMAND ${CMAKE_COMMAND} + # Prefix path to bypass its further conversion when being processed by + # CMake as command-line argument + -Dtest_shell_path=${path_prefix}$<SHELL_PATH:${test_shell_path}> + -Dpath_prefix=${path_prefix} + -DWIN32=${WIN32} + -DCMAKE_GENERATOR=${CMAKE_GENERATOR} + -P ${CMAKE_CURRENT_SOURCE_DIR}/check-part4.cmake + COMMAND ${CMAKE_COMMAND} -E echo "check done (part 4 of 4)" VERBATIM ) diff --git a/Tests/GeneratorExpression/check-common.cmake b/Tests/GeneratorExpression/check-common.cmake index 8ffebd7..faf5d4f 100644 --- a/Tests/GeneratorExpression/check-common.cmake +++ b/Tests/GeneratorExpression/check-common.cmake @@ -1,5 +1,5 @@ -macro(check var val) +function(check var val) if(NOT "${${var}}" STREQUAL "${val}") message(SEND_ERROR "${var} is \"${${var}}\", not \"${val}\"") endif() -endmacro() +endfunction() diff --git a/Tests/GeneratorExpression/check-part1.cmake b/Tests/GeneratorExpression/check-part1.cmake index 3207582..60b193f 100644 --- a/Tests/GeneratorExpression/check-part1.cmake +++ b/Tests/GeneratorExpression/check-part1.cmake @@ -55,5 +55,5 @@ check(test_semicolon ";") check(test_colons_1 ":") check(test_colons_2 "::") check(test_colons_3 "Qt5::Core") -check(test_colons_4 "C:\\\\CMake") +check(test_colons_4 [[C:\CMake]]) check(test_colons_5 "C:/CMake") diff --git a/Tests/GeneratorExpression/check-part4.cmake b/Tests/GeneratorExpression/check-part4.cmake new file mode 100644 index 0000000..9e516d5 --- /dev/null +++ b/Tests/GeneratorExpression/check-part4.cmake @@ -0,0 +1,15 @@ +include(${CMAKE_CURRENT_LIST_DIR}/check-common.cmake) + +string(REPLACE ${path_prefix} "" test_shell_path ${test_shell_path}) + +if(WIN32) + if(CMAKE_GENERATOR STREQUAL "MSYS Makefiles") + check(test_shell_path [[/c/shell/path]]) + elseif(CMAKE_GENERATOR STREQUAL "Unix Makefiles") + check(test_shell_path [[c:/shell/path]]) + else() + check(test_shell_path [[c:\shell\path]]) + endif() +else() + check(test_shell_path [[/shell/path]]) +endif() diff --git a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake index 8782ba9..a578408 100644 --- a/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake +++ b/Tests/RunCMake/BuildDepends/RunCMakeTest.cmake @@ -1,5 +1,11 @@ include(RunCMake) +if(RunCMake_GENERATOR STREQUAL "Borland Makefiles") + set(fs_delay 3) +else() + set(fs_delay 1.125) +endif() + function(run_BuildDepends CASE) # Use a single build tree for a few tests without cleaning. set(RunCMake_TEST_BINARY_DIR ${RunCMake_BINARY_DIR}/${CASE}-build) @@ -17,7 +23,7 @@ function(run_BuildDepends CASE) if(run_BuildDepends_skip_step_2) return() endif() - execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1.125) # handle 1s resolution + execute_process(COMMAND ${CMAKE_COMMAND} -E sleep ${fs_delay}) # handle 1s resolution include(${RunCMake_SOURCE_DIR}/${CASE}.step2.cmake OPTIONAL) set(check_step 2) run_cmake_command(${CASE}-build2 ${CMAKE_COMMAND} --build . --config Debug) diff --git a/Tests/RunCMake/CPack/COMPONENTS_EMPTY_DIR.cmake b/Tests/RunCMake/CPack/COMPONENTS_EMPTY_DIR.cmake deleted file mode 100644 index 7210e7d..0000000 --- a/Tests/RunCMake/CPack/COMPONENTS_EMPTY_DIR.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(CPACK_COMPONENTS_ALL test) -install(DIRECTORY DESTINATION empty - COMPONENT test) - -set(CPACK_PACKAGE_NAME "components_empty_dir") diff --git a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index 5adca68..0000000 --- a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "components_empty_dir*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$") diff --git a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake b/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake deleted file mode 100644 index 2720fe9..0000000 --- a/Tests/RunCMake/CPack/DEB/COMPONENTS_EMPTY_DIR-specifics.cmake +++ /dev/null @@ -1,2 +0,0 @@ -set(CPACK_PACKAGE_CONTACT "someone") -set(CPACK_DEB_COMPONENT_INSTALL "ON") diff --git a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index 1552a36..0000000 --- a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "empty_dir*.deb") -set(EXPECTED_FILE_CONTENT_1 "^.*/usr/${whitespaces_}.*/usr/empty/$") diff --git a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake b/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake deleted file mode 100644 index 8821ab9..0000000 --- a/Tests/RunCMake/CPack/DEB/EMPTY_DIR-specifics.cmake +++ /dev/null @@ -1 +0,0 @@ -set(CPACK_PACKAGE_CONTACT "someone") diff --git a/Tests/RunCMake/CPack/EMPTY_DIR.cmake b/Tests/RunCMake/CPack/EMPTY_DIR.cmake deleted file mode 100644 index 023ba17..0000000 --- a/Tests/RunCMake/CPack/EMPTY_DIR.cmake +++ /dev/null @@ -1,4 +0,0 @@ -install(DIRECTORY DESTINATION empty - COMPONENT test) - -set(CPACK_PACKAGE_NAME "empty_dir") diff --git a/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index d396276..0000000 --- a/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "components_empty_dir*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$") diff --git a/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-stderr.txt b/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-stderr.txt deleted file mode 100644 index 6ddca12..0000000 --- a/Tests/RunCMake/CPack/RPM/COMPONENTS_EMPTY_DIR-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/COMPONENTS_EMPTY_DIR-build/_CPack_Packages/.*/RPM/SPECS/components_empty_dir.spec$ diff --git a/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake b/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake deleted file mode 100644 index 0c2977f..0000000 --- a/Tests/RunCMake/CPack/RPM/EMPTY_DIR-ExpectedFiles.cmake +++ /dev/null @@ -1,5 +0,0 @@ -set(whitespaces_ "[\t\n\r ]*") - -set(EXPECTED_FILES_COUNT "1") -set(EXPECTED_FILE_1 "empty_dir*.rpm") -set(EXPECTED_FILE_CONTENT_1 "^/usr/empty$") diff --git a/Tests/RunCMake/CPack/RPM/EMPTY_DIR-stderr.txt b/Tests/RunCMake/CPack/RPM/EMPTY_DIR-stderr.txt deleted file mode 100644 index 1777aa0..0000000 --- a/Tests/RunCMake/CPack/RPM/EMPTY_DIR-stderr.txt +++ /dev/null @@ -1 +0,0 @@ -^CPackRPM: Will use GENERATED spec file: .*/Tests/RunCMake/RPM/CPack/EMPTY_DIR-build/_CPack_Packages/.*/RPM/SPECS/empty_dir.spec$ diff --git a/Tests/RunCMake/CPack/RunCMakeTest.cmake b/Tests/RunCMake/CPack/RunCMakeTest.cmake index 89673c2..3e5714d 100644 --- a/Tests/RunCMake/CPack/RunCMakeTest.cmake +++ b/Tests/RunCMake/CPack/RunCMakeTest.cmake @@ -8,5 +8,3 @@ run_cpack_test(MINIMAL "RPM;DEB" false) run_cpack_test(PARTIALLY_RELOCATABLE_WARNING "RPM" false) run_cpack_test(DEB_EXTRA "DEB" false) run_cpack_test(DEPENDENCIES "RPM;DEB" true) -run_cpack_test(EMPTY_DIR "RPM;DEB" true) -run_cpack_test(COMPONENTS_EMPTY_DIR "RPM;DEB" true) diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 0da737d..cef6368 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -132,52 +132,6 @@ set(RunCMake_TEST_OPTIONS -Wno-dev -Wdev) run_cmake(Wdev) unset(RunCMake_TEST_OPTIONS) -set(RunCMake_TEST_OPTIONS -Werror=dev) -run_cmake(Werror_dev) -unset(RunCMake_TEST_OPTIONS) - -set(RunCMake_TEST_OPTIONS -Wno-error=dev) -run_cmake(Wno-error_deprecated) -unset(RunCMake_TEST_OPTIONS) - -# -Wdev should not override deprecated options if specified -set(RunCMake_TEST_OPTIONS -Wdev -Wno-deprecated) -run_cmake(Wno-deprecated) -unset(RunCMake_TEST_OPTIONS) -set(RunCMake_TEST_OPTIONS -Wno-deprecated -Wdev) -run_cmake(Wno-deprecated) -unset(RunCMake_TEST_OPTIONS) - -# -Wdev should enable deprecated warnings as well -set(RunCMake_TEST_OPTIONS -Wdev) -run_cmake(Wdeprecated) -unset(RunCMake_TEST_OPTIONS) - -# -Werror=dev should enable deprecated errors as well -set(RunCMake_TEST_OPTIONS -Werror=dev) -run_cmake(Werror_deprecated) -unset(RunCMake_TEST_OPTIONS) - -set(RunCMake_TEST_OPTIONS -Wdeprecated) -run_cmake(Wdeprecated) -unset(RunCMake_TEST_OPTIONS) - -set(RunCMake_TEST_OPTIONS -Wno-deprecated) -run_cmake(Wno-deprecated) -unset(RunCMake_TEST_OPTIONS) - -set(RunCMake_TEST_OPTIONS -Werror=deprecated) -run_cmake(Werror_deprecated) -unset(RunCMake_TEST_OPTIONS) - -set(RunCMake_TEST_OPTIONS -Wno-error=deprecated) -run_cmake(Wno-error_deprecated) -unset(RunCMake_TEST_OPTIONS) - -run_cmake_command(W_bad-arg1 ${CMAKE_COMMAND} -W) -run_cmake_command(W_bad-arg2 ${CMAKE_COMMAND} -Wno-) -run_cmake_command(W_bad-arg3 ${CMAKE_COMMAND} -Werror=) - set(RunCMake_TEST_OPTIONS --debug-output) run_cmake(debug-output) unset(RunCMake_TEST_OPTIONS) diff --git a/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/W_bad-arg1-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt deleted file mode 100644 index e912728..0000000 --- a/Tests/RunCMake/CommandLine/W_bad-arg1-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error: -W must be followed with \[no-\]\[error=\]<name>. -CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/W_bad-arg2-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt deleted file mode 100644 index cc643df..0000000 --- a/Tests/RunCMake/CommandLine/W_bad-arg2-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error: No warning name provided. -CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/W_bad-arg3-result.txt b/Tests/RunCMake/CommandLine/W_bad-arg3-result.txt deleted file mode 100644 index d00491f..0000000 --- a/Tests/RunCMake/CommandLine/W_bad-arg3-result.txt +++ /dev/null @@ -1 +0,0 @@ -1 diff --git a/Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt b/Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt deleted file mode 100644 index cc643df..0000000 --- a/Tests/RunCMake/CommandLine/W_bad-arg3-stderr.txt +++ /dev/null @@ -1,2 +0,0 @@ -CMake Error: No warning name provided. -CMake Error: Problem processing arguments. Aborting. diff --git a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt b/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt deleted file mode 100644 index e9be1dc..0000000 --- a/Tests/RunCMake/CommandLine/Wdeprecated-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Deprecation Warning at Wdeprecated.cmake:1 \(message\): - Some deprecated warning -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CommandLine/Wdeprecated.cmake b/Tests/RunCMake/CommandLine/Wdeprecated.cmake deleted file mode 100644 index 3142b42..0000000 --- a/Tests/RunCMake/CommandLine/Wdeprecated.cmake +++ /dev/null @@ -1 +0,0 @@ -message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt b/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt deleted file mode 100644 index 6acdc73..0000000 --- a/Tests/RunCMake/CommandLine/Werror_deprecated-stderr.txt +++ /dev/null @@ -1,4 +0,0 @@ -^CMake Deprecation Error at Werror_deprecated.cmake:1 \(message\): - Some deprecated warning -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CommandLine/Werror_deprecated.cmake b/Tests/RunCMake/CommandLine/Werror_deprecated.cmake deleted file mode 100644 index 3142b42..0000000 --- a/Tests/RunCMake/CommandLine/Werror_deprecated.cmake +++ /dev/null @@ -1 +0,0 @@ -message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt b/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt deleted file mode 100644 index c6b4e74..0000000 --- a/Tests/RunCMake/CommandLine/Werror_dev-stderr.txt +++ /dev/null @@ -1,5 +0,0 @@ -^CMake Error \(dev\) at Werror_dev.cmake:1 \(message\): - Some author warning -Call Stack \(most recent call first\): - CMakeLists.txt:3 \(include\) -This error is for project developers. Use -Wno-error=dev to suppress it.$ diff --git a/Tests/RunCMake/CommandLine/Werror_dev.cmake b/Tests/RunCMake/CommandLine/Werror_dev.cmake deleted file mode 100644 index e05cf9d..0000000 --- a/Tests/RunCMake/CommandLine/Werror_dev.cmake +++ /dev/null @@ -1 +0,0 @@ -message(AUTHOR_WARNING "Some author warning") diff --git a/Tests/RunCMake/CommandLine/Wno-deprecated.cmake b/Tests/RunCMake/CommandLine/Wno-deprecated.cmake deleted file mode 100644 index 3142b42..0000000 --- a/Tests/RunCMake/CommandLine/Wno-deprecated.cmake +++ /dev/null @@ -1 +0,0 @@ -message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake b/Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake deleted file mode 100644 index 3142b42..0000000 --- a/Tests/RunCMake/CommandLine/Wno-error_deprecated.cmake +++ /dev/null @@ -1 +0,0 @@ -message(DEPRECATION "Some deprecated warning") diff --git a/Tests/RunCMake/CommandLine/Wno-error_dev.cmake b/Tests/RunCMake/CommandLine/Wno-error_dev.cmake deleted file mode 100644 index e05cf9d..0000000 --- a/Tests/RunCMake/CommandLine/Wno-error_dev.cmake +++ /dev/null @@ -1 +0,0 @@ -message(AUTHOR_WARNING "Some author warning") diff --git a/Tests/RunCMake/CommandLine/Werror_dev-result.txt b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/CommandLine/Werror_dev-result.txt +++ b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-result.txt diff --git a/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-stderr.txt b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-stderr.txt new file mode 100644 index 0000000..8d3c4cc --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH-stderr.txt @@ -0,0 +1,17 @@ +CMake Error at BadSHELL_PATH.cmake:[0-9]+ \(add_custom_target\): + Error evaluating generator expression: + + \$<SHELL_PATH:> + + "" is not an absolute path. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at BadSHELL_PATH.cmake:[0-9]+ \(add_custom_target\): + Error evaluating generator expression: + + \$<SHELL_PATH:Relative/Path> + + "Relative/Path" is not an absolute path. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH.cmake b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH.cmake new file mode 100644 index 0000000..5eff7bc --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/BadSHELL_PATH.cmake @@ -0,0 +1,4 @@ +add_custom_target(check ALL COMMAND check + $<SHELL_PATH:> + $<SHELL_PATH:Relative/Path> + VERBATIM) diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index 0679024..45175d8 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -10,6 +10,7 @@ run_cmake(BadTargetName) run_cmake(BadTargetTypeInterface) run_cmake(BadTargetTypeObject) run_cmake(BadInstallPrefix) +run_cmake(BadSHELL_PATH) run_cmake(CMP0044-WARN) run_cmake(NonValidTarget-C_COMPILER_ID) run_cmake(NonValidTarget-CXX_COMPILER_ID) diff --git a/Tests/RunCMake/CommandLine/Werror_deprecated-result.txt b/Tests/RunCMake/install/DIRECTORY-DESTINATION-bad-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/CommandLine/Werror_deprecated-result.txt +++ b/Tests/RunCMake/install/DIRECTORY-DESTINATION-bad-result.txt diff --git a/Tests/RunCMake/install/DIRECTORY-DESTINATION-bad-stderr.txt b/Tests/RunCMake/install/DIRECTORY-DESTINATION-bad-stderr.txt new file mode 100644 index 0000000..9844158 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-DESTINATION-bad-stderr.txt @@ -0,0 +1,6 @@ +CMake Error: + Error evaluating generator expression: + + \$<NOTAGENEX> + + Expression did not evaluate to a known generator expression diff --git a/Tests/RunCMake/install/DIRECTORY-DESTINATION-bad.cmake b/Tests/RunCMake/install/DIRECTORY-DESTINATION-bad.cmake new file mode 100644 index 0000000..f050cdf --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-DESTINATION-bad.cmake @@ -0,0 +1 @@ +install(DIRECTORY dir DESTINATION $<NOTAGENEX>) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index 2ce0095..043bd1f 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -6,6 +6,7 @@ run_cmake(DIRECTORY-message-lazy) run_cmake(SkipInstallRulesWarning) run_cmake(SkipInstallRulesNoWarning1) run_cmake(SkipInstallRulesNoWarning2) +run_cmake(DIRECTORY-DESTINATION-bad) run_cmake(FILES-DESTINATION-bad) run_cmake(TARGETS-DESTINATION-bad) run_cmake(CMP0062-OLD) diff --git a/Tests/SimpleInstall/CMakeLists.txt b/Tests/SimpleInstall/CMakeLists.txt index 3227e3f..e365076 100644 --- a/Tests/SimpleInstall/CMakeLists.txt +++ b/Tests/SimpleInstall/CMakeLists.txt @@ -252,7 +252,7 @@ else() file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/MyTest/share/CVS") file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/CVS") install( - DIRECTORY TestSubDir scripts/ DESTINATION MyTest/share + DIRECTORY TestSubDir scripts/ DESTINATION $<1:MyTest/share>$<0:/wrong> FILE_PERMISSIONS OWNER_READ OWNER_WRITE DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE @@ -263,14 +263,14 @@ else() # Alternate directory installation for coverage. install( - DIRECTORY scripts/ DESTINATION MyTest/share/alt + DIRECTORY scripts/ DESTINATION $<1:MyTest/share/alt>$<0:/wrong> COMPONENT Development USE_SOURCE_PERMISSIONS PATTERN "CVS" EXCLUDE REGEX "\\.txt$" EXCLUDE ) install( - DIRECTORY TestSubDir DESTINATION MyTest/share/alt + DIRECTORY TestSubDir DESTINATION $<1:MyTest/share/alt>$<0:/wrong> FILE_PERMISSIONS OWNER_READ OWNER_WRITE DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE diff --git a/Tests/SimpleInstallS2/CMakeLists.txt b/Tests/SimpleInstallS2/CMakeLists.txt index 3227e3f..e365076 100644 --- a/Tests/SimpleInstallS2/CMakeLists.txt +++ b/Tests/SimpleInstallS2/CMakeLists.txt @@ -252,7 +252,7 @@ else() file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/MyTest/share/CVS") file(REMOVE_RECURSE "${CMAKE_INSTALL_PREFIX}/MyTest/share/TestSubDir/CVS") install( - DIRECTORY TestSubDir scripts/ DESTINATION MyTest/share + DIRECTORY TestSubDir scripts/ DESTINATION $<1:MyTest/share>$<0:/wrong> FILE_PERMISSIONS OWNER_READ OWNER_WRITE DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE @@ -263,14 +263,14 @@ else() # Alternate directory installation for coverage. install( - DIRECTORY scripts/ DESTINATION MyTest/share/alt + DIRECTORY scripts/ DESTINATION $<1:MyTest/share/alt>$<0:/wrong> COMPONENT Development USE_SOURCE_PERMISSIONS PATTERN "CVS" EXCLUDE REGEX "\\.txt$" EXCLUDE ) install( - DIRECTORY TestSubDir DESTINATION MyTest/share/alt + DIRECTORY TestSubDir DESTINATION $<1:MyTest/share/alt>$<0:/wrong> FILE_PERMISSIONS OWNER_READ OWNER_WRITE DIRECTORY_PERMISSIONS OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_EXECUTE |