diff options
Diffstat (limited to 'Tests')
15 files changed, 48 insertions, 13 deletions
diff --git a/Tests/QtAutogen/mocDepends/CMakeLists.txt b/Tests/QtAutogen/mocDepends/CMakeLists.txt index 8bd72eb..a67dcfe 100644 --- a/Tests/QtAutogen/mocDepends/CMakeLists.txt +++ b/Tests/QtAutogen/mocDepends/CMakeLists.txt @@ -28,6 +28,7 @@ add_executable(mocDepends1 test1.cpp ) target_link_libraries(mocDepends1 ${QT_CORE_TARGET}) set_target_properties(mocDepends1 PROPERTIES AUTOMOC TRUE) +set_property(TARGET mocDepends1 PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1) # -- Test 2 using generated library # This tests the dependency of AUTOMOC of mocDepends2 to the @@ -43,3 +44,4 @@ add_library(SimpleLib STATIC simpleLib.hpp simpleLib.cpp) add_executable(mocDepends2 test2.cpp ) target_link_libraries(mocDepends2 SimpleLib ${QT_CORE_TARGET}) set_target_properties(mocDepends2 PROPERTIES AUTOMOC TRUE) +set_property(TARGET mocDepends2 PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1) diff --git a/Tests/QtAutogen/mocRerun/CMakeLists.txt b/Tests/QtAutogen/mocRerun/CMakeLists.txt index 69ea8d7..14b077b 100644 --- a/Tests/QtAutogen/mocRerun/CMakeLists.txt +++ b/Tests/QtAutogen/mocRerun/CMakeLists.txt @@ -27,6 +27,7 @@ add_executable(mocRerun ${CMAKE_CURRENT_BINARY_DIR}/main.cpp res1.qrc ) +set_property(TARGET mocRerun PROPERTY __UNDOCUMENTED_AUTOGEN_GENERATED_FILES 1) target_include_directories(mocRerun PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) target_link_libraries(mocRerun ${QT_CORE_TARGET}) # Write target name to text file diff --git a/Tests/RunCMake/AutoExportDll/foo.c b/Tests/RunCMake/AutoExportDll/foo.c index e70fbb5..4b1318b 100644 --- a/Tests/RunCMake/AutoExportDll/foo.c +++ b/Tests/RunCMake/AutoExportDll/foo.c @@ -13,5 +13,3 @@ int bar() { return 5; } - -const char testconst[] = "testconst"; diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx index eb9c0ff..51060e8 100644 --- a/Tests/RunCMake/AutoExportDll/say.cxx +++ b/Tests/RunCMake/AutoExportDll/say.cxx @@ -13,14 +13,6 @@ int WINAPI foo(); int bar(); int objlib(); void justnop(); - -// test const export -#ifdef _WIN32 -// data symbols must be explicitly imported -__declspec(dllimport) extern const char testconst[]; -#else -extern const char testconst[]; -#endif } // test c++ functions @@ -51,8 +43,6 @@ int main() bar(); objlib(); printf("\n"); - printf("%s", testconst); - printf("\n"); #ifdef HAS_JUSTNOP justnop(); #endif diff --git a/Tests/RunCMake/find_package/RunCMakeTest.cmake b/Tests/RunCMake/find_package/RunCMakeTest.cmake index 72f9c4d..7875db6 100644 --- a/Tests/RunCMake/find_package/RunCMakeTest.cmake +++ b/Tests/RunCMake/find_package/RunCMakeTest.cmake @@ -17,3 +17,5 @@ run_cmake(PackageRoot) run_cmake(PolicyPush) run_cmake(PolicyPop) run_cmake(SetFoundFALSE) +run_cmake(WrongVersion) +run_cmake(WrongVersionConfig) diff --git a/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt b/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt new file mode 100644 index 0000000..695f645 --- /dev/null +++ b/Tests/RunCMake/find_package/SetFoundFALSE-stderr.txt @@ -0,0 +1,9 @@ +CMake Warning at SetFoundFALSE.cmake:2 \(find_package\): + Found package configuration file: + + .*/Tests/RunCMake/find_package/SetFoundFALSEConfig.cmake + + but it set SetFoundFALSE_FOUND to FALSE so package "SetFoundFALSE" is + considered to be NOT FOUND. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt b/Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt deleted file mode 100644 index 37e6e7e..0000000 --- a/Tests/RunCMake/find_package/SetFoundFALSE-stdout.txt +++ /dev/null @@ -1 +0,0 @@ --- Could NOT find SetFoundFALSE \(missing: SetFoundFALSE_DIR\) diff --git a/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfig.cmake b/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfig.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfig.cmake diff --git a/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfigVersion.cmake b/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfigVersion.cmake new file mode 100644 index 0000000..2dbcfb2 --- /dev/null +++ b/Tests/RunCMake/find_package/VersionedA-1/VersionedAConfigVersion.cmake @@ -0,0 +1,4 @@ +set(PACKAGE_VERSION 1) +if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 1) + set(PACKAGE_VERSION_COMPATIBLE 1) +endif() diff --git a/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfig.cmake b/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfig.cmake new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfig.cmake diff --git a/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake b/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake new file mode 100644 index 0000000..7eb8332 --- /dev/null +++ b/Tests/RunCMake/find_package/VersionedA-2/VersionedAConfigVersion.cmake @@ -0,0 +1,4 @@ +set(PACKAGE_VERSION 2) +if("${PACKAGE_FIND_VERSION_MAJOR}" EQUAL 2) + set(PACKAGE_VERSION_COMPATIBLE 1) +endif() diff --git a/Tests/RunCMake/find_package/WrongVersion-stderr.txt b/Tests/RunCMake/find_package/WrongVersion-stderr.txt new file mode 100644 index 0000000..ae9fc4a --- /dev/null +++ b/Tests/RunCMake/find_package/WrongVersion-stderr.txt @@ -0,0 +1,11 @@ +^CMake Warning at WrongVersion.cmake:[0-9]+ \(find_package\): + Could not find a configuration file for package "VersionedA" that is + compatible with requested version "3". + + The following configuration files were considered but not accepted: + + .*/Tests/RunCMake/find_package/VersionedA-[12]/VersionedAConfig.cmake, version: [12] + .*/Tests/RunCMake/find_package/VersionedA-[12]/VersionedAConfig.cmake, version: [12] + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/find_package/WrongVersion.cmake b/Tests/RunCMake/find_package/WrongVersion.cmake new file mode 100644 index 0000000..5bc711f --- /dev/null +++ b/Tests/RunCMake/find_package/WrongVersion.cmake @@ -0,0 +1,2 @@ +set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +find_package(VersionedA 3) diff --git a/Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt b/Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt new file mode 100644 index 0000000..1b84233 --- /dev/null +++ b/Tests/RunCMake/find_package/WrongVersionConfig-stderr.txt @@ -0,0 +1,11 @@ +^CMake Warning at WrongVersionConfig.cmake:[0-9]+ \(find_package\): + Could not find a configuration file for package "VersionedA" that is + compatible with requested version "3". + + The following configuration files were considered but not accepted: + + .*/Tests/RunCMake/find_package/VersionedA-[12]/VersionedAConfig.cmake, version: [12] + .*/Tests/RunCMake/find_package/VersionedA-[12]/VersionedAConfig.cmake, version: [12] + +Call Stack \(most recent call first\): + CMakeLists.txt:[0-9]+ \(include\)$ diff --git a/Tests/RunCMake/find_package/WrongVersionConfig.cmake b/Tests/RunCMake/find_package/WrongVersionConfig.cmake new file mode 100644 index 0000000..5bc711f --- /dev/null +++ b/Tests/RunCMake/find_package/WrongVersionConfig.cmake @@ -0,0 +1,2 @@ +set(CMAKE_PREFIX_PATH ${CMAKE_CURRENT_SOURCE_DIR}) +find_package(VersionedA 3) |