diff options
Diffstat (limited to 'Tests')
23 files changed, 73 insertions, 8 deletions
diff --git a/Tests/BundleTest/BundleLib.cxx b/Tests/BundleTest/BundleLib.cxx index b68ee25..37bc178 100644 --- a/Tests/BundleTest/BundleLib.cxx +++ b/Tests/BundleTest/BundleLib.cxx @@ -58,7 +58,7 @@ int foo(char *exec) int res1 = findBundleFile(exec, "Resources/randomResourceFile.plist"); int res2 = findBundleFile(exec, "MacOS/SomeRandomFile.txt"); - int res3 = findBundleFile(exec, "MacOS/ChangeLog.txt"); + int res3 = findBundleFile(exec, "MacOS/README.rst"); if ( !res1 || !res2 || !res3 ) diff --git a/Tests/BundleTest/BundleSubDir/CMakeLists.txt b/Tests/BundleTest/BundleSubDir/CMakeLists.txt index 1921ce0..43c366a 100644 --- a/Tests/BundleTest/BundleSubDir/CMakeLists.txt +++ b/Tests/BundleTest/BundleSubDir/CMakeLists.txt @@ -12,7 +12,7 @@ set_source_files_properties( set_source_files_properties( "${BundleTest_SOURCE_DIR}/SomeRandomFile.txt" - "${BundleTest_SOURCE_DIR}/../../ChangeLog.txt" + "${BundleTest_SOURCE_DIR}/../../README.rst" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS ) @@ -21,7 +21,7 @@ add_executable(SecondBundle MACOSX_BUNDLE "${BundleTest_SOURCE_DIR}/BundleTest.cxx" "${BundleTest_SOURCE_DIR}/SomeRandomFile.txt" - "${BundleTest_SOURCE_DIR}/../../ChangeLog.txt" + "${BundleTest_SOURCE_DIR}/../../README.rst" "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist" ) target_link_libraries(SecondBundle BundleTestLib) diff --git a/Tests/BundleTest/CMakeLists.txt b/Tests/BundleTest/CMakeLists.txt index de69d75..853da35 100644 --- a/Tests/BundleTest/CMakeLists.txt +++ b/Tests/BundleTest/CMakeLists.txt @@ -17,7 +17,7 @@ set_source_files_properties( set_source_files_properties( SomeRandomFile.txt - "${BundleTest_SOURCE_DIR}/../../ChangeLog.txt" + "${BundleTest_SOURCE_DIR}/../../README.rst" PROPERTIES MACOSX_PACKAGE_LOCATION MacOS ) @@ -38,7 +38,7 @@ add_executable(BundleTest MACOSX_BUNDLE BundleTest.cxx SomeRandomFile.txt - "${BundleTest_SOURCE_DIR}/../../ChangeLog.txt" + "${BundleTest_SOURCE_DIR}/../../README.rst" "${CMAKE_CURRENT_BINARY_DIR}/randomResourceFile.plist" ) target_link_libraries(BundleTest BundleTestLib) diff --git a/Tests/CPackWiXGenerator/CMakeLists.txt b/Tests/CPackWiXGenerator/CMakeLists.txt index bc3322e..d673d14 100644 --- a/Tests/CPackWiXGenerator/CMakeLists.txt +++ b/Tests/CPackWiXGenerator/CMakeLists.txt @@ -49,6 +49,11 @@ set(CPACK_PACKAGE_EXECUTABLES "my-other-app" "Second CPack WiX Test" ) +set(CPACK_CREATE_DESKTOP_LINKS + "my-libapp" + "my-other-app" +) + set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/patch.xml") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt") diff --git a/Tests/RunCMake/CMP0028/CMP0028-NEW-iface-result.txt b/Tests/RunCMake/CMP0028/CMP0028-NEW-iface-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-NEW-iface-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CMP0028/CMP0028-NEW-iface-stderr.txt b/Tests/RunCMake/CMP0028/CMP0028-NEW-iface-stderr.txt new file mode 100644 index 0000000..e2108f4 --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-NEW-iface-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at CMP0028-NEW-iface.cmake:6 \(add_library\): + Target "foo" links to target "External::Library" but the target was not + 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\) diff --git a/Tests/RunCMake/CMP0028/CMP0028-NEW-iface.cmake b/Tests/RunCMake/CMP0028/CMP0028-NEW-iface.cmake new file mode 100644 index 0000000..1a71433 --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-NEW-iface.cmake @@ -0,0 +1,7 @@ + +cmake_policy(SET CMP0028 NEW) + +add_library(iface INTERFACE) +target_link_libraries(iface INTERFACE External::Library) +add_library(foo empty.cpp) +target_link_libraries(foo iface) diff --git a/Tests/RunCMake/CMP0028/CMP0028-OLD-iface-result.txt b/Tests/RunCMake/CMP0028/CMP0028-OLD-iface-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-OLD-iface-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0028/CMP0028-OLD-iface-stderr.txt b/Tests/RunCMake/CMP0028/CMP0028-OLD-iface-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-OLD-iface-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CMP0028/CMP0028-OLD-iface.cmake b/Tests/RunCMake/CMP0028/CMP0028-OLD-iface.cmake new file mode 100644 index 0000000..d7bd60e --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-OLD-iface.cmake @@ -0,0 +1,7 @@ + +cmake_policy(SET CMP0028 OLD) + +add_library(iface INTERFACE) +target_link_libraries(iface INTERFACE External::Library) +add_library(foo empty.cpp) +target_link_libraries(foo iface) diff --git a/Tests/RunCMake/CMP0028/CMP0028-WARN-iface-result.txt b/Tests/RunCMake/CMP0028/CMP0028-WARN-iface-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-WARN-iface-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0028/CMP0028-WARN-iface-stderr.txt b/Tests/RunCMake/CMP0028/CMP0028-WARN-iface-stderr.txt new file mode 100644 index 0000000..0c5c653 --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-WARN-iface-stderr.txt @@ -0,0 +1,11 @@ +CMake Warning \(dev\) at CMP0028-WARN-iface.cmake:4 \(add_library\): + Policy CMP0028 is not set: Double colon in target name means ALIAS or + IMPORTED target. Run "cmake --help-policy CMP0028" for policy details. + Use the cmake_policy command to set the policy and suppress this warning. + + Target "foo" links to target "External::Library" but the target was not + 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\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/CMP0028/CMP0028-WARN-iface.cmake b/Tests/RunCMake/CMP0028/CMP0028-WARN-iface.cmake new file mode 100644 index 0000000..9270023 --- /dev/null +++ b/Tests/RunCMake/CMP0028/CMP0028-WARN-iface.cmake @@ -0,0 +1,5 @@ + +add_library(iface INTERFACE) +target_link_libraries(iface INTERFACE External::Library) +add_library(foo empty.cpp) +target_link_libraries(foo iface) diff --git a/Tests/RunCMake/CMP0028/RunCMakeTest.cmake b/Tests/RunCMake/CMP0028/RunCMakeTest.cmake index 293e27b..0c72ca2 100644 --- a/Tests/RunCMake/CMP0028/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0028/RunCMakeTest.cmake @@ -3,3 +3,6 @@ include(RunCMake) run_cmake(CMP0028-NEW) run_cmake(CMP0028-OLD) run_cmake(CMP0028-WARN) +run_cmake(CMP0028-NEW-iface) +run_cmake(CMP0028-OLD-iface) +run_cmake(CMP0028-WARN-iface) diff --git a/Tests/RunCMake/CheckModules/CMakeLists.txt b/Tests/RunCMake/CheckModules/CMakeLists.txt index 65ac8e8..72abfc8 100644 --- a/Tests/RunCMake/CheckModules/CMakeLists.txt +++ b/Tests/RunCMake/CheckModules/CMakeLists.txt @@ -1,3 +1,3 @@ cmake_minimum_required(VERSION 2.8.11) -project(${RunCMake_TEST}) +project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CheckModules/CheckStructHasMemberOk.cmake b/Tests/RunCMake/CheckModules/CheckStructHasMemberOk.cmake index b319e18..4c064c5 100644 --- a/Tests/RunCMake/CheckModules/CheckStructHasMemberOk.cmake +++ b/Tests/RunCMake/CheckModules/CheckStructHasMemberOk.cmake @@ -1,3 +1,5 @@ +enable_language(C) +enable_language(CXX) include(CheckStructHasMember) check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC) check_struct_has_member("struct timeval" tv_sec sys/select.h HAVE_TIMEVAL_TV_SEC_C LANGUAGE C) diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeOk.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeOk.cmake index 558f07e..45a4978 100644 --- a/Tests/RunCMake/CheckModules/CheckTypeSizeOk.cmake +++ b/Tests/RunCMake/CheckModules/CheckTypeSizeOk.cmake @@ -1,3 +1,5 @@ +enable_language(C) +enable_language(CXX) include(CheckTypeSize) check_type_size(int SIZEOF_INT) check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY) diff --git a/Tests/RunCMake/interface_library/RunCMakeTest.cmake b/Tests/RunCMake/interface_library/RunCMakeTest.cmake index 9ca9a77..3c457c5 100644 --- a/Tests/RunCMake/interface_library/RunCMakeTest.cmake +++ b/Tests/RunCMake/interface_library/RunCMakeTest.cmake @@ -5,5 +5,6 @@ run_cmake(target_commands) run_cmake(no_shared_libs) run_cmake(whitelist) run_cmake(invalid_signature) +run_cmake(global-interface) run_cmake(genex_link) run_cmake(add_dependencies) diff --git a/Tests/RunCMake/interface_library/global-interface-result.txt b/Tests/RunCMake/interface_library/global-interface-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/interface_library/global-interface-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/interface_library/global-interface-stderr.txt b/Tests/RunCMake/interface_library/global-interface-stderr.txt new file mode 100644 index 0000000..24edd0f --- /dev/null +++ b/Tests/RunCMake/interface_library/global-interface-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at global-interface.cmake:2 \(add_library\): + Cannot find source file: + + GLOBAL + + Tried extensions \.c \.C \.c\+\+ \.cc \.cpp \.cxx \.m \.M \.mm \.h \.hh \.h\+\+ \.hm \.hpp + \.hxx \.in \.txx +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/interface_library/global-interface.cmake b/Tests/RunCMake/interface_library/global-interface.cmake new file mode 100644 index 0000000..d2bfc64 --- /dev/null +++ b/Tests/RunCMake/interface_library/global-interface.cmake @@ -0,0 +1,2 @@ + +add_library(iface GLOBAL INTERFACE) diff --git a/Tests/RunCMake/interface_library/invalid_signature-stderr.txt b/Tests/RunCMake/interface_library/invalid_signature-stderr.txt index 701586a..6374b33 100644 --- a/Tests/RunCMake/interface_library/invalid_signature-stderr.txt +++ b/Tests/RunCMake/interface_library/invalid_signature-stderr.txt @@ -84,6 +84,6 @@ Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) + CMake Error at invalid_signature.cmake:20 \(add_library\): - add_library INTERFACE library requires no source arguments. + add_library GLOBAL option may only be used with IMPORTED libraries. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/interface_library/invalid_signature.cmake b/Tests/RunCMake/interface_library/invalid_signature.cmake index 67e3267..4e53534 100644 --- a/Tests/RunCMake/interface_library/invalid_signature.cmake +++ b/Tests/RunCMake/interface_library/invalid_signature.cmake @@ -16,5 +16,5 @@ add_library(iface15 ALIAS INTERFACE) add_library(iface16 INTERFACE INTERFACE) add_library(iface17 INTERFACE EXCLUDE_FROM_ALL) add_library(iface18 EXCLUDE_FROM_ALL INTERFACE) -add_library(iface19 GLOBAL INTERFACE) +# add_library(iface19 GLOBAL INTERFACE) Tested separately add_library(iface20 INTERFACE GLOBAL) |