diff options
Diffstat (limited to 'Tests')
783 files changed, 5939 insertions, 2257 deletions
diff --git a/Tests/AliasTarget/CMakeLists.txt b/Tests/AliasTarget/CMakeLists.txt index 9467fae..c50b4e6 100644 --- a/Tests/AliasTarget/CMakeLists.txt +++ b/Tests/AliasTarget/CMakeLists.txt @@ -1,7 +1,15 @@ - cmake_minimum_required(VERSION 2.8.11) project(AliasTarget) +set(CMAKE_CXX_STANDARD 98) + +# Those versions of the HP compiler that need a flag to get proper C++98 +# template support also need a flag to use the newer C++ library. +if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND + CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA") +endif () + add_library(foo SHARED empty.cpp) add_library(PREFIX::Foo ALIAS foo) add_library(Another::Alias ALIAS foo) diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt index 9727930..8df331e 100644 --- a/Tests/BuildDepends/CMakeLists.txt +++ b/Tests/BuildDepends/CMakeLists.txt @@ -68,6 +68,8 @@ file(WRITE ${BuildDepends_BINARY_DIR}/Project/link_depends_no_shared_exe.h "#define link_depends_no_shared_exe_value 0\n") set(link_depends_no_shared_check_txt ${BuildDepends_BINARY_DIR}/Project/link_depends_no_shared_check.txt) +file(WRITE ${BuildDepends_BINARY_DIR}/Project/external.in "external original\n") + help_xcode_depends() message("Building project first time") @@ -166,9 +168,21 @@ else() "Targets link_depends_no_shared_lib and link_depends_no_shared_exe not both built.") endif() +if(EXISTS ${BuildDepends_BINARY_DIR}/Project/external.out) + file(STRINGS ${BuildDepends_BINARY_DIR}/Project/external.out external_out) + if("${external_out}" STREQUAL "external original") + message(STATUS "external.out contains '${external_out}'") + else() + message(SEND_ERROR "Project did not initially build properly: " + "external.out contains '${external_out}'") + endif() +else() + message(SEND_ERROR "Project did not initially build properly: " + "external.out is missing") +endif() + message("Waiting 3 seconds...") -# any additional argument will cause ${bar} to wait forever -execute_process(COMMAND ${bar} -infinite TIMEOUT 3 OUTPUT_VARIABLE out) +execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 3) message("Modifying Project/foo.cxx") write_file(${BuildDepends_BINARY_DIR}/Project/foo.cxx @@ -191,6 +205,8 @@ if(TEST_LINK_DEPENDS) file(WRITE ${TEST_LINK_DEPENDS} "2") endif() +file(WRITE ${BuildDepends_BINARY_DIR}/Project/external.in "external changed\n") + help_xcode_depends() message("Building project second time") @@ -294,3 +310,16 @@ else() message(SEND_ERROR "Project did not rebuild properly. " "Targets link_depends_no_shared_lib and link_depends_no_shared_exe not both built.") endif() + +if(EXISTS ${BuildDepends_BINARY_DIR}/Project/external.out) + file(STRINGS ${BuildDepends_BINARY_DIR}/Project/external.out external_out) + if("${external_out}" STREQUAL "external changed") + message(STATUS "external.out contains '${external_out}'") + else() + message(SEND_ERROR "Project did not rebuild properly: " + "external.out contains '${external_out}'") + endif() +else() + message(SEND_ERROR "Project did not rebuild properly: " + "external.out is missing") +endif() diff --git a/Tests/BuildDepends/Project/CMakeLists.txt b/Tests/BuildDepends/Project/CMakeLists.txt index 8806ecd..9ee4a43 100644 --- a/Tests/BuildDepends/Project/CMakeLists.txt +++ b/Tests/BuildDepends/Project/CMakeLists.txt @@ -139,3 +139,15 @@ add_custom_target(header_tgt DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/dir/header.h) include_directories(${CMAKE_CURRENT_BINARY_DIR}) add_executable(ninjadep ninjadep.cpp) add_dependencies(ninjadep header_tgt) + +include(ExternalProject) +ExternalProject_Add(ExternalBuild + SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/External + BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/External + STAMP_DIR ${CMAKE_CURRENT_BINARY_DIR}/External/Stamp + BUILD_ALWAYS 1 + CMAKE_ARGS + -Dexternal_in=${CMAKE_CURRENT_BINARY_DIR}/external.in + -Dexternal_out=${CMAKE_CURRENT_BINARY_DIR}/external.out + INSTALL_COMMAND "" + ) diff --git a/Tests/BuildDepends/Project/External/CMakeLists.txt b/Tests/BuildDepends/Project/External/CMakeLists.txt new file mode 100644 index 0000000..c6015b6 --- /dev/null +++ b/Tests/BuildDepends/Project/External/CMakeLists.txt @@ -0,0 +1,14 @@ +cmake_minimum_required(VERSION 3.0) +project(BuildDependsExternal NONE) +if(NOT DEFINED external_in) + message(FATAL_ERROR "Define external_in") +endif() +if(NOT DEFINED external_out) + message(FATAL_ERROR "Define external_out") +endif() +add_custom_command( + OUTPUT ${external_out} + COMMAND ${CMAKE_COMMAND} -E copy ${external_in} ${external_out} + DEPENDS ${external_in} + ) +add_custom_target(drive ALL DEPENDS ${external_out}) diff --git a/Tests/BuildDepends/Project/bar.cxx b/Tests/BuildDepends/Project/bar.cxx index 25d8bd2..dadf93d 100644 --- a/Tests/BuildDepends/Project/bar.cxx +++ b/Tests/BuildDepends/Project/bar.cxx @@ -15,11 +15,5 @@ int main(int argc, char** argv) /* Print out the string that should have been regenerated. */ printf("%s\n", regen_string); fflush(stdout); - // if any argument is used, wait forever - if (argc>1) - { - // wait that we get killed... - for(;;); - } return 0; } diff --git a/Tests/CMakeBuildTest.cmake.in b/Tests/CMakeBuildTest.cmake.in index 0f7074b..aaefe43 100644 --- a/Tests/CMakeBuildTest.cmake.in +++ b/Tests/CMakeBuildTest.cmake.in @@ -11,8 +11,8 @@ file(REMOVE "@CMAKE_BUILD_TEST_SOURCE_DIR@/CMakeCache.txt") message("running: ${CMAKE_COMMAND}") execute_process(COMMAND "${CMAKE_COMMAND}" "@CMAKE_BUILD_TEST_SOURCE_DIR@" - "-G@CMAKE_TEST_GENERATOR@" - -T "@CMAKE_TEST_GENERATOR_TOOLSET@" + "-G@CMAKE_GENERATOR@" + -T "@CMAKE_GENERATOR_TOOLSET@" WORKING_DIRECTORY "@CMAKE_BUILD_TEST_BINARY_DIR@" RESULT_VARIABLE RESULT) if(RESULT) diff --git a/Tests/CMakeCommands/target_compile_features/CMakeLists.txt b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt new file mode 100644 index 0000000..9b35f27 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/CMakeLists.txt @@ -0,0 +1,45 @@ +cmake_minimum_required(VERSION 3.0) +project(target_compile_features) + +if (NOT CMAKE_CXX_COMPILE_FEATURES AND NOT CMAKE_C_COMPILE_FEATURES) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_dummy.cpp" + "int main(int,char**) { return 0; }\n" + ) + add_executable(target_compile_features "${CMAKE_CURRENT_BINARY_DIR}/test_dummy.cpp") + return() +endif() + +set(CMAKE_VERBOSE_MAKEFILE ON) + +if (CMAKE_C_COMPILE_FEATURES) + add_executable(target_compile_features main.c) + target_compile_features(target_compile_features + PRIVATE c_restrict + ) + + add_library(lib_restrict lib_restrict.c) + target_compile_features(lib_restrict + PUBLIC c_restrict + ) + + add_executable(restrict_user restrict_user.c) + target_link_libraries(restrict_user lib_restrict) +endif() + +if (CMAKE_CXX_COMPILE_FEATURES) + if (CMAKE_C_COMPILE_FEATURES) + set(target_suffix _cxx) + endif() + add_executable(target_compile_features${target_suffix} main.cpp) + target_compile_features(target_compile_features${target_suffix} + PRIVATE cxx_auto_type + ) + + add_library(lib_auto_type lib_auto_type.cpp) + target_compile_features(lib_auto_type + PUBLIC cxx_auto_type + ) + + add_executable(lib_user lib_user.cpp) + target_link_libraries(lib_user lib_auto_type) +endif() diff --git a/Tests/CMakeCommands/target_compile_features/dummy.cpp b/Tests/CMakeCommands/target_compile_features/dummy.cpp new file mode 100644 index 0000000..341aaaf --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/dummy.cpp @@ -0,0 +1,5 @@ + +int main(int, char **) +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp b/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp new file mode 100644 index 0000000..71b2215 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/lib_auto_type.cpp @@ -0,0 +1,6 @@ + +int getAutoTypeImpl() +{ + auto i = 0; + return i; +} diff --git a/Tests/CMakeCommands/target_compile_features/lib_auto_type.h b/Tests/CMakeCommands/target_compile_features/lib_auto_type.h new file mode 100644 index 0000000..c825b10 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/lib_auto_type.h @@ -0,0 +1,8 @@ + +int getAutoTypeImpl(); + +int getAutoType() +{ + auto i = getAutoTypeImpl(); + return i; +} diff --git a/Tests/CMakeCommands/target_compile_features/lib_restrict.c b/Tests/CMakeCommands/target_compile_features/lib_restrict.c new file mode 100644 index 0000000..049c1b0 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/lib_restrict.c @@ -0,0 +1,9 @@ + +#include "lib_restrict.h" + +int foo(int * restrict a, int * restrict b) +{ + (void)a; + (void)b; + return 0; +} diff --git a/Tests/CMakeCommands/target_compile_features/lib_restrict.h b/Tests/CMakeCommands/target_compile_features/lib_restrict.h new file mode 100644 index 0000000..eca22be --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/lib_restrict.h @@ -0,0 +1,7 @@ + +#ifndef LIB_RESTRICT_H +#define LIB_RESTRICT_H + +int foo(int * restrict a, int * restrict b); + +#endif diff --git a/Tests/CMakeCommands/target_compile_features/lib_user.cpp b/Tests/CMakeCommands/target_compile_features/lib_user.cpp new file mode 100644 index 0000000..976068a --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/lib_user.cpp @@ -0,0 +1,7 @@ + +#include "lib_auto_type.h" + +int main(int argc, char **argv) +{ + return getAutoType(); +} diff --git a/Tests/CMakeCommands/target_compile_features/main.c b/Tests/CMakeCommands/target_compile_features/main.c new file mode 100644 index 0000000..831c5eb2 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/main.c @@ -0,0 +1,12 @@ + +int foo(int * restrict a, int * restrict b) +{ + (void)a; + (void)b; + return 0; +} + +int main() +{ + return 0; +} diff --git a/Tests/CMakeCommands/target_compile_features/main.cpp b/Tests/CMakeCommands/target_compile_features/main.cpp new file mode 100644 index 0000000..fe29b04 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/main.cpp @@ -0,0 +1,6 @@ + +int main(int, char **) +{ + auto i = 0; + return i; +} diff --git a/Tests/CMakeCommands/target_compile_features/restrict_user.c b/Tests/CMakeCommands/target_compile_features/restrict_user.c new file mode 100644 index 0000000..d47b847 --- /dev/null +++ b/Tests/CMakeCommands/target_compile_features/restrict_user.c @@ -0,0 +1,14 @@ + +#include "lib_restrict.h" + +int bar(int * restrict a, int * restrict b) +{ + (void)a; + (void)b; + return foo(a, b); +} + +int main() +{ + return 0; +} diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt index 0e1fe8d..8c99f64 100644 --- a/Tests/CMakeLib/CMakeLists.txt +++ b/Tests/CMakeLib/CMakeLists.txt @@ -13,6 +13,8 @@ set(CMakeLib_TESTS testXMLSafe ) +set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR}) + if(WIN32) list(APPEND CMakeLib_TESTS testVisualStudioSlnParser @@ -39,7 +41,7 @@ if(CMAKE_OSX_ARCHITECTURES AND XCODE endif() foreach(test ${CMakeLib_TESTS}) - add_test(CMakeLib.${test} CMakeLibTests ${test}) + add_test(CMakeLib.${test} CMakeLibTests ${test} ${${test}_ARGS}) endforeach() if(TEST_CompileCommandOutput) diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index dc1ce24..279bcd5 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -2,14 +2,14 @@ class CompileCommandParser { public: - class CommandType: public std::map<cmStdString, cmStdString> + class CommandType: public std::map<std::string, std::string> { public: - cmStdString const& at(cmStdString const& k) const + std::string const& at(std::string const& k) const { const_iterator i = this->find(k); if(i != this->end()) { return i->second; } - static cmStdString emptyString; + static std::string emptyString; return emptyString; } }; @@ -127,7 +127,7 @@ int main () it = parser.GetTranslationUnits().begin(), end = parser.GetTranslationUnits().end(); it != end; ++it) { - std::vector<cmStdString> command; + std::vector<std::string> command; cmSystemTools::ParseUnixCommandLine(it->at("command").c_str(), command); if (!cmSystemTools::RunSingleCommand( command, 0, 0, it->at("directory").c_str())) diff --git a/Tests/CMakeLib/testRST.cxx b/Tests/CMakeLib/testRST.cxx index bad9560..37cb3fa 100644 --- a/Tests/CMakeLib/testRST.cxx +++ b/Tests/CMakeLib/testRST.cxx @@ -25,9 +25,14 @@ void reportLine(std::ostream& os, bool ret, std::string line, bool eol) } } -int testRST(int, char*[]) +int testRST(int argc, char* argv[]) { - std::string dir = cmSystemTools::GetFilenamePath(__FILE__); + if(argc != 2) + { + std::cerr << "Usage: testRST <dir>" << std::endl; + return 1; + } + std::string dir = argv[1]; if(dir.empty()) { dir = "."; diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c903103..cf7bd75 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -45,26 +45,27 @@ configure_file(${CMake_SOURCE_DIR}/Tests/EnforceConfig.cmake.in # Testing if(BUILD_TESTING) - set(CMAKE_TEST_DEVENV "") - if(NOT CMAKE_TEST_DIFFERENT_GENERATOR) - if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio") - set(CMAKE_TEST_MAKEPROGRAM "") - else() - set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}") - endif() - if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio [7-9] " AND - NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]") - set(CMAKE_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}") - endif() + set(CMake_TEST_DEVENV "") + if(CMAKE_GENERATOR MATCHES "Visual Studio [7-9] " AND + NOT CMAKE_MAKE_PROGRAM MATCHES "[mM][sS][bB][uU][iI][lL][dD]\\.[eE][xX][eE]") + set(CMake_TEST_DEVENV "${CMAKE_MAKE_PROGRAM}") endif() - if("${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles" OR ("${CMAKE_TEST_GENERATOR}" MATCHES Ninja AND NOT WIN32)) - set(TEST_CompileCommandOutput 1) + if(CMAKE_GENERATOR MATCHES "Visual Studio") + set(CMake_TEST_EXPLICIT_MAKE_PROGRAM "") + else() + set(CMake_TEST_EXPLICIT_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM}") + endif() + + if(NOT CMake_TEST_EXTERNAL_CMAKE) + if("${CMAKE_GENERATOR}" MATCHES "Unix Makefiles" OR ("${CMAKE_GENERATOR}" MATCHES Ninja AND NOT WIN32)) + set(TEST_CompileCommandOutput 1) + endif() endif() set(MAKE_IS_GNU ) - if(CMAKE_TEST_MAKEPROGRAM MATCHES make) - execute_process(COMMAND ${CMAKE_TEST_MAKEPROGRAM} no_such_target --version + if(CMAKE_MAKE_PROGRAM MATCHES make) + execute_process(COMMAND ${CMAKE_MAKE_PROGRAM} no_such_target --version RESULT_VARIABLE res OUTPUT_VARIABLE out ERROR_VARIABLE out) if("${res}" STREQUAL "0") if("${out}" MATCHES "GNU") @@ -75,34 +76,38 @@ if(BUILD_TESTING) # some old versions of make simply cannot handle spaces in paths if (MAKE_IS_GNU OR - CMAKE_TEST_MAKEPROGRAM MATCHES "nmake|gmake|wmake" OR - CMAKE_TEST_GENERATOR MATCHES "Visual Studio|XCode|Borland") + CMAKE_MAKE_PROGRAM MATCHES "nmake|gmake|wmake" OR + CMAKE_GENERATOR MATCHES "Visual Studio|XCode|Borland") set(MAKE_SUPPORTS_SPACES 1) else() set(MAKE_SUPPORTS_SPACES 0) endif() set(build_generator_args - --build-generator ${CMAKE_TEST_GENERATOR} + --build-generator ${CMAKE_GENERATOR} ) - if(CMAKE_TEST_GENERATOR_TOOLSET) + if(CMAKE_GENERATOR_TOOLSET) list(APPEND build_generator_args - --build-generator-toolset ${CMAKE_TEST_GENERATOR_TOOLSET} + --build-generator-toolset ${CMAKE_GENERATOR_TOOLSET} ) endif() set(build_options) - if(CMAKE_TEST_MAKEPROGRAM) - list(APPEND build_options -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM}) + if(CMake_TEST_EXPLICIT_MAKE_PROGRAM) + list(APPEND build_options -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMake_TEST_EXPLICIT_MAKE_PROGRAM}) endif() - add_subdirectory(CMakeLib) + if(NOT CMake_TEST_EXTERNAL_CMAKE) + add_subdirectory(CMakeLib) + endif() add_subdirectory(CMakeOnly) add_subdirectory(RunCMake) add_subdirectory(FindPackageModeMakefileTest) - add_subdirectory(CTestTestMemcheck) + if(NOT CMake_TEST_EXTERNAL_CMAKE) + add_subdirectory(CTestTestMemcheck) + endif() # Collect a list of all test build directories. set(TEST_BUILD_DIRS) @@ -192,6 +197,9 @@ if(BUILD_TESTING) ADD_TEST_MACRO(TarTest TarTest) ADD_TEST_MACRO(SystemInformation SystemInformation) ADD_TEST_MACRO(MathTest MathTest) + ADD_TEST_MACRO(CompileFeatures CompileFeatures) + ADD_TEST_MACRO(CMakeCommands.target_compile_features target_compile_features) + # assume no resources building to test set(TEST_RESOURCES FALSE) # for windows and cygwin assume we have resources @@ -199,8 +207,8 @@ if(BUILD_TESTING) set(TEST_RESOURCES TRUE) endif() # for borland and watcom there is no resource support - if("${CMAKE_TEST_GENERATOR}" MATCHES "WMake" OR - "${CMAKE_TEST_GENERATOR}" MATCHES "Borland") + if("${CMAKE_GENERATOR}" MATCHES "WMake" OR + "${CMAKE_GENERATOR}" MATCHES "Borland") set(TEST_RESOURCES FALSE) endif() if(TEST_RESOURCES) @@ -249,7 +257,9 @@ if(BUILD_TESTING) ADD_TEST_MACRO(SetLang SetLang) ADD_TEST_MACRO(EmptyProperty EmptyProperty) ADD_TEST_MACRO(ExternalOBJ ExternalOBJ) - ADD_TEST_MACRO(LoadCommand LoadedCommand) + if(NOT CMake_TEST_EXTERNAL_CMAKE) + ADD_TEST_MACRO(LoadCommand LoadedCommand) + endif() ADD_TEST_MACRO(LinkDirectory bin/LinkDirectory) ADD_TEST_MACRO(LinkLanguage LinkLanguage) ADD_TEST_MACRO(LinkLine LinkLine) @@ -260,7 +270,7 @@ if(BUILD_TESTING) ADD_TEST_MACRO(Assembler HelloAsm) ADD_TEST_MACRO(SourceGroups SourceGroups) ADD_TEST_MACRO(Preprocess Preprocess) - set(ExportImport_BUILD_OPTIONS -DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM}) + set(ExportImport_BUILD_OPTIONS -DCMake_TEST_NESTED_MAKE_PROGRAM:FILEPATH=${CMake_TEST_EXPLICIT_MAKE_PROGRAM}) ADD_TEST_MACRO(ExportImport ExportImport) ADD_TEST_MACRO(Unset Unset) ADD_TEST_MACRO(PolicyScope PolicyScope) @@ -271,12 +281,30 @@ if(BUILD_TESTING) ADD_TEST_MACRO(AliasTarget AliasTarget) ADD_TEST_MACRO(StagingPrefix StagingPrefix) ADD_TEST_MACRO(InterfaceLibrary InterfaceLibrary) + if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]") + set(ConfigSources_BUILD_OPTIONS -DCMAKE_BUILD_TYPE=Debug) + ADD_TEST_MACRO(ConfigSources ConfigSources) + endif() + ADD_TEST_MACRO(SourcesProperty SourcesProperty) + if(CMAKE_CXX_COMPILER_ID STREQUAL GNU + AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.6) + set(runCxxDialectTest 1) + endif() + if(CMAKE_CXX_COMPILER_ID STREQUAL Clang + AND NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 2.9) + if(NOT APPLE OR POLICY CMP0025) + set(runCxxDialectTest 1) + endif() + endif() + if(runCxxDialectTest) + ADD_TEST_MACRO(CxxDialect CxxDialect) + endif() set_tests_properties(EmptyLibrary PROPERTIES PASS_REGULAR_EXPRESSION "CMake Error: CMake can not determine linker language for target: test") ADD_TEST_MACRO(CrossCompile CrossCompile) set_tests_properties(CrossCompile PROPERTIES PASS_REGULAR_EXPRESSION "TRY_RUN.. invoked in cross-compiling mode") - if("${CMAKE_TEST_GENERATOR}" MATCHES "Make") + if("${CMAKE_GENERATOR}" MATCHES "Make") ADD_TEST_MACRO(Policy0002 Policy0002) endif() if(CTEST_TEST_OSX_ARCH) @@ -315,7 +343,7 @@ if(BUILD_TESTING) MINGW OR CMAKE_SYSTEM_NAME MATCHES "Linux" OR CMAKE_SYSTEM_NAME MATCHES "Darwin") - if(NOT "${CMAKE_TEST_GENERATOR}" STREQUAL "Watcom WMake") + if(NOT "${CMAKE_GENERATOR}" STREQUAL "Watcom WMake") add_test(BundleUtilities ${CMAKE_CTEST_COMMAND} --build-and-test @@ -381,6 +409,9 @@ if(BUILD_TESTING) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Module/ExternalData") ADD_TEST_MACRO(Module.GenerateExportHeader GenerateExportHeader) + ADD_TEST_MACRO(Module.FindDependency FindDependency) + + ADD_TEST_MACRO(Module.WriteCompilerDetectionHeader WriteCompilerDetectionHeader) if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU") include(CheckCXXCompilerFlag) @@ -465,7 +496,7 @@ if(BUILD_TESTING) # build the "Simple" test with the ExtraGenerators, if available # This doesn't test whether the generated project files work (unfortunately), # mainly it tests that cmake doesn't crash when generating these project files. - if(${CMAKE_TEST_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_TEST_GENERATOR} MATCHES "KDevelop") + if(${CMAKE_GENERATOR} MATCHES "Unix Makefiles" OR ${CMAKE_GENERATOR} MATCHES "KDevelop") # check which generators we have execute_process(COMMAND ${CMAKE_CMAKE_COMMAND} --help OUTPUT_VARIABLE cmakeOutput ERROR_VARIABLE cmakeOutput) @@ -477,7 +508,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_EclipseGenerator" --build-two-config --build-generator "Eclipse CDT4 - Unix Makefiles" - --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project Simple --build-options ${build_options} --test-command Simple) @@ -492,7 +523,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_CodeBlocksGenerator" --build-two-config --build-generator "CodeBlocks - Unix Makefiles" - --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project Simple --build-options ${build_options} --test-command Simple) @@ -506,7 +537,7 @@ if(BUILD_TESTING) "${CMake_BINARY_DIR}/Tests/Simple_KDevelop3Generator" --build-two-config --build-generator "KDevelop3 - Unix Makefiles" - --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project Simple --build-options ${build_options} --test-command Simple) @@ -517,7 +548,7 @@ if(BUILD_TESTING) # test for correct sub-project generation # not implemented in VS 6, VS 7.0, Xcode, or Ninja - if(NOT CMAKE_TEST_GENERATOR MATCHES "Visual Studio [67]$|Xcode|Ninja") + if(NOT CMAKE_GENERATOR MATCHES "Visual Studio [67]$|Xcode|Ninja") # run cmake and configure all of SubProject # but only build the independent executable car add_test(SubProject ${CMAKE_CTEST_COMMAND} @@ -536,17 +567,17 @@ if(BUILD_TESTING) # the bar library which should be referenced because # foo links to the static library bar, but bar is not # directly in the foo sub project - if(CMAKE_TEST_MAKEPROGRAM) + if(CMake_TEST_EXPLICIT_MAKE_PROGRAM) set(SubProject-Stage2_BUILD_MAKEPROGRAM - --build-makeprogram ${CMAKE_TEST_MAKEPROGRAM} + --build-makeprogram ${CMake_TEST_EXPLICIT_MAKE_PROGRAM} ) endif() add_test(SubProject-Stage2 ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/SubProject/foo" "${CMake_BINARY_DIR}/Tests/SubProject/foo" - --build-generator ${CMAKE_TEST_GENERATOR} - --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" + --build-generator ${CMAKE_GENERATOR} + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" ${SubProject-Stage2_BUILD_MAKEPROGRAM} --build-nocmake --build-project foo @@ -567,7 +598,7 @@ if(BUILD_TESTING) file(WRITE "${_TEST_DIR}/nightly-cmake.sh" "cd ${_TEST_DIR} ${CMake_BINARY_DIR}/bin/cmake -DCMAKE_CREATE_VERSION=nightly -P ${CMake_SOURCE_DIR}/Utilities/Release/${script} -${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/Release/upload_release.cmake +${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release/upload_release.cmake ") add_test(${name} /bin/sh ${_TEST_DIR}/nightly-cmake.sh) if(COMMAND SET_TESTS_PROPERTIES AND COMMAND GET_TEST_PROPERTY) @@ -785,7 +816,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ set(CTEST_package_X11_TEST ${CTEST_TEST_CPACK}) set(CTEST_RUN_CPackComponentsForAll ${CTEST_TEST_CPACK}) - if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*") + if (CMAKE_SYSTEM_NAME MATCHES "Linux" AND NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ") find_program(RPMBUILD NAMES rpmbuild) endif() # Do not try to build RPM @@ -821,6 +852,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ if(WIX_LIGHT_EXECUTABLE) add_test(CPackWiXGenerator ${CMAKE_CTEST_COMMAND} + -C \${CTEST_CONFIGURATION_TYPE} --build-and-test "${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator" "${CMake_BINARY_DIR}/Tests/CPackWiXGenerator" @@ -829,6 +861,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-options ${build_options} --test-command ${CMAKE_CMAKE_COMMAND} "-DCPackWiXGenerator_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/CPackWiXGenerator" + "-Dconfig=\${CTEST_CONFIGURATION_TYPE}" -P "${CMake_SOURCE_DIR}/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake") endif() endif() @@ -884,7 +917,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ if(APPLE) list(APPEND GENLST "DragNDrop") endif() - if (NOT CMAKE_CURRENT_BINARY_DIR MATCHES ".* .*") + if (NOT CMAKE_CURRENT_BINARY_DIR MATCHES " ") list(FIND ACTIVE_CPACK_GENERATORS "RPM" RPM_ACTIVE) if (NOT ${RPM_ACTIVE} EQUAL -1) list(APPEND GENLST "RPM") @@ -995,7 +1028,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ if(CTEST_RUN_CMakeTestBadCommandLines) add_test(CMakeTestBadCommandLines ${CMAKE_CMAKE_COMMAND} -D dir=${CMake_BINARY_DIR}/Tests/CMakeTestBadCommandLines - -D gen=${CMAKE_TEST_GENERATOR} + -D gen=${CMAKE_GENERATOR} -D CMake_SOURCE_DIR=${CMake_SOURCE_DIR} -P ${CMake_SOURCE_DIR}/Tests/CMakeTestBadCommandLines/RunCMake.cmake ) @@ -1010,7 +1043,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ if(CTEST_RUN_CMakeTestMultipleConfigures) add_test(CMakeTestMultipleConfigures ${CMAKE_CMAKE_COMMAND} -D dir=${CMake_BINARY_DIR}/Tests/CMakeTestMultipleConfigures - -D gen=${CMAKE_TEST_GENERATOR} + -D gen=${CMAKE_GENERATOR} -D CMake_SOURCE_DIR=${CMake_SOURCE_DIR} -P ${CMake_SOURCE_DIR}/Tests/CMakeTestMultipleConfigures/RunCMake.cmake ) @@ -1018,16 +1051,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ "${CMake_BINARY_DIR}/Tests/CMakeTestMultipleConfigures") endif() - add_test(LoadedCommandOneConfig ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Tests/LoadCommandOneConfig" - "${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig" - ${build_generator_args} - --build-project LoadCommand - --build-options ${build_options} - --test-command LoadedCommand - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig") + if(NOT CMake_TEST_EXTERNAL_CMAKE) + add_test(LoadedCommandOneConfig ${CMAKE_CTEST_COMMAND} + --build-and-test + "${CMake_SOURCE_DIR}/Tests/LoadCommandOneConfig" + "${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig" + ${build_generator_args} + --build-project LoadCommand + --build-options ${build_options} + --test-command LoadedCommand + ) + list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/LoadCommandOneConfig") + endif() add_test(complex ${CMAKE_CTEST_COMMAND} --build-and-test @@ -1233,8 +1268,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ COMMAND ${CMAKE_CMAKE_COMMAND} -DExternalProjectUpdate_SOURCE_DIR:PATH=${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate -DExternalProjectUpdate_BINARY_DIR:PATH=${CMake_BINARY_DIR}/Tests/ExternalProjectUpdate - -DCMAKE_TEST_GENERATOR=${CMAKE_TEST_GENERATOR} - -DCMAKE_TEST_GENERATOR_TOOLSET=${CMAKE_TEST_GENERATOR_TOOLSET} + -DCMAKE_GENERATOR=${CMAKE_GENERATOR} + -DCMAKE_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DCMAKE_CTEST_COMMAND=${CMAKE_CTEST_COMMAND} -P ${CMake_SOURCE_DIR}/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake ) @@ -1405,7 +1440,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ${build_generator_args} --build-project MacRuntimePath --build-options ${build_options} - -DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM} + -DCMake_TEST_NESTED_MAKE_PROGRAM:FILEPATH=${CMake_TEST_EXPLICIT_MAKE_PROGRAM} ) endif() @@ -1452,19 +1487,6 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ ) endif() - if(NOT CMAKE_TEST_DIFFERENT_GENERATOR) - add_test(kwsys ${CMAKE_CTEST_COMMAND} - --build-and-test - "${CMake_SOURCE_DIR}/Source/kwsys" - "${CMake_BINARY_DIR}/Tests/kwsys" - ${build_generator_args} - --build-project kwsys - --build-options ${build_options} - --test-command kwsysTestsCxx testIOS - ) - list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/kwsys") - endif() - if(MAKE_SUPPORTS_SPACES) add_test(SubDirSpaces ${CMAKE_CTEST_COMMAND} --build-and-test @@ -1511,19 +1533,19 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ endif () list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/SubDir") - if(CMAKE_TEST_MSVC) + if(MSVC) ADD_TEST_MACRO(ForceInclude foo) ADD_TEST_MACRO(PDBDirectoryAndName myexe) ADD_TEST_MACRO(PrecompiledHeader foo) endif() - if(CMAKE_TEST_MSVC OR - "${CMAKE_TEST_GENERATOR}" MATCHES "(MSYS|MinGW) Makefiles") + if(MSVC OR + "${CMAKE_GENERATOR}" MATCHES "(MSYS|MinGW) Makefiles") ADD_TEST_MACRO(ModuleDefinition example_exe) endif() ADD_TEST_MACRO(CheckCompilerRelatedVariables CheckCompilerRelatedVariables) - if("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile") + if("${CMAKE_GENERATOR}" MATCHES "Makefile") add_test(MakeClean ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/MakeClean" @@ -1545,10 +1567,10 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ # Look for evidence that this is a VCExpress build. If so, avoid # the MFC test by default. - string(TOLOWER "${CMAKE_MAKE_PROGRAM};${CMAKE_TEST_MAKEPROGRAM}" mkprog) + string(TOLOWER "${CMAKE_MAKE_PROGRAM}" mkprog) if(mkprog MATCHES "vcexpress") message(STATUS - "CMAKE_TEST_MAKEPROGRAM indicates vcexpress, avoiding MFC test") + "CMAKE_MAKE_PROGRAM indicates vcexpress, avoiding MFC test") set(CTEST_RUN_MFC OFF) endif() @@ -1569,7 +1591,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ # For the Watcom WMake generator, avoid the MFC test by default. if(CTEST_RUN_MFC) - if("${CMAKE_TEST_GENERATOR}" MATCHES "WMake") + if("${CMAKE_GENERATOR}" MATCHES "WMake") message(STATUS "using the Watcom WMake generator, avoiding MFC test") set(CTEST_RUN_MFC OFF) @@ -1642,13 +1664,13 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/MFC") endif() - if(${CMAKE_TEST_GENERATOR} MATCHES "Visual Studio") + if(${CMAKE_GENERATOR} MATCHES "Visual Studio") if(NOT MSVC60) ADD_TEST_MACRO(SBCS SBCS) endif() - if(NOT "${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [6789]( |$)" - AND NOT CMAKE_TEST_GENERATOR_TOOLSET) + if(NOT "${CMAKE_GENERATOR}" MATCHES "Visual Studio [6789]( |$)" + AND NOT CMAKE_GENERATOR_TOOLSET) ADD_TEST_MACRO(VSWindowsFormsResx VSWindowsFormsResx) endif() @@ -1674,7 +1696,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --test-command VSMidl) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSMidl") - if(CMAKE_TEST_DEVENV) + if(CMake_TEST_DEVENV) # The test (and tested property) works with .sln files, so it's skipped when: # * Using VS6, which doesn't use .sln files # * cmake --build is set up to use MSBuild, since the MSBuild invocation does not use the .sln file @@ -1686,9 +1708,9 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild" --build-config ${config} --build-two-config - --build-generator ${CMAKE_TEST_GENERATOR} - --build-makeprogram ${CMAKE_TEST_DEVENV} - --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" + --build-generator ${CMAKE_GENERATOR} + --build-makeprogram ${CMake_TEST_DEVENV} + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project VSExcludeFromDefaultBuild --test-command ${CMAKE_COMMAND} -D "activeConfig=${config}" @@ -1704,15 +1726,15 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSExcludeFromDefaultBuild") endif() - if(CMAKE_TEST_GENERATOR MATCHES "Visual Studio ([0-5]|[6-9][0-9])") + if(CMAKE_GENERATOR MATCHES "Visual Studio ([0-5]|[6-9][0-9])") # This is Visual Studio 10 or above, so the default build tool is MSBuild. add_test(NAME VSProjectInSubdir COMMAND ${CMAKE_CTEST_COMMAND} --build-and-test "${CMake_SOURCE_DIR}/Tests/VSProjectInSubdir" "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir" --build-two-config - --build-generator ${CMAKE_TEST_GENERATOR} - --build-generator-toolset "${CMAKE_TEST_GENERATOR_TOOLSET}" + --build-generator ${CMAKE_GENERATOR} + --build-generator-toolset "${CMAKE_GENERATOR_TOOLSET}" --build-project VSProjectInSubdir --build-target test) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/VSProjectInSubdir") @@ -1750,7 +1772,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --test-command ${CMAKE_CMAKE_COMMAND} -DCTEST_CONFIGURATION_TYPE=\${CTEST_CONFIGURATION_TYPE} -Ddir=${CMake_BINARY_DIR}/Tests/CFBundleTest - -Dgen=${CMAKE_TEST_GENERATOR} + -Dgen=${CMAKE_GENERATOR} -P ${CMake_SOURCE_DIR}/Tests/CFBundleTest/VerifyResult.cmake) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/CFBundleTest") @@ -1798,12 +1820,12 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-options ${build_options} "--warn-unused-vars") set_tests_properties(WarnUnusedUnusedViaUnset PROPERTIES - PASS_REGULAR_EXPRESSION "CMake Warning .*VariableUnusedViaUnset.CMakeLists.txt:7 \\(set\\):") + PASS_REGULAR_EXPRESSION "CMake Warning \\(dev\\) at CMakeLists.txt:7 \\(set\\):") set_tests_properties(WarnUnusedUnusedViaUnset PROPERTIES - FAIL_REGULAR_EXPRESSION "CMake Warning .*VariableUnusedViaUnset.CMakeLists.txt:5 \\(set\\):") + FAIL_REGULAR_EXPRESSION "CMakeLists.txt:5 \\(set\\):") list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/WarnUnusedUnusedViaUnset") - if("${CMAKE_TEST_GENERATOR}" MATCHES "Makefile" AND NOT WIN32) + if("${CMAKE_GENERATOR}" MATCHES "Makefile" AND NOT WIN32) # Ninja does not support ADDITIONAL_MAKE_CLEAN_FILES and therefore fails # this test. (See #13371) # Apparently Visual Studio does not support it either. As the MakeClean @@ -1876,11 +1898,11 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ # A test for ctest_build() with targets in subdirectories set(ctest_configure_options) - if(CMAKE_TEST_GENERATOR_TOOLSET) - list(APPEND ctest_configure_options -T ${CMAKE_TEST_GENERATOR_TOOLSET}) + if(CMAKE_GENERATOR_TOOLSET) + list(APPEND ctest_configure_options -T ${CMAKE_GENERATOR_TOOLSET}) endif() - if(CMAKE_TEST_MAKEPROGRAM) - list(APPEND ctest_configure_options -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM}) + if(CMake_TEST_EXPLICIT_MAKE_PROGRAM) + list(APPEND ctest_configure_options -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMake_TEST_EXPLICIT_MAKE_PROGRAM}) endif() configure_file("${CMake_SOURCE_DIR}/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake" @ONLY) @@ -2114,6 +2136,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ configure_file( "${CMake_SOURCE_DIR}/Tests/MumpsCoverage/gtm_coverage.mcov.in" "${CMake_BINARY_DIR}/Testing/MumpsCoverage/gtm_coverage.mcov") + file(REMOVE_RECURSE "${CMake_BINARY_DIR}/Testing/MumpsCoverage/VistA-FOIA") file(COPY "${CMake_SOURCE_DIR}/Tests/MumpsCoverage/VistA-FOIA" DESTINATION "${CMake_BINARY_DIR}/Testing/MumpsCoverage") add_test(NAME CTestGTMCoverage @@ -2122,7 +2145,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ $<TARGET_FILE:ctest> -T Coverage --debug) set_tests_properties(CTestGTMCoverage PROPERTIES PASS_REGULAR_EXPRESSION - "Process file.*XINDEX.m.*Total LOC:.*127.*Percentage Coverage: 85.83.*" + "Process file.*ZZCOVTST.m.*Total LOC:.*23.*Percentage Coverage: 82.61*" ENVIRONMENT COVFILE=) configure_file( @@ -2131,6 +2154,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ configure_file( "${CMake_SOURCE_DIR}/Tests/MumpsCoverage/cache_coverage.cmcov.in" "${CMake_BINARY_DIR}/Testing/MumpsCacheCoverage/cache_coverage.cmcov") + file(REMOVE_RECURSE "${CMake_BINARY_DIR}/Testing/MumpsCacheCoverage/VistA-FOIA") file(COPY "${CMake_SOURCE_DIR}/Tests/MumpsCoverage/VistA-FOIA" DESTINATION "${CMake_BINARY_DIR}/Testing/MumpsCacheCoverage") add_test(NAME CTestCacheCoverage @@ -2139,7 +2163,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ $<TARGET_FILE:ctest> -T Coverage --debug) set_tests_properties(CTestCacheCoverage PROPERTIES PASS_REGULAR_EXPRESSION - "Process file.*XINDEX.m.*Total LOC:.*125.*Percentage Coverage: 85.60.*" + "Process file.*ZZCOVTST.m.*Total LOC:.*22.*Percentage Coverage: 86.36.*" ENVIRONMENT COVFILE=) # Adding a test case for Python Coverage @@ -2160,6 +2184,40 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ "Process file.*foo.py.*Total LOC:.*13.*Percentage Coverage: 84.62.*" ENVIRONMENT COVFILE=) + # Adding a test case for non-python Cobertura Coverage + configure_file( + "${CMake_SOURCE_DIR}/Tests/CoberturaCoverage/DartConfiguration.tcl.in" + "${CMake_BINARY_DIR}/Testing/CoberturaCoverage/DartConfiguration.tcl") + configure_file( + "${CMake_SOURCE_DIR}/Tests/CoberturaCoverage/coverage.xml.in" + "${CMake_BINARY_DIR}/Testing/CoberturaCoverage/coverage.xml") + file(COPY "${CMake_SOURCE_DIR}/Tests/CoberturaCoverage/src" + DESTINATION "${CMake_BINARY_DIR}/Testing/CoberturaCoverage") + add_test(NAME CTestCoberturaCoverage + COMMAND cmake -E chdir + ${CMake_BINARY_DIR}/Testing/CoberturaCoverage + $<TARGET_FILE:ctest> -T Coverage --debug) + set_tests_properties(CTestCoberturaCoverage PROPERTIES + PASS_REGULAR_EXPRESSION + "Process file.*CoverageTest.java.*Total LOC:.*18.*Percentage Coverage: 72.22.*" + ENVIRONMENT COVFILE=) + + + # Adding a test case for JaCoCo Coverage + configure_file( + "${CMake_SOURCE_DIR}/Tests/JacocoCoverage/DartConfiguration.tcl.in" + "${CMake_BINARY_DIR}/Testing/JacocoCoverage/DartConfiguration.tcl") + file(COPY "${CMake_SOURCE_DIR}/Tests/JacocoCoverage/Coverage" + DESTINATION "${CMake_BINARY_DIR}/Testing/JacocoCoverage") + add_test(NAME CTestJacocoCoverage + COMMAND cmake -E chdir + ${CMake_BINARY_DIR}/Testing/JacocoCoverage + $<TARGET_FILE:ctest> -T Coverage --debug) + set_tests_properties(CTestJacocoCoverage PROPERTIES + PASS_REGULAR_EXPRESSION + "Process file.*CoverageTest.java.*Total LOC:.*17.*Percentage Coverage: 76.47*" + ENVIRONMENT COVFILE=) + function(add_config_tests cfg) set(base "${CMake_BINARY_DIR}/Tests/CTestConfig") @@ -2219,7 +2277,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestCrash/testOutput.log" ) # with watcom the SEGFAULT is not found, it just fails - if(CMAKE_TEST_GENERATOR MATCHES "Watcom WMake") + if(CMAKE_GENERATOR MATCHES "Watcom WMake") set_tests_properties(CTestTestCrash PROPERTIES PASS_REGULAR_EXPRESSION "Failed") else() @@ -2301,6 +2359,17 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ "All Labels:.* Label1.* Label2") configure_file( + "${CMake_SOURCE_DIR}/Tests/CTestTestLabelRegExp/test.cmake.in" + "${CMake_BINARY_DIR}/Tests/CTestTestLabelRegExp/test.cmake" + @ONLY ESCAPE_QUOTES) + add_test(NAME CTestTestLabelRegExp + COMMAND ${CMAKE_CMAKE_COMMAND} + -DSOURCE_DIR=${CMAKE_SOURCE_DIR}/Tests/CTestTestLabelRegExp + -P ${CMAKE_BINARY_DIR}/Tests/CTestTestLabelRegExp/test.cmake + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Tests/CTestTestLabelRegExp + ) + + configure_file( "${CMake_SOURCE_DIR}/Tests/CTestTestResourceLock/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTestResourceLock/test.cmake" @ONLY ESCAPE_QUOTES) @@ -2370,7 +2439,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --output-log "${CMake_BINARY_DIR}/Tests/CTestTestTimeout/testOutput.log" ) set_tests_properties(CTestTestTimeout PROPERTIES - PASS_REGULAR_EXPRESSION "TestTimeout *\\.+ *\\*\\*\\*Timeout.*CheckChild *\\.+ *Passed") + PASS_REGULAR_EXPRESSION "TestTimeout *\\.+ *\\*\\*\\*Timeout.*TestSleep *\\.+ *Passed.*timeout correctly killed child") add_test( NAME CTestTestRerunFailed @@ -2448,6 +2517,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ set(regex "${regex}|Error message was: ") set(regex "${regex}([Cc]ould *n.t resolve host") set(regex "${regex}|[Cc]ould *n.t connect to host") + set(regex "${regex}|Failed connect to") set(regex "${regex}|Empty reply from server") set(regex "${regex}|The requested URL returned error") set(regex "${regex}|libcurl was built with SSL disabled. https: not supported)") @@ -2479,7 +2549,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ if (CMAKE_TESTS_CDASH_SERVER) - set(regex "^([^:]+)://([^/]+)(/.*)$") + set(regex "^([^:]+)://([^/]+)(.*)$") if ("${CMAKE_TESTS_CDASH_SERVER}" MATCHES "${regex}") set(protocol "${CMAKE_MATCH_1}") @@ -2487,8 +2557,8 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ set(path "${CMAKE_MATCH_3}") else () set(protocol "http") - set(server "www.cdash.org") - set(path "/CDash") + set(server "open.cdash.org") + set(path "") message("warning: CMAKE_TESTS_CDASH_SERVER does not match expected regex...") message(" ...using default url='${protocol}://${server}${path}' for CTestTest[23]") endif () @@ -2510,7 +2580,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --output-log "${CMake_BINARY_DIR}/Tests/CTestTest2/testOutput.log" ) - if("${CMAKE_TEST_GENERATOR}" MATCHES "Makefiles" OR "${CMAKE_TEST_GENERATOR}" MATCHES "Ninja") + if("${CMAKE_GENERATOR}" MATCHES "Makefiles" OR "${CMAKE_GENERATOR}" MATCHES "Ninja") configure_file("${CMake_SOURCE_DIR}/Tests/CTestTestLaunchers/test.cmake.in" "${CMake_BINARY_DIR}/Tests/CTestTestLaunchers/test.cmake" @ONLY ESCAPE_QUOTES) add_test(CTestTestLaunchers ${CMAKE_CTEST_COMMAND} @@ -2547,7 +2617,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ endif () endif () - if("${CMAKE_TEST_GENERATOR}" MATCHES Xcode) + if("${CMAKE_GENERATOR}" MATCHES Xcode) set(CMAKE_SKIP_BOOTSTRAP_TEST 1) endif() if(EXISTS "${CMake_BINARY_DIR}/CMakeLists.txt") @@ -2592,7 +2662,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ --build-project testf --build-two-config --build-options ${build_options} - -DCMAKE_TEST_MAKEPROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM} + -DCMake_TEST_NESTED_MAKE_PROGRAM:FILEPATH=${CMake_TEST_EXPLICIT_MAKE_PROGRAM} --test-command testf) list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Fortran") @@ -2619,7 +2689,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ find_package(Java COMPONENTS Development QUIET) if(Java_JAVA_EXECUTABLE AND Java_JAVAC_EXECUTABLE AND Java_JAR_EXECUTABLE AND NOT MINGW - AND NOT "${CMAKE_TEST_GENERATOR}" MATCHES "Xcode") + AND NOT "${CMAKE_GENERATOR}" MATCHES "Xcode") get_filename_component(JNIPATH ${JAVA_COMPILE} PATH) find_file(JNI_H jni.h "${JNIPATH}/../include" @@ -2643,7 +2713,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ endif() # add some cross compiler tests, for now only with makefile based generators - if(CMAKE_TEST_GENERATOR MATCHES "Makefiles" OR CMAKE_TEST_GENERATOR MATCHES "KDevelop") + if(CMAKE_GENERATOR MATCHES "Makefiles" OR CMAKE_GENERATOR MATCHES "KDevelop") # if sdcc is found, build the SimpleCOnly project with sdcc find_program(SDCC_EXECUTABLE sdcc) @@ -2796,5 +2866,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/ WORKING_DIRECTORY ${CMake_BINARY_DIR}/Utilities/KWStyle) endif() - add_subdirectory(CMakeTests) + if(NOT CMake_TEST_EXTERNAL_CMAKE) + add_subdirectory(CMakeTests) + endif() endif() diff --git a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt index 691728a..15493be 100644 --- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt +++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt @@ -8,11 +8,14 @@ endif () # Avoid ctest truncation of output message(STATUS "CTEST_FULL_OUTPUT") +set(ORIGINAL_MODULE_PATH "${CMAKE_MODULE_PATH}") + file(GLOB FIND_MODULES "${CMAKE_CURRENT_SOURCE_DIR}/../../../Modules/Find*.cmake" ) macro(do_find MODULE_NAME) message(STATUS " Checking Find${MODULE_NAME}") find_package(${MODULE_NAME}) + set(CMAKE_MODULE_PATH "${ORIGINAL_MODULE_PATH}") endmacro() # It is only possible to use either Qt3 or Qt4 in one project. diff --git a/Tests/CMakeOnly/Test.cmake.in b/Tests/CMakeOnly/Test.cmake.in index a266415..285643a 100644 --- a/Tests/CMakeOnly/Test.cmake.in +++ b/Tests/CMakeOnly/Test.cmake.in @@ -8,8 +8,8 @@ file(REMOVE_RECURSE "${binary_dir}") file(MAKE_DIRECTORY "${binary_dir}") execute_process( COMMAND ${CMAKE_COMMAND} ${CMAKE_ARGS} - "${source_dir}" -G "@CMAKE_TEST_GENERATOR@" - -T "@CMAKE_TEST_GENERATOR_TOOLSET@" + "${source_dir}" -G "@CMAKE_GENERATOR@" + -T "@CMAKE_GENERATOR_TOOLSET@" WORKING_DIRECTORY "${binary_dir}" RESULT_VARIABLE result ) diff --git a/Tests/CMakeTests/CheckCMakeTest.cmake b/Tests/CMakeTests/CheckCMakeTest.cmake index 7be7b30..1565394 100644 --- a/Tests/CMakeTests/CheckCMakeTest.cmake +++ b/Tests/CMakeTests/CheckCMakeTest.cmake @@ -9,8 +9,8 @@ function(check_cmake_test_single prefix test testfile) ERROR_VARIABLE stderr RESULT_VARIABLE result ) - string(REGEX REPLACE "\n" "\n out> " out " out> ${stdout}") - string(REGEX REPLACE "\n" "\n err> " err " err> ${stderr}") + string(REPLACE "\n" "\n out> " out " out> ${stdout}") + string(REPLACE "\n" "\n err> " err " err> ${stderr}") if(NOT "${result}" STREQUAL "${${test}-RESULT}") message(FATAL_ERROR "Test ${test} result is [${result}], not [${${test}-RESULT}].\n" diff --git a/Tests/CMakeTests/ExecuteScriptTests.cmake b/Tests/CMakeTests/ExecuteScriptTests.cmake index c71585a..bceac33 100644 --- a/Tests/CMakeTests/ExecuteScriptTests.cmake +++ b/Tests/CMakeTests/ExecuteScriptTests.cmake @@ -52,9 +52,9 @@ function(execute_all_script_tests scriptname result) foreach(line ${script}) if(line MATCHES "${regex}") + set(testname "${CMAKE_MATCH_2}") + set(expected_result "${CMAKE_MATCH_3}") math(EXPR count "${count} + 1") - string(REGEX REPLACE "${regex}" "\\2" testname "${line}") - string(REGEX REPLACE "${regex}" "\\3" expected_result "${line}") execute_one_script_test(${scriptname} ${testname} ${expected_result}) endif() endforeach() diff --git a/Tests/CPackWiXGenerator/CMakeLists.txt b/Tests/CPackWiXGenerator/CMakeLists.txt index d673d14..638e788 100644 --- a/Tests/CPackWiXGenerator/CMakeLists.txt +++ b/Tests/CPackWiXGenerator/CMakeLists.txt @@ -9,6 +9,11 @@ target_link_libraries(my-libapp mylib) add_executable(my-other-app myotherapp.cpp) +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/empty) +install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/empty + DESTINATION extras + COMPONENT extras) + install(TARGETS mylib ARCHIVE DESTINATION lib @@ -58,6 +63,9 @@ set(CPACK_WIX_PATCH_FILE "${CMAKE_CURRENT_SOURCE_DIR}/patch.xml") set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/license.txt") +set(CPACK_WIX_PROPERTY_ARPCOMMENTS "My Custom ARPCOMMENTS") +set(CPACK_WIX_PROPERTY_ARPHELPLINK "http://www.cmake.org") + include(CPack) cpack_add_install_type(Full DISPLAY_NAME "Everything") @@ -69,6 +77,12 @@ cpack_add_component_group(Development EXPANDED DESCRIPTION "All of the tools you'll ever need to develop software") +cpack_add_component(extras + DISPLAY_NAME "Extras" + DESCRIPTION "Extras" + GROUP Runtime + INSTALL_TYPES Full) + cpack_add_component(applications REQUIRED DISPLAY_NAME "MyLib Application" diff --git a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake index 30e33cf2..ca9fd90 100644 --- a/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake +++ b/Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake @@ -10,7 +10,12 @@ message(STATUS "CMAKE_COMMAND: ${CMAKE_COMMAND}") message(STATUS "CMAKE_CPACK_COMMAND: ${CMAKE_CPACK_COMMAND}") message(STATUS "CPackWiXGenerator_BINARY_DIR: ${CPackWiXGenerator_BINARY_DIR}") +if(config) + set(_C_config -C ${config}) +endif() + execute_process(COMMAND "${CMAKE_CPACK_COMMAND}" + ${_C_config} RESULT_VARIABLE CPack_result OUTPUT_VARIABLE CPack_output ERROR_VARIABLE CPack_error diff --git a/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in b/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in index abf010b..670a874 100644 --- a/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in +++ b/Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 2.8.10) set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/VSProjectInSubdir") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestBuildCommandProjectInSubdir/Nested") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") set(CTEST_PROJECT_NAME "VSProjectInSubdir") set(CTEST_BUILD_CONFIGURATION "@CTestTest_CONFIG@") diff --git a/Tests/CTestConfig/dashboard.cmake.in b/Tests/CTestConfig/dashboard.cmake.in index 0bba6d6..608501c 100644 --- a/Tests/CTestConfig/dashboard.cmake.in +++ b/Tests/CTestConfig/dashboard.cmake.in @@ -18,8 +18,8 @@ endif() message("cmake initial configure") execute_process(COMMAND ${CMAKE_COMMAND} ${arg} - -G "@CMAKE_TEST_GENERATOR@" - -T "@CMAKE_TEST_GENERATOR_TOOLSET@" + -G "@CMAKE_GENERATOR@" + -T "@CMAKE_GENERATOR_TOOLSET@" ${CTEST_SOURCE_DIRECTORY} WORKING_DIRECTORY ${CTEST_BINARY_DIRECTORY} RESULT_VARIABLE rv) diff --git a/Tests/CTestConfig/script.cmake.in b/Tests/CTestConfig/script.cmake.in index 83267a4..166de3b 100644 --- a/Tests/CTestConfig/script.cmake.in +++ b/Tests/CTestConfig/script.cmake.in @@ -1,5 +1,5 @@ -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_PROJECT_NAME "CTestConfig") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestConfig") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestConfig/@cfg@-script") diff --git a/Tests/CTestTestBadExe/CTestConfig.cmake b/Tests/CTestTestBadExe/CTestConfig.cmake index 1d46ea3..c7286e2 100644 --- a/Tests/CTestTestBadExe/CTestConfig.cmake +++ b/Tests/CTestTestBadExe/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestBadExe") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestBadExe/test.cmake.in b/Tests/CTestTestBadExe/test.cmake.in index a7420fc..601aab4 100644 --- a/Tests/CTestTestBadExe/test.cmake.in +++ b/Tests/CTestTestBadExe/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-BadExe") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestBadExe") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestBadExe") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestBadGenerator/CTestConfig.cmake b/Tests/CTestTestBadGenerator/CTestConfig.cmake index ef98189..1e61bf4 100644 --- a/Tests/CTestTestBadGenerator/CTestConfig.cmake +++ b/Tests/CTestTestBadGenerator/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestBadGenerator") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestChecksum/test.cmake.in b/Tests/CTestTestChecksum/test.cmake.in index b18cdf3..8413443 100644 --- a/Tests/CTestTestChecksum/test.cmake.in +++ b/Tests/CTestTestChecksum/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Checksum") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestParallel") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParallel") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake b/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake index d2c28f9..4458348 100644 --- a/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake +++ b/Tests/CTestTestConfigFileInBuildDir/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestConfigFileInBuildDir") set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in b/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in index 42225d3..d3510bb 100644 --- a/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in +++ b/Tests/CTestTestConfigFileInBuildDir/test1.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-ConfigFileInBuild set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestConfigFileInBuildDir") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestConfigFileInBuildDir1") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in b/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in index 010fe1c..99b002c 100644 --- a/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in +++ b/Tests/CTestTestConfigFileInBuildDir/test2.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-ConfigFileInBuild set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestConfigFileInBuildDir") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestConfigFileInBuildDir2") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestCostSerial/CTestConfig.cmake b/Tests/CTestTestCostSerial/CTestConfig.cmake index 05c20eb..3ab99ac 100644 --- a/Tests/CTestTestCostSerial/CTestConfig.cmake +++ b/Tests/CTestTestCostSerial/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestCostSerial") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCostSerial/test.cmake.in b/Tests/CTestTestCostSerial/test.cmake.in index e2dda95..ce8720c 100644 --- a/Tests/CTestTestCostSerial/test.cmake.in +++ b/Tests/CTestTestCostSerial/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-CostSerial") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestCostSerial") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCostSerial") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestCrash/CTestConfig.cmake b/Tests/CTestTestCrash/CTestConfig.cmake index e1c5b1b..5c2ca0e 100644 --- a/Tests/CTestTestCrash/CTestConfig.cmake +++ b/Tests/CTestTestCrash/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestCrash") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCrash/test.cmake.in b/Tests/CTestTestCrash/test.cmake.in index 7ac1bb9..5906d12 100644 --- a/Tests/CTestTestCrash/test.cmake.in +++ b/Tests/CTestTestCrash/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Crash") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestCrash") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCrash") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestCycle/CTestConfig.cmake b/Tests/CTestTestCycle/CTestConfig.cmake index 43e9986..8aeb09b 100644 --- a/Tests/CTestTestCycle/CTestConfig.cmake +++ b/Tests/CTestTestCycle/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestCycle") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestCycle/test.cmake.in b/Tests/CTestTestCycle/test.cmake.in index 94b9cac..478badb 100644 --- a/Tests/CTestTestCycle/test.cmake.in +++ b/Tests/CTestTestCycle/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Cycle") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestCycle") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestCycle") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestDepends/CTestConfig.cmake b/Tests/CTestTestDepends/CTestConfig.cmake index e3af7dd..7af9200 100644 --- a/Tests/CTestTestDepends/CTestConfig.cmake +++ b/Tests/CTestTestDepends/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestDepends") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestDepends/test.cmake.in b/Tests/CTestTestDepends/test.cmake.in index 98b2a27..a7de8cc 100644 --- a/Tests/CTestTestDepends/test.cmake.in +++ b/Tests/CTestTestDepends/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Depends") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestDepends") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestDepends") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestFailure/CTestConfig.cmake b/Tests/CTestTestFailure/CTestConfig.cmake index fd8d97a..07e1be0 100644 --- a/Tests/CTestTestFailure/CTestConfig.cmake +++ b/Tests/CTestTestFailure/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestFailure") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestFailure/testNoBuild.cmake.in b/Tests/CTestTestFailure/testNoBuild.cmake.in index 1dee1ae..143daf8 100644 --- a/Tests/CTestTestFailure/testNoBuild.cmake.in +++ b/Tests/CTestTestFailure/testNoBuild.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-NoBuild") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestFailure") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFailure") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestFailure/testNoExe.cmake.in b/Tests/CTestTestFailure/testNoExe.cmake.in index 04e444d..11a1930 100644 --- a/Tests/CTestTestFailure/testNoExe.cmake.in +++ b/Tests/CTestTestFailure/testNoExe.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-NoExe") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestFailure") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFailure") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestFdSetSize/test.cmake.in b/Tests/CTestTestFdSetSize/test.cmake.in index c24f505..fbe0e82 100644 --- a/Tests/CTestTestFdSetSize/test.cmake.in +++ b/Tests/CTestTestFdSetSize/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-FdSetSize") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestFdSetSize") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestFdSetSize") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestLabelRegExp/CTestTestfile.cmake.in b/Tests/CTestTestLabelRegExp/CTestTestfile.cmake.in new file mode 100644 index 0000000..657f382 --- /dev/null +++ b/Tests/CTestTestLabelRegExp/CTestTestfile.cmake.in @@ -0,0 +1,8 @@ +add_test(test1 ${CMAKE_COMMAND} -E echo test1) +set_tests_properties(test1 PROPERTIES LABELS "foo") + +add_test(test2 ${CMAKE_COMMAND} -E echo test2) +set_tests_properties(test2 PROPERTIES LABELS "bar") + +add_test(test3 ${CMAKE_COMMAND} -E echo test3) +set_tests_properties(test3 PROPERTIES LABELS "foo;bar") diff --git a/Tests/CTestTestLabelRegExp/test.cmake.in b/Tests/CTestTestLabelRegExp/test.cmake.in new file mode 100644 index 0000000..5c0c9d7 --- /dev/null +++ b/Tests/CTestTestLabelRegExp/test.cmake.in @@ -0,0 +1,37 @@ +configure_file(${SOURCE_DIR}/CTestTestfile.cmake.in CTestTestfile.cmake) + +function(get_test_list TEST_LIST) + set(QUERY_COMMAND ${CMAKE_CTEST_COMMAND} -N ${ARGN}) + + execute_process(COMMAND ${QUERY_COMMAND} + RESULT_VARIABLE RESULT + OUTPUT_VARIABLE OUTPUT + ERROR_VARIABLE ERROR) + + if(NOT ${RESULT} STREQUAL "0") + message(FATAL_ERROR "command [${QUERY_COMMAND}] failed: RESULT[${RESULT}] OUTPUT[${OUTPUT}] ERROR[${ERROR}]") + endif() + + set(${TEST_LIST} "${OUTPUT}" PARENT_SCOPE) +endfunction() + +function(expect_test_list EXPECTED_OUTPUT) + get_test_list(TEST_LIST ${ARGN}) + + if(NOT "${TEST_LIST}" MATCHES "${EXPECTED_OUTPUT}") + message(FATAL_ERROR "actual output [${TEST_LIST}] does not match expected output [${EXPECTED_OUTPUT}] for given arguments [${ARGN}]") + endif() +endfunction() + +expect_test_list("test1.*test3.*Total Tests: 2" --label-regex foo) +expect_test_list("test2.*test3.*Total Tests: 2" --label-regex bar) +expect_test_list("test1.*test2.*test3.*Total Tests: 3" --label-regex foo|bar) +expect_test_list("Total Tests: 0" --label-regex baz) + +expect_test_list("test2.*Total Tests: 1" --label-exclude foo) +expect_test_list("test1.*Total Tests: 1" --label-exclude bar) +expect_test_list("Total Tests: 0" --label-exclude foo|bar) +expect_test_list("test1.*test2.*test3.*Total Tests: 3" --label-exclude baz) + +expect_test_list("test1.*Total Tests: 1" --label-regex foo --label-exclude bar) +expect_test_list("test2.*Total Tests: 1" --label-regex bar --label-exclude foo) diff --git a/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake b/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake index bf404ab..669b0fb 100644 --- a/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake +++ b/Tests/CTestTestLaunchers/launcher_test_project/CTestConfig.cmake @@ -3,6 +3,6 @@ set(CTEST_PROJECT_NAME "CTestTestLaunchers") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestMemcheck/CMakeLists.txt b/Tests/CTestTestMemcheck/CMakeLists.txt index 9bd7249..8984463 100644 --- a/Tests/CTestTestMemcheck/CMakeLists.txt +++ b/Tests/CTestTestMemcheck/CMakeLists.txt @@ -19,14 +19,6 @@ add_executable(pseudo_valgrind "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx") set_target_properties(pseudo_valgrind PROPERTIES OUTPUT_NAME valgrind) target_link_libraries(pseudo_valgrind CMakeLib) -# Xcode 2.x forgets to create the output directory before linking -# the individual architectures. -if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") - add_custom_command(TARGET pseudo_valgrind - PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}" - ) -endif() - add_executable(pseudo_purify "${CMAKE_CURRENT_BINARY_DIR}/ret0.cxx") set_target_properties(pseudo_purify PROPERTIES OUTPUT_NAME purify) target_link_libraries(pseudo_purify CMakeLib) @@ -196,3 +188,18 @@ set_tests_properties(CTestTestMemcheckDummyValgrindCustomOptions PROPERTIES set_tests_properties(CTestTestMemcheckDummyValgrindTwoTargets PROPERTIES PASS_REGULAR_EXPRESSION "\nMemory check project ${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets\n.*\n *Start 1: RunCMake\n(.*\n)?Memory check command: .* \"--log-file=${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets/Testing/Temporary/MemoryChecker.1.log\" \"-q\".*\n *Start 2: RunCMakeAgain\n(.*\n)?Memory check command: .* \"--log-file=${CTEST_ESCAPED_CMAKE_CURRENT_BINARY_DIR}/DummyValgrindTwoTargets/Testing/Temporary/MemoryChecker.2.log\" \"-q\".*\n") + +# Xcode 2.x forgets to create the output directory before linking +# the individual architectures. +if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") + foreach(t + memcheck_fail + pseudo_BC + pseudo_purify + pseudo_valgrind + ) + add_custom_command(TARGET ${t} + PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}" + ) + endforeach() +endif() diff --git a/Tests/CTestTestMemcheck/CTestConfig.cmake.in b/Tests/CTestTestMemcheck/CTestConfig.cmake.in index 6cf3782..19c76c2 100644 --- a/Tests/CTestTestMemcheck/CTestConfig.cmake.in +++ b/Tests/CTestTestMemcheck/CTestConfig.cmake.in @@ -2,8 +2,8 @@ set (CTEST_PROJECT_NAME "CTestTestMemcheck@SUBTEST_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 "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +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/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt b/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt index c5aa2cd..3a45bfe 100644 --- a/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt +++ b/Tests/CTestTestMemcheck/NoLogDummyChecker/CMakeLists.txt @@ -1,17 +1,22 @@ # A dummy checker implementation that does not write the requested output file # so it triggers an error for every checker. -file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ret0.c" "int main(){return 0;}\n") +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/ret0.c.in" "int main(){return 0;}\n") + +configure_file( + "${CMAKE_CURRENT_BINARY_DIR}/ret0.c.in" + "${CMAKE_CURRENT_BINARY_DIR}/ret0.c" + ) foreach(_pseudo IN ITEMS valgrind purify BC) add_executable(pseudonl_${_pseudo} "${CMAKE_CURRENT_BINARY_DIR}/ret0.c") set_target_properties(pseudonl_${_pseudo} PROPERTIES OUTPUT_NAME ${_pseudo}) -endforeach() -# Xcode 2.x forgets to create the output directory before linking -# the individual architectures. -if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") - add_custom_command(TARGET pseudonl_valgrind + # Xcode 2.x forgets to create the output directory before linking + # the individual architectures. + if(CMAKE_OSX_ARCHITECTURES AND XCODE AND NOT "${XCODE_VERSION}" MATCHES "^[^12]") + add_custom_command(TARGET pseudonl_${_pseudo} PRE_BUILD COMMAND ${CMAKE_COMMAND} -E make_directory "${CMAKE_CFG_INTDIR}" ) -endif() + endif() +endforeach() diff --git a/Tests/CTestTestMemcheck/test.cmake.in b/Tests/CTestTestMemcheck/test.cmake.in index 6c388c5..471e5a5 100644 --- a/Tests/CTestTestMemcheck/test.cmake.in +++ b/Tests/CTestTestMemcheck/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Memcheck@SUBTEST_ set(CTEST_SOURCE_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@") set(CTEST_BINARY_DIRECTORY "@CMAKE_CURRENT_BINARY_DIR@/@SUBTEST_NAME@") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestParallel/CTestConfig.cmake b/Tests/CTestTestParallel/CTestConfig.cmake index c3c5038..fc5b666 100644 --- a/Tests/CTestTestParallel/CTestConfig.cmake +++ b/Tests/CTestTestParallel/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestParallel") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestParallel/test.cmake.in b/Tests/CTestTestParallel/test.cmake.in index 5826342..48631ca 100644 --- a/Tests/CTestTestParallel/test.cmake.in +++ b/Tests/CTestTestParallel/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Parallel") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestParallel") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestParallel") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestResourceLock/CTestConfig.cmake b/Tests/CTestTestResourceLock/CTestConfig.cmake index 5fb560b..c118777 100644 --- a/Tests/CTestTestResourceLock/CTestConfig.cmake +++ b/Tests/CTestTestResourceLock/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestResourceLock") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestResourceLock/test.cmake.in b/Tests/CTestTestResourceLock/test.cmake.in index f69b519..6ec6dfe 100644 --- a/Tests/CTestTestResourceLock/test.cmake.in +++ b/Tests/CTestTestResourceLock/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-ResourceLock") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestResourceLock") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestResourceLock") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestScheduler/CTestConfig.cmake b/Tests/CTestTestScheduler/CTestConfig.cmake index 7da8f6f..797387b 100644 --- a/Tests/CTestTestScheduler/CTestConfig.cmake +++ b/Tests/CTestTestScheduler/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestScheduler") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestScheduler/test.cmake.in b/Tests/CTestTestScheduler/test.cmake.in index 26d8058..06ba33e 100644 --- a/Tests/CTestTestScheduler/test.cmake.in +++ b/Tests/CTestTestScheduler/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Scheduler") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestScheduler") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestScheduler") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake index ad8e00e..da0c76b 100644 --- a/Tests/CTestTestSkipReturnCode/CTestConfig.cmake +++ b/Tests/CTestTestSkipReturnCode/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestSkipReturnCode") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestSkipReturnCode/test.cmake.in b/Tests/CTestTestSkipReturnCode/test.cmake.in index ebee01b..d3c44f5 100644 --- a/Tests/CTestTestSkipReturnCode/test.cmake.in +++ b/Tests/CTestTestSkipReturnCode/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-SkipReturnCode") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestSkipReturnCode") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSkipReturnCode") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestStopTime/CTestConfig.cmake b/Tests/CTestTestStopTime/CTestConfig.cmake index 129db4d..412283e 100644 --- a/Tests/CTestTestStopTime/CTestConfig.cmake +++ b/Tests/CTestTestStopTime/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestStopTime") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestStopTime/test.cmake.in b/Tests/CTestTestStopTime/test.cmake.in index d4e5a25..8adf941 100644 --- a/Tests/CTestTestStopTime/test.cmake.in +++ b/Tests/CTestTestStopTime/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-StopTime") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestStopTime") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestStopTime") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestSubdir/CTestConfig.cmake b/Tests/CTestTestSubdir/CTestConfig.cmake index 4b848aa..47ebb92 100644 --- a/Tests/CTestTestSubdir/CTestConfig.cmake +++ b/Tests/CTestTestSubdir/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestSubdir") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestSubdir/test.cmake.in b/Tests/CTestTestSubdir/test.cmake.in index 2b4ef4f..5a6caf1 100644 --- a/Tests/CTestTestSubdir/test.cmake.in +++ b/Tests/CTestTestSubdir/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Subdir") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestSubdir") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestSubdir") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestTestTimeout/CMakeLists.txt b/Tests/CTestTestTimeout/CMakeLists.txt index 476d0a5..c6cbc47 100644 --- a/Tests/CTestTestTimeout/CMakeLists.txt +++ b/Tests/CTestTestTimeout/CMakeLists.txt @@ -3,26 +3,19 @@ project(CTestTestTimeout) include(CTest) if(NOT TIMEOUT) - if(CYGWIN) - set(TIMEOUT 4) # Cygwin CMake sometimes takes > 1 second to load! - else() - set(TIMEOUT 1) - endif() + # Give the process time to load and start running. + set(TIMEOUT 4) endif() add_definitions(-DTIMEOUT=${TIMEOUT}) -add_executable (Timeout timeout.c) +add_executable (Sleep sleep.c) add_test(NAME TestTimeout - COMMAND ${CMAKE_COMMAND} -D Timeout=$<TARGET_FILE:Timeout> + COMMAND ${CMAKE_COMMAND} -D Sleep=$<TARGET_FILE:Sleep> -D Log=${CMAKE_CURRENT_BINARY_DIR}/timeout.log -P ${CMAKE_CURRENT_SOURCE_DIR}/timeout.cmake ) set_tests_properties(TestTimeout PROPERTIES TIMEOUT ${TIMEOUT}) -add_test(NAME CheckChild - COMMAND ${CMAKE_COMMAND} -D Timeout=$<TARGET_FILE:Timeout> - -D Log=${CMAKE_CURRENT_BINARY_DIR}/timeout.log - -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake - ) -set_tests_properties(CheckChild PROPERTIES DEPENDS TestTimeout) +add_test(NAME TestSleep COMMAND Sleep) +set_tests_properties(TestSleep PROPERTIES DEPENDS TestTimeout) diff --git a/Tests/CTestTestTimeout/CTestConfig.cmake b/Tests/CTestTestTimeout/CTestConfig.cmake index 76d62ad..13114f1 100644 --- a/Tests/CTestTestTimeout/CTestConfig.cmake +++ b/Tests/CTestTestTimeout/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestTimeout") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestTimeout/check.cmake b/Tests/CTestTestTimeout/check.cmake deleted file mode 100644 index b16f2aa..0000000 --- a/Tests/CTestTestTimeout/check.cmake +++ /dev/null @@ -1,9 +0,0 @@ -# Block just as long as timeout.cmake would if it were not killed. -execute_process(COMMAND ${Timeout}) - -# Verify that the log is empty, which indicates that the grandchild -# was killed before it finished sleeping. -file(READ "${Log}" LOG) -if(NOT "${LOG}" STREQUAL "") - message(FATAL_ERROR "${LOG}") -endif() diff --git a/Tests/CTestTestTimeout/sleep.c b/Tests/CTestTestTimeout/sleep.c new file mode 100644 index 0000000..33ce307 --- /dev/null +++ b/Tests/CTestTestTimeout/sleep.c @@ -0,0 +1,21 @@ +#if defined(_WIN32) +# include <windows.h> +#else +# include <unistd.h> +#endif + +#include <stdio.h> + +int main(void) +{ + fprintf(stderr, "before sleep\n"); + fflush(stderr); /* should not be needed, but just in case */ +#if defined(_WIN32) + Sleep((TIMEOUT+4)*1000); +#else + sleep((TIMEOUT+4)); +#endif + fprintf(stderr, "after sleep\n"); + fflush(stderr); /* should not be needed, but just in case */ + return 0; +} diff --git a/Tests/CTestTestTimeout/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in index d3d0888..68c74d8 100644 --- a/Tests/CTestTestTimeout/test.cmake.in +++ b/Tests/CTestTestTimeout/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Timeout") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestTimeout") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestTimeout") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") @@ -24,3 +24,16 @@ CTEST_START(Experimental) CTEST_CONFIGURE(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) CTEST_BUILD(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) CTEST_TEST(BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE res) + +set(log ${CTEST_BINARY_DIRECTORY}/timeout.log) +if(EXISTS "${log}") + # Verify that the timeout test did not finish sleeping. + file(STRINGS "${log}" after_sleep REGEX "after sleep") + if(after_sleep) + message(FATAL_ERROR "Log indicates timeout did not kill child.") + else() + message("Log indicates timeout correctly killed child.") + endif() +else() + message(FATAL_ERROR "Log does not exist:\n ${log}") +endif() diff --git a/Tests/CTestTestTimeout/timeout.c b/Tests/CTestTestTimeout/timeout.c deleted file mode 100644 index 370ab22..0000000 --- a/Tests/CTestTestTimeout/timeout.c +++ /dev/null @@ -1,18 +0,0 @@ -#if defined(_WIN32) -# include <windows.h> -#else -# include <unistd.h> -#endif - -#include <stdio.h> - -int main(void) -{ -#if defined(_WIN32) - Sleep((TIMEOUT+4)*1000); -#else - sleep((TIMEOUT+4)); -#endif - printf("timeout process finished sleeping!\n"); - return -1; -} diff --git a/Tests/CTestTestTimeout/timeout.cmake b/Tests/CTestTestTimeout/timeout.cmake index 198cc97..0989b65 100644 --- a/Tests/CTestTestTimeout/timeout.cmake +++ b/Tests/CTestTestTimeout/timeout.cmake @@ -3,4 +3,4 @@ file(REMOVE ${Log}) # Run a child that sleeps longer than the timout of this test. # Log its output so check.cmake can verify it dies. -execute_process(COMMAND ${Timeout} OUTPUT_FILE ${Log}) +execute_process(COMMAND ${Sleep} ERROR_FILE ${Log}) diff --git a/Tests/CTestTestUpload/CTestConfig.cmake b/Tests/CTestTestUpload/CTestConfig.cmake index 89c5b94..a547088 100644 --- a/Tests/CTestTestUpload/CTestConfig.cmake +++ b/Tests/CTestTestUpload/CTestConfig.cmake @@ -2,6 +2,6 @@ set (CTEST_PROJECT_NAME "CTestTestUpload") set (CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set (CTEST_DART_SERVER_VERSION "2") set (CTEST_DROP_METHOD "http") -set (CTEST_DROP_SITE "www.cdash.org") -set (CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set (CTEST_DROP_SITE "open.cdash.org") +set (CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set (CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestUpload/test.cmake.in b/Tests/CTestTestUpload/test.cmake.in index 340877f..bb6ba25 100644 --- a/Tests/CTestTestUpload/test.cmake.in +++ b/Tests/CTestTestUpload/test.cmake.in @@ -7,8 +7,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-Upload") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestUpload") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestUpload") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") CTEST_START(Experimental) diff --git a/Tests/CTestTestZeroTimeout/CTestConfig.cmake b/Tests/CTestTestZeroTimeout/CTestConfig.cmake index f8e0609..6094864 100644 --- a/Tests/CTestTestZeroTimeout/CTestConfig.cmake +++ b/Tests/CTestTestZeroTimeout/CTestConfig.cmake @@ -2,6 +2,6 @@ set(CTEST_PROJECT_NAME "CTestTestZeroTimeout") set(CTEST_NIGHTLY_START_TIME "21:00:00 EDT") set(CTEST_DART_SERVER_VERSION "2") set(CTEST_DROP_METHOD "http") -set(CTEST_DROP_SITE "www.cdash.org") -set(CTEST_DROP_LOCATION "/CDash/submit.php?project=PublicDashboard") +set(CTEST_DROP_SITE "open.cdash.org") +set(CTEST_DROP_LOCATION "/submit.php?project=PublicDashboard") set(CTEST_DROP_SITE_CDASH TRUE) diff --git a/Tests/CTestTestZeroTimeout/test.cmake.in b/Tests/CTestTestZeroTimeout/test.cmake.in index 3252754..beb6d90 100644 --- a/Tests/CTestTestZeroTimeout/test.cmake.in +++ b/Tests/CTestTestZeroTimeout/test.cmake.in @@ -8,8 +8,8 @@ set(CTEST_BUILD_NAME "CTestTest-@BUILDNAME@-ZeroTimeout") set(CTEST_SOURCE_DIRECTORY "@CMake_SOURCE_DIR@/Tests/CTestTestZeroTimeout") set(CTEST_BINARY_DIRECTORY "@CMake_BINARY_DIR@/Tests/CTestTestZeroTimeout") set(CTEST_CVS_COMMAND "@CVSCOMMAND@") -set(CTEST_CMAKE_GENERATOR "@CMAKE_TEST_GENERATOR@") -set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_TEST_GENERATOR_TOOLSET@") +set(CTEST_CMAKE_GENERATOR "@CMAKE_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@CMAKE_GENERATOR_TOOLSET@") set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") set(CTEST_COVERAGE_COMMAND "@COVERAGE_COMMAND@") set(CTEST_NOTES_FILES "${CTEST_SCRIPT_DIRECTORY}/${CTEST_SCRIPT_NAME}") diff --git a/Tests/CTestUpdateCommon.cmake b/Tests/CTestUpdateCommon.cmake index 642a618..857c6f5 100644 --- a/Tests/CTestUpdateCommon.cmake +++ b/Tests/CTestUpdateCommon.cmake @@ -9,7 +9,7 @@ function(run_child) ERROR_STRIP_TRAILING_WHITESPACE ) if(FAILED) - string(REGEX REPLACE "\n" "\n " OUTPUT "${OUTPUT}") + string(REPLACE "\n" "\n " OUTPUT "${OUTPUT}") message(FATAL_ERROR "Child failed (${FAILED}), output is\n ${OUTPUT}\n" "Command = [${ARGN}]\n") endif() @@ -108,7 +108,7 @@ function(check_updates build) ${TOP}/${build}/Testing/Temporary/LastUpdate*.log) if(UPDATE_LOG_FILE) file(READ ${UPDATE_LOG_FILE} UPDATE_LOG LIMIT ${max_update_xml_size}) - string(REGEX REPLACE "\n" "\n " UPDATE_LOG "${UPDATE_LOG}") + string(REPLACE "\n" "\n " UPDATE_LOG "${UPDATE_LOG}") set(MSG "${MSG}Update log:\n ${UPDATE_LOG}") else() set(MSG "${MSG}No update log found!") diff --git a/Tests/CoberturaCoverage/DartConfiguration.tcl.in b/Tests/CoberturaCoverage/DartConfiguration.tcl.in new file mode 100644 index 0000000..954f59a --- /dev/null +++ b/Tests/CoberturaCoverage/DartConfiguration.tcl.in @@ -0,0 +1,8 @@ +# This file is configured by CMake automatically as DartConfiguration.tcl +# If you choose not to use CMake, this file may be hand configured, by +# filling in the required variables. + + +# Configuration directories and files +SourceDirectory: ${CMake_SOURCE_DIR}/Testing/CoberturaCoverage +BuildDirectory: ${CMake_BINARY_DIR}/Testing/CoberturaCoverage diff --git a/Tests/CoberturaCoverage/coverage.xml.in b/Tests/CoberturaCoverage/coverage.xml.in new file mode 100644 index 0000000..b3f6691 --- /dev/null +++ b/Tests/CoberturaCoverage/coverage.xml.in @@ -0,0 +1,112 @@ +<?xml version="1.0"?> +<!DOCTYPE coverage SYSTEM "http://cobertura.sourceforge.net/xml/coverage-04.dtd"> + +<coverage line-rate="0.7222222222222222" branch-rate="0.875" lines-covered="13" lines-valid="18" branches-covered="7" branches-valid="8" complexity="0.0" version="1.9.4.1" timestamp="1401890139281"> + <sources> + <source>${CMake_BINARY_DIR}/Testing/CoberturaCoverage/src/main/java/</source> + </sources> + <packages> + <package name="org.cmake.Coverage" line-rate="0.7222222222222222" branch-rate="0.875" complexity="0.0"> + <classes> + <class name="org.cmake.Coverage.CoverageTest" filename="org/cmake/CoverageTest.java" line-rate="0.7222222222222222" branch-rate="0.875" complexity="0.0"> + <methods> + <method name="<clinit>" signature="()V" line-rate="1.0" branch-rate="1.0"> + <lines> + <line number="10" hits="2" branch="false"/> + <line number="11" hits="2" branch="false"/> + </lines> + </method> + <method name="<init>" signature="()V" line-rate="0.0" branch-rate="1.0"> + <lines> + <line number="8" hits="0" branch="false"/> + <line number="12" hits="0" branch="false"/> + </lines> + </method> + <method name="equalsVarOne" signature="(Ljava/lang/String;)Ljava/lang/Boolean;" line-rate="0.6666666666666666" branch-rate="0.5"> + <lines> + <line number="16" hits="2" branch="true" condition-coverage="50% (1/2)"> + <conditions> + <condition number="0" type="jump" coverage="50%"/> + </conditions> + </line> + <line number="17" hits="2" branch="false"/> + <line number="20" hits="0" branch="false"/> + </lines> + </method> + <method name="equalsVarTwo" signature="(Ljava/lang/String;)Z" line-rate="1.0" branch-rate="1.0"> + <lines> + <line number="26" hits="4" branch="true" condition-coverage="100% (2/2)"> + <conditions> + <condition number="0" type="jump" coverage="100%"/> + </conditions> + </line> + <line number="27" hits="2" branch="false"/> + <line number="30" hits="2" branch="false"/> + </lines> + </method> + <method name="timesIntOne" signature="(Ljava/lang/Integer;)Ljava/lang/Integer;" line-rate="0.0" branch-rate="1.0"> + <lines> + <line number="35" hits="0" branch="false"/> + <line number="36" hits="0" branch="false"/> + </lines> + </method> + <method name="whileLoop" signature="(Ljava/lang/Integer;)Z" line-rate="1.0" branch-rate="1.0"> + <lines> + <line number="41" hits="2" branch="false"/> + <line number="42" hits="10" branch="true" condition-coverage="100% (2/2)"> + <conditions> + <condition number="0" type="jump" coverage="100%"/> + </conditions> + </line> + <line number="43" hits="8" branch="false"/> + <line number="45" hits="2" branch="true" condition-coverage="100% (2/2)"> + <conditions> + <condition number="0" type="jump" coverage="100%"/> + </conditions> + </line> + <line number="46" hits="1" branch="false"/> + <line number="49" hits="1" branch="false"/> + </lines> + </method> + </methods> + <lines> + <line number="8" hits="0" branch="false"/> + <line number="10" hits="2" branch="false"/> + <line number="11" hits="2" branch="false"/> + <line number="12" hits="0" branch="false"/> + <line number="16" hits="2" branch="true" condition-coverage="50% (1/2)"> + <conditions> + <condition number="0" type="jump" coverage="50%"/> + </conditions> + </line> + <line number="17" hits="2" branch="false"/> + <line number="20" hits="0" branch="false"/> + <line number="26" hits="4" branch="true" condition-coverage="100% (2/2)"> + <conditions> + <condition number="0" type="jump" coverage="100%"/> + </conditions> + </line> + <line number="27" hits="2" branch="false"/> + <line number="30" hits="2" branch="false"/> + <line number="35" hits="0" branch="false"/> + <line number="36" hits="0" branch="false"/> + <line number="41" hits="2" branch="false"/> + <line number="42" hits="10" branch="true" condition-coverage="100% (2/2)"> + <conditions> + <condition number="0" type="jump" coverage="100%"/> + </conditions> + </line> + <line number="43" hits="8" branch="false"/> + <line number="45" hits="2" branch="true" condition-coverage="100% (2/2)"> + <conditions> + <condition number="0" type="jump" coverage="100%"/> + </conditions> + </line> + <line number="46" hits="1" branch="false"/> + <line number="49" hits="1" branch="false"/> + </lines> + </class> + </classes> + </package> + </packages> +</coverage> diff --git a/Tests/CoberturaCoverage/src/main/java/org/cmake/CoverageTest.java b/Tests/CoberturaCoverage/src/main/java/org/cmake/CoverageTest.java new file mode 100644 index 0000000..4fb43c6 --- /dev/null +++ b/Tests/CoberturaCoverage/src/main/java/org/cmake/CoverageTest.java @@ -0,0 +1,52 @@ +package org.cmake.Coverage; + +import java.io.Serializable; +import java.util.Map; +import java.util.List; +import java.awt.*; + +public class CoverageTest { + + public static String VarOne = "test1"; + public static String VarTwo = "test2"; + private Integer IntOne = 4; + + public static Boolean equalsVarOne(String inString) { + + if(VarOne.equals(inString)){ + return true; + } + else { + return false; + } + } + + public static boolean equalsVarTwo(String inString){ + + if(VarTwo.equals(inString)){ + return true; + } + else { + return false; + } + } + + private Integer timesIntOne(Integer inVal){ + + return inVal * IntOne; + } + + public static boolean whileLoop(Integer StopInt){ + + Integer i = 0; + while(i < StopInt){ + i=i+1; + } + if (i.equals(5)){ + return true; + } + else { + return false; + } + } +} diff --git a/Tests/CompileFeatures/CMakeLists.txt b/Tests/CompileFeatures/CMakeLists.txt new file mode 100644 index 0000000..d02ddaf --- /dev/null +++ b/Tests/CompileFeatures/CMakeLists.txt @@ -0,0 +1,112 @@ + +cmake_minimum_required(VERSION 3.0) + +project(CompileFeatures) + +if (NOT CMAKE_C_COMPILE_FEATURES AND NOT CMAKE_CXX_COMPILE_FEATURES) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp" + "int main(int,char**) { return 0; }\n" + ) + add_executable(CompileFeatures "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp") + return() +endif() + +macro(run_test feature lang) + if (";${CMAKE_${lang}_COMPILE_FEATURES};" MATCHES ${feature}) + add_library(test_${feature} OBJECT ${feature}) + set_property(TARGET test_${feature} + PROPERTY COMPILE_FEATURES "${feature}" + ) + else() + list(APPEND ${lang}_non_features ${feature}) + endif() +endmacro() + +get_property(c_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) +foreach(feature ${c_features}) + run_test(${feature} C) +endforeach() +get_property(cxx_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) +foreach(feature ${cxx_features}) + run_test(${feature} CXX) +endforeach() + +if (CMAKE_CXX_COMPILER_ID STREQUAL GNU + AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8) + list(REMOVE_ITEM CXX_non_features + cxx_alignof + ) +endif() +if (CMAKE_CXX_COMPILER_ID STREQUAL GNU + AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.9) + # GNU prior to 4.9 does not set any preprocessor define to distinguish + # c++1y from c++11, so CMake does not support c++1y features before GNU 4.9. + list(REMOVE_ITEM CXX_non_features + # GNU 4.8 knows cxx_attributes, but doesn't know [[deprecated]] + # and warns that it is unknown and ignored. + cxx_attribute_deprecated + cxx_binary_literals + cxx_lambda_init_captures + cxx_return_type_deduction + ) +endif() + +set(C_ext c) +set(C_standard_flag 11) +set(CXX_ext cpp) +set(CXX_standard_flag 14) +foreach(lang CXX C) + if (CMAKE_${lang}_COMPILE_FEATURES) + foreach(feature ${${lang}_non_features}) + message("Testing feature : ${feature}") + try_compile(${feature}_works + "${CMAKE_CURRENT_BINARY_DIR}/${feature}_test" + "${CMAKE_CURRENT_SOURCE_DIR}/feature_test.${${lang}_ext}" + COMPILE_DEFINITIONS "-DTEST=${CMAKE_CURRENT_SOURCE_DIR}/${feature}.${${lang}_ext}" + CMAKE_FLAGS "-DCMAKE_${lang}_STANDARD=${${lang}_standard_flag}" + OUTPUT_VARIABLE OUTPUT + ) + if (${feature}_works) + message(SEND_ERROR + "Feature ${feature} expected not to work for ${lang} ${CMAKE_${lang}_COMPILER_ID}-${CMAKE_${lang}_COMPILER_VERSION}. + Update the supported features or blacklist it.\n${OUTPUT}") + else() + message("Testing feature : ${feature} -- Fails, as expected.") + endif() + endforeach() + endif() +endforeach() + +add_executable(CompileFeatures main.cpp) +set_property(TARGET CompileFeatures + PROPERTY COMPILE_FEATURES "cxx_auto_type" +) +set_property(TARGET CompileFeatures + PROPERTY CXX_STANDARD_REQUIRED TRUE +) + +add_executable(GenexCompileFeatures main.cpp) +set_property(TARGET GenexCompileFeatures + PROPERTY COMPILE_FEATURES "$<1:cxx_auto_type>;$<0:not_a_feature>" +) + +add_library(iface INTERFACE) +set_property(TARGET iface + PROPERTY INTERFACE_COMPILE_FEATURES "cxx_auto_type" +) +add_executable(IfaceCompileFeatures main.cpp) +target_link_libraries(IfaceCompileFeatures iface) + +add_executable(CompileFeaturesGenex genex_test.cpp) +set_property(TARGET CompileFeaturesGenex PROPERTY CXX_STANDARD 11) +target_compile_definitions(CompileFeaturesGenex PRIVATE HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>) + +add_executable(CompileFeaturesGenex2 genex_test.cpp) +target_compile_features(CompileFeaturesGenex2 PRIVATE cxx_constexpr) +target_compile_definitions(CompileFeaturesGenex2 PRIVATE HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>) + +add_library(noexcept_iface INTERFACE) +target_compile_features(noexcept_iface INTERFACE cxx_noexcept) +add_executable(CompileFeaturesGenex3 genex_test.cpp) +target_link_libraries(CompileFeaturesGenex3 PRIVATE noexcept_iface) +target_compile_definitions(CompileFeaturesGenex3 PRIVATE HAVE_OVERRIDE_CONTROL=$<COMPILE_FEATURES:cxx_final,cxx_override>) diff --git a/Tests/CompileFeatures/c_function_prototypes.c b/Tests/CompileFeatures/c_function_prototypes.c new file mode 100644 index 0000000..ab3c948 --- /dev/null +++ b/Tests/CompileFeatures/c_function_prototypes.c @@ -0,0 +1,9 @@ + +int someFunc(int a, int b); + +int someFunc(int a, int b) +{ + (void)a; + (void)b; + return 0; +} diff --git a/Tests/CompileFeatures/c_restrict.c b/Tests/CompileFeatures/c_restrict.c new file mode 100644 index 0000000..7bc7566 --- /dev/null +++ b/Tests/CompileFeatures/c_restrict.c @@ -0,0 +1,7 @@ + +int f (int * restrict a, int * restrict b) +{ + (void)a; + (void)b; + return 0; +} diff --git a/Tests/CompileFeatures/c_static_assert.c b/Tests/CompileFeatures/c_static_assert.c new file mode 100644 index 0000000..afab504 --- /dev/null +++ b/Tests/CompileFeatures/c_static_assert.c @@ -0,0 +1,2 @@ + +_Static_assert(1, "Static assert test"); diff --git a/Tests/CompileFeatures/c_variadic_macros.c b/Tests/CompileFeatures/c_variadic_macros.c new file mode 100644 index 0000000..4da111e --- /dev/null +++ b/Tests/CompileFeatures/c_variadic_macros.c @@ -0,0 +1,15 @@ + +int someFunc(int i1, char c, int i2) +{ + (void)i1; + (void)c; + (void)i2; + return 0; +} + +#define FUNC_WRAPPER(...) someFunc(__VA_ARGS__) + +void otherFunc() +{ + FUNC_WRAPPER(42, 'a', 7); +} diff --git a/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp b/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp new file mode 100644 index 0000000..63a3713 --- /dev/null +++ b/Tests/CompileFeatures/cxx_aggregate_default_initializers.cpp @@ -0,0 +1,9 @@ + +struct X { int i, j, k = 42; }; + +int someFunc() +{ + X a[] = { 1, 2, 3, 4, 5, 6 }; + X b[2] = { { 1, 2, 3 }, { 4, 5, 6 } }; + return a[0].k == b[0].k && a[1].k == b[1].k ? 0 : 1; +} diff --git a/Tests/CompileFeatures/cxx_alias_templates.cpp b/Tests/CompileFeatures/cxx_alias_templates.cpp new file mode 100644 index 0000000..a47e27d --- /dev/null +++ b/Tests/CompileFeatures/cxx_alias_templates.cpp @@ -0,0 +1,11 @@ + +template <typename T1, typename T2> +struct A +{ + typedef T1 MyT1; + using MyT2 = T2; +}; + +using B = A<int, char>; +template<typename T> +using C = A<int, T>; diff --git a/Tests/CompileFeatures/cxx_alignas.cpp b/Tests/CompileFeatures/cxx_alignas.cpp new file mode 100644 index 0000000..35b7c82 --- /dev/null +++ b/Tests/CompileFeatures/cxx_alignas.cpp @@ -0,0 +1,4 @@ + +struct S1 { + alignas(8) int n; +}; diff --git a/Tests/CompileFeatures/cxx_alignof.cpp b/Tests/CompileFeatures/cxx_alignof.cpp new file mode 100644 index 0000000..63b14fe --- /dev/null +++ b/Tests/CompileFeatures/cxx_alignof.cpp @@ -0,0 +1,5 @@ + +int someFunc() +{ + return alignof(int); +} diff --git a/Tests/CompileFeatures/cxx_attribute_deprecated.cpp b/Tests/CompileFeatures/cxx_attribute_deprecated.cpp new file mode 100644 index 0000000..b6f307d --- /dev/null +++ b/Tests/CompileFeatures/cxx_attribute_deprecated.cpp @@ -0,0 +1,11 @@ + +[[deprecated]] +int foo() +{ + return 0; +} + +int someFunc() +{ + return foo(); +} diff --git a/Tests/CompileFeatures/cxx_attributes.cpp b/Tests/CompileFeatures/cxx_attributes.cpp new file mode 100644 index 0000000..a3c89ea --- /dev/null +++ b/Tests/CompileFeatures/cxx_attributes.cpp @@ -0,0 +1,2 @@ + +void unusedFunc [[noreturn]] () { throw 1; } diff --git a/Tests/CompileFeatures/cxx_auto_type.cpp b/Tests/CompileFeatures/cxx_auto_type.cpp new file mode 100644 index 0000000..7dbf04f --- /dev/null +++ b/Tests/CompileFeatures/cxx_auto_type.cpp @@ -0,0 +1,5 @@ + +void someFunc() +{ + auto x = 3.14; +} diff --git a/Tests/CompileFeatures/cxx_binary_literals.cpp b/Tests/CompileFeatures/cxx_binary_literals.cpp new file mode 100644 index 0000000..14a9e75 --- /dev/null +++ b/Tests/CompileFeatures/cxx_binary_literals.cpp @@ -0,0 +1,6 @@ + +int someFunc() +{ + int i = 0b101; + return i - 5; +} diff --git a/Tests/CompileFeatures/cxx_constexpr.cpp b/Tests/CompileFeatures/cxx_constexpr.cpp new file mode 100644 index 0000000..570c10f --- /dev/null +++ b/Tests/CompileFeatures/cxx_constexpr.cpp @@ -0,0 +1,5 @@ + +constexpr int getNum() +{ + return 42; +} diff --git a/Tests/CompileFeatures/cxx_contextual_conversions.cpp b/Tests/CompileFeatures/cxx_contextual_conversions.cpp new file mode 100644 index 0000000..3438624 --- /dev/null +++ b/Tests/CompileFeatures/cxx_contextual_conversions.cpp @@ -0,0 +1,33 @@ + +#define assert(E) if(!(E)) return 1; + +template<class T> +class zero_init +{ +public: + zero_init( ) + : val( static_cast<T>(0) ) { } + zero_init( T val ) : val( val ) + { } + operator T & ( ) { return val; } + operator T ( ) const { return val; } +private: + T val; +}; + +int someFunc() +{ + zero_init<int*> p; assert( p == 0 ); + p = new int(7); + assert( *p == 7 ); + delete p; + + zero_init<int> i; assert( i == 0 ); + i = 7; + assert( i == 7 ); + switch( i ) { } + + int *vp = new int[i]; + + return 0; +} diff --git a/Tests/CompileFeatures/cxx_decltype.cpp b/Tests/CompileFeatures/cxx_decltype.cpp new file mode 100644 index 0000000..24ec51e --- /dev/null +++ b/Tests/CompileFeatures/cxx_decltype.cpp @@ -0,0 +1,7 @@ + +int someFunc() +{ + int i = 0; + decltype(i) other = 0; + return other; +} diff --git a/Tests/CompileFeatures/cxx_decltype_auto.cpp b/Tests/CompileFeatures/cxx_decltype_auto.cpp new file mode 100644 index 0000000..900bb6d --- /dev/null +++ b/Tests/CompileFeatures/cxx_decltype_auto.cpp @@ -0,0 +1,6 @@ + +int someFunc(int argc, char**) +{ + decltype(auto) i = argc; + return 0; +} diff --git a/Tests/CompileFeatures/cxx_decltype_incomplete_return_types.cpp b/Tests/CompileFeatures/cxx_decltype_incomplete_return_types.cpp new file mode 100644 index 0000000..109d038 --- /dev/null +++ b/Tests/CompileFeatures/cxx_decltype_incomplete_return_types.cpp @@ -0,0 +1,14 @@ + +template<class T> +struct A +{ + ~A() = delete; +}; + +template<class T> auto h() -> A<T>; +template<class T> auto i(T) -> T; +template<class T> auto f(T) -> decltype(i(h<T>())); +template<class T> auto f(T) -> void; +auto g() -> void { + f(42); +} diff --git a/Tests/CompileFeatures/cxx_default_function_template_args.cpp b/Tests/CompileFeatures/cxx_default_function_template_args.cpp new file mode 100644 index 0000000..3d14c52 --- /dev/null +++ b/Tests/CompileFeatures/cxx_default_function_template_args.cpp @@ -0,0 +1,12 @@ + +template<typename T = int> +int someFunc() +{ + T t = 0; + return t; +} + +void otherFunc() +{ + someFunc(); +} diff --git a/Tests/CompileFeatures/cxx_defaulted_functions.cpp b/Tests/CompileFeatures/cxx_defaulted_functions.cpp new file mode 100644 index 0000000..b679a92 --- /dev/null +++ b/Tests/CompileFeatures/cxx_defaulted_functions.cpp @@ -0,0 +1,9 @@ + +struct A { + A() = default; +}; + +void someFunc() +{ + A a; +} diff --git a/Tests/CompileFeatures/cxx_defaulted_move_initializers.cpp b/Tests/CompileFeatures/cxx_defaulted_move_initializers.cpp new file mode 100644 index 0000000..14f9871 --- /dev/null +++ b/Tests/CompileFeatures/cxx_defaulted_move_initializers.cpp @@ -0,0 +1,7 @@ + +struct A +{ + A() = default; + A& operator=(A&&) = default; + A(A&&) = default; +}; diff --git a/Tests/CompileFeatures/cxx_delegating_constructors.cpp b/Tests/CompileFeatures/cxx_delegating_constructors.cpp new file mode 100644 index 0000000..4b41615 --- /dev/null +++ b/Tests/CompileFeatures/cxx_delegating_constructors.cpp @@ -0,0 +1,15 @@ + +class Foo +{ +public: + Foo(int i); + + Foo(double d) + : Foo(static_cast<int>(d)) + { + + } + +private: + int m_i; +}; diff --git a/Tests/CompileFeatures/cxx_deleted_functions.cpp b/Tests/CompileFeatures/cxx_deleted_functions.cpp new file mode 100644 index 0000000..4ecb1e9 --- /dev/null +++ b/Tests/CompileFeatures/cxx_deleted_functions.cpp @@ -0,0 +1,6 @@ + +struct A +{ + A(const A&) = delete; + A& operator=(const A&) = delete; +}; diff --git a/Tests/CompileFeatures/cxx_digit_separators.cpp b/Tests/CompileFeatures/cxx_digit_separators.cpp new file mode 100644 index 0000000..abcd1c8 --- /dev/null +++ b/Tests/CompileFeatures/cxx_digit_separators.cpp @@ -0,0 +1,6 @@ + +int someFunc() +{ + int one_thousand = 1'000; + return one_thousand - 1000; +} diff --git a/Tests/CompileFeatures/cxx_enum_forward_declarations.cpp b/Tests/CompileFeatures/cxx_enum_forward_declarations.cpp new file mode 100644 index 0000000..a7e1445 --- /dev/null +++ b/Tests/CompileFeatures/cxx_enum_forward_declarations.cpp @@ -0,0 +1,8 @@ + +enum SomeEnum : short; + +void someFunc() +{ + SomeEnum value; + int i = value; +} diff --git a/Tests/CompileFeatures/cxx_explicit_conversions.cpp b/Tests/CompileFeatures/cxx_explicit_conversions.cpp new file mode 100644 index 0000000..0decdcd --- /dev/null +++ b/Tests/CompileFeatures/cxx_explicit_conversions.cpp @@ -0,0 +1,10 @@ + +class A +{ + int m_i; +public: + explicit operator bool() + { + return m_i != 0; + } +}; diff --git a/Tests/CompileFeatures/cxx_extended_friend_declarations.cpp b/Tests/CompileFeatures/cxx_extended_friend_declarations.cpp new file mode 100644 index 0000000..631c699 --- /dev/null +++ b/Tests/CompileFeatures/cxx_extended_friend_declarations.cpp @@ -0,0 +1,25 @@ + +template <typename T> +struct B +{ + B() : m_i(42) {} +private: + int m_i; + friend T; +}; + +struct A +{ + template<typename T> + int getBValue(B<T> b) + { + return b.m_i; + } +}; + +void someFunc() +{ + A a; + B<A> b; + a.getBValue(b); +} diff --git a/Tests/CompileFeatures/cxx_extern_templates.cpp b/Tests/CompileFeatures/cxx_extern_templates.cpp new file mode 100644 index 0000000..9fa4aa4 --- /dev/null +++ b/Tests/CompileFeatures/cxx_extern_templates.cpp @@ -0,0 +1,12 @@ + +template<typename T> +void someFunc() +{ +} + +extern template void someFunc<int>(); + +void otherFunc() +{ + someFunc<int>(); +} diff --git a/Tests/CompileFeatures/cxx_final.cpp b/Tests/CompileFeatures/cxx_final.cpp new file mode 100644 index 0000000..598cb94 --- /dev/null +++ b/Tests/CompileFeatures/cxx_final.cpp @@ -0,0 +1,2 @@ + +struct A final {}; diff --git a/Tests/CompileFeatures/cxx_func_identifier.cpp b/Tests/CompileFeatures/cxx_func_identifier.cpp new file mode 100644 index 0000000..0c3595c --- /dev/null +++ b/Tests/CompileFeatures/cxx_func_identifier.cpp @@ -0,0 +1,6 @@ + +void someFunc() +{ + bool b = sizeof(__func__); + (void)b; +} diff --git a/Tests/CompileFeatures/cxx_generalized_initializers.cpp b/Tests/CompileFeatures/cxx_generalized_initializers.cpp new file mode 100644 index 0000000..8013ef5 --- /dev/null +++ b/Tests/CompileFeatures/cxx_generalized_initializers.cpp @@ -0,0 +1,23 @@ + +// Dummy implementation. Test only the compiler feature. +namespace std { + typedef decltype(sizeof(int)) size_t; + template <class _E> + class initializer_list + { + const _E* __begin_; + size_t __size_; + + }; +} + +template <typename T> +struct A +{ + A(std::initializer_list<T>) {} +}; + +void someFunc() +{ + A<int> as = { 1, 2, 3, 4 }; +} diff --git a/Tests/CompileFeatures/cxx_generic_lambdas.cpp b/Tests/CompileFeatures/cxx_generic_lambdas.cpp new file mode 100644 index 0000000..ae1b78e --- /dev/null +++ b/Tests/CompileFeatures/cxx_generic_lambdas.cpp @@ -0,0 +1,6 @@ + +int someFunc() +{ + auto identity = [](auto a) { return a; }; + return identity(0); +} diff --git a/Tests/CompileFeatures/cxx_inheriting_constructors.cpp b/Tests/CompileFeatures/cxx_inheriting_constructors.cpp new file mode 100644 index 0000000..a83b624 --- /dev/null +++ b/Tests/CompileFeatures/cxx_inheriting_constructors.cpp @@ -0,0 +1,18 @@ + +struct A +{ + int m_i; + + A(int i) : m_i(i) {} +}; + +struct B : public A +{ + using A::A; +}; + +void someFunc() +{ + int i; + B b(i); +} diff --git a/Tests/CompileFeatures/cxx_inline_namespaces.cpp b/Tests/CompileFeatures/cxx_inline_namespaces.cpp new file mode 100644 index 0000000..59fa9c8 --- /dev/null +++ b/Tests/CompileFeatures/cxx_inline_namespaces.cpp @@ -0,0 +1,26 @@ +namespace Lib +{ +inline namespace Lib_1 +{ + template <typename T> class A; +} + +template <typename T> void g(T); +} + +struct MyClass { + +}; +namespace Lib +{ +template<> +class A<MyClass> { + +}; +} + +void someFunc() +{ + Lib::A<MyClass> a; + g(a); // ok, Lib is an associated namespace of A +} diff --git a/Tests/CompileFeatures/cxx_lambda_init_captures.cpp b/Tests/CompileFeatures/cxx_lambda_init_captures.cpp new file mode 100644 index 0000000..7e337fa --- /dev/null +++ b/Tests/CompileFeatures/cxx_lambda_init_captures.cpp @@ -0,0 +1,6 @@ + +int someFunc() +{ + int a = 0; + return [b = static_cast<int&&>(a)]() { return b; }(); +} diff --git a/Tests/CompileFeatures/cxx_lambdas.cpp b/Tests/CompileFeatures/cxx_lambdas.cpp new file mode 100644 index 0000000..eecaa23 --- /dev/null +++ b/Tests/CompileFeatures/cxx_lambdas.cpp @@ -0,0 +1,5 @@ + +void someFunc() +{ + [](){}(); +} diff --git a/Tests/CompileFeatures/cxx_local_type_template_args.cpp b/Tests/CompileFeatures/cxx_local_type_template_args.cpp new file mode 100644 index 0000000..802ea7a --- /dev/null +++ b/Tests/CompileFeatures/cxx_local_type_template_args.cpp @@ -0,0 +1,21 @@ + +template <typename T> +class X { }; +template <typename T> +void f(T t) { } +struct {} unnamed_obj; +void f() { + struct A { }; + enum { e1 }; + typedef struct {} B; + B b; + X<A> x1; + X<A*> x2; + X<B> x3; + f(e1); + f(unnamed_obj); + f(b); + (void)x1; + (void)x2; + (void)x3; +} diff --git a/Tests/CompileFeatures/cxx_long_long_type.cpp b/Tests/CompileFeatures/cxx_long_long_type.cpp new file mode 100644 index 0000000..670324c --- /dev/null +++ b/Tests/CompileFeatures/cxx_long_long_type.cpp @@ -0,0 +1,5 @@ + +void someFunc() +{ + long long ll = 9223372036854775807LL; +} diff --git a/Tests/CompileFeatures/cxx_noexcept.cpp b/Tests/CompileFeatures/cxx_noexcept.cpp new file mode 100644 index 0000000..a3c05b8 --- /dev/null +++ b/Tests/CompileFeatures/cxx_noexcept.cpp @@ -0,0 +1,5 @@ + +void someFunc() noexcept +{ + +} diff --git a/Tests/CompileFeatures/cxx_nonstatic_member_init.cpp b/Tests/CompileFeatures/cxx_nonstatic_member_init.cpp new file mode 100644 index 0000000..6b7fa70 --- /dev/null +++ b/Tests/CompileFeatures/cxx_nonstatic_member_init.cpp @@ -0,0 +1,4 @@ +class A +{ + int m_i = 42; +}; diff --git a/Tests/CompileFeatures/cxx_nullptr.cpp b/Tests/CompileFeatures/cxx_nullptr.cpp new file mode 100644 index 0000000..96307df --- /dev/null +++ b/Tests/CompileFeatures/cxx_nullptr.cpp @@ -0,0 +1,10 @@ + +void someFunc(int*) +{ + +} + +void otherFunc() +{ + someFunc(nullptr); +} diff --git a/Tests/CompileFeatures/cxx_override.cpp b/Tests/CompileFeatures/cxx_override.cpp new file mode 100644 index 0000000..55bec13 --- /dev/null +++ b/Tests/CompileFeatures/cxx_override.cpp @@ -0,0 +1,7 @@ + +struct A { + virtual void doNothing() {} +}; +struct B : A { + void doNothing() override {} +}; diff --git a/Tests/CompileFeatures/cxx_range_for.cpp b/Tests/CompileFeatures/cxx_range_for.cpp new file mode 100644 index 0000000..892109e --- /dev/null +++ b/Tests/CompileFeatures/cxx_range_for.cpp @@ -0,0 +1,10 @@ + +void someFunc() +{ + int accumulated = 0; + int numbers[] = { 1, 2, 5 }; + for (int i : numbers) + { + accumulated += i; + } +} diff --git a/Tests/CompileFeatures/cxx_raw_string_literals.cpp b/Tests/CompileFeatures/cxx_raw_string_literals.cpp new file mode 100644 index 0000000..ea4d231 --- /dev/null +++ b/Tests/CompileFeatures/cxx_raw_string_literals.cpp @@ -0,0 +1,7 @@ + +void someFunc() +{ +const char p[] = R"(a\ +b +c)"; +} diff --git a/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp b/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp new file mode 100644 index 0000000..83a2361 --- /dev/null +++ b/Tests/CompileFeatures/cxx_reference_qualified_functions.cpp @@ -0,0 +1,11 @@ + +struct test{ + void f() & { } + void f() && { } +}; + +void someFunc(){ + test t; + t.f(); // lvalue + test().f(); // rvalue +} diff --git a/Tests/CompileFeatures/cxx_relaxed_constexpr.cpp b/Tests/CompileFeatures/cxx_relaxed_constexpr.cpp new file mode 100644 index 0000000..bce82e3 --- /dev/null +++ b/Tests/CompileFeatures/cxx_relaxed_constexpr.cpp @@ -0,0 +1,23 @@ + +struct X { + constexpr X() : n(5) { + n *= 2; + } + int n; +}; + +constexpr int g(const int (&is)[4]) { + X x; + int r = x.n; + for (int i = 0; i < 5; ++i) + r += i; + for (auto& i : is) + r += i; + return r; +} + +int someFunc() +{ + constexpr int k3 = g({ 4, 5, 6, 7 }); + return k3 - 42; +} diff --git a/Tests/CompileFeatures/cxx_return_type_deduction.cpp b/Tests/CompileFeatures/cxx_return_type_deduction.cpp new file mode 100644 index 0000000..009e919 --- /dev/null +++ b/Tests/CompileFeatures/cxx_return_type_deduction.cpp @@ -0,0 +1,10 @@ + +auto sum(int a, int b) +{ + return a+b; +} + +int someFunc() +{ + return sum(3, -3); +} diff --git a/Tests/CompileFeatures/cxx_right_angle_brackets.cpp b/Tests/CompileFeatures/cxx_right_angle_brackets.cpp new file mode 100644 index 0000000..2713fd8 --- /dev/null +++ b/Tests/CompileFeatures/cxx_right_angle_brackets.cpp @@ -0,0 +1,12 @@ + +template<typename T> +struct A +{ + typedef T Result; +}; + +void someFunc() +{ + A<A<int>> object; + (void)object; +} diff --git a/Tests/CompileFeatures/cxx_rvalue_references.cpp b/Tests/CompileFeatures/cxx_rvalue_references.cpp new file mode 100644 index 0000000..787026a --- /dev/null +++ b/Tests/CompileFeatures/cxx_rvalue_references.cpp @@ -0,0 +1,5 @@ + +void someFunc(int&&) +{ + +} diff --git a/Tests/CompileFeatures/cxx_sizeof_member.cpp b/Tests/CompileFeatures/cxx_sizeof_member.cpp new file mode 100644 index 0000000..ae143d2 --- /dev/null +++ b/Tests/CompileFeatures/cxx_sizeof_member.cpp @@ -0,0 +1,10 @@ + +struct A +{ + int m_i; +}; + +int someFunc() +{ + return sizeof(A::m_i) > 0 ? 1 : 2; +} diff --git a/Tests/CompileFeatures/cxx_static_assert.cpp b/Tests/CompileFeatures/cxx_static_assert.cpp new file mode 100644 index 0000000..6aa8678 --- /dev/null +++ b/Tests/CompileFeatures/cxx_static_assert.cpp @@ -0,0 +1,2 @@ + +static_assert(true, "static_assert test"); diff --git a/Tests/CompileFeatures/cxx_strong_enums.cpp b/Tests/CompileFeatures/cxx_strong_enums.cpp new file mode 100644 index 0000000..6262456 --- /dev/null +++ b/Tests/CompileFeatures/cxx_strong_enums.cpp @@ -0,0 +1,7 @@ + +enum class Colors +{ + RedColor, + GreenColor, + BlueColor +}; diff --git a/Tests/CompileFeatures/cxx_template_template_parameters.cpp b/Tests/CompileFeatures/cxx_template_template_parameters.cpp new file mode 100644 index 0000000..0fdd18d --- /dev/null +++ b/Tests/CompileFeatures/cxx_template_template_parameters.cpp @@ -0,0 +1,18 @@ + +template<template <typename> class T, typename U> +void someFunc(T<U>) +{ + +} + +template<typename T> +struct A +{ + +}; + +void otherFunc() +{ + A<int> a; + someFunc(a); +} diff --git a/Tests/CompileFeatures/cxx_thread_local.cpp b/Tests/CompileFeatures/cxx_thread_local.cpp new file mode 100644 index 0000000..1fb27e2 --- /dev/null +++ b/Tests/CompileFeatures/cxx_thread_local.cpp @@ -0,0 +1,2 @@ + +thread_local unsigned int rage = 1; diff --git a/Tests/CompileFeatures/cxx_trailing_return_types.cpp b/Tests/CompileFeatures/cxx_trailing_return_types.cpp new file mode 100644 index 0000000..01a76cb --- /dev/null +++ b/Tests/CompileFeatures/cxx_trailing_return_types.cpp @@ -0,0 +1,5 @@ + +auto someFunc() -> int +{ + return 42; +} diff --git a/Tests/CompileFeatures/cxx_unicode_literals.cpp b/Tests/CompileFeatures/cxx_unicode_literals.cpp new file mode 100644 index 0000000..a7b7df0 --- /dev/null +++ b/Tests/CompileFeatures/cxx_unicode_literals.cpp @@ -0,0 +1,3 @@ + +const char16_t lit_16[] = u"\u00DA"; +const char32_t lit_32[] = U"\u00DA"; diff --git a/Tests/CompileFeatures/cxx_uniform_initialization.cpp b/Tests/CompileFeatures/cxx_uniform_initialization.cpp new file mode 100644 index 0000000..82c76e2 --- /dev/null +++ b/Tests/CompileFeatures/cxx_uniform_initialization.cpp @@ -0,0 +1,9 @@ +struct A {}; +struct B { + B(A) {} +}; + +void Func() +{ + B b{A{}}; +} diff --git a/Tests/CompileFeatures/cxx_unrestricted_unions.cpp b/Tests/CompileFeatures/cxx_unrestricted_unions.cpp new file mode 100644 index 0000000..698fd61 --- /dev/null +++ b/Tests/CompileFeatures/cxx_unrestricted_unions.cpp @@ -0,0 +1,11 @@ + +struct point { + point() {} + point(int x, int y) : x_(x), y_(y) {} + int x_, y_; +}; +union u { + point p_; + int i_; + const char* s_; +}; diff --git a/Tests/CompileFeatures/cxx_user_literals.cpp b/Tests/CompileFeatures/cxx_user_literals.cpp new file mode 100644 index 0000000..9e5a588 --- /dev/null +++ b/Tests/CompileFeatures/cxx_user_literals.cpp @@ -0,0 +1,7 @@ + +long double operator "" _meters(long double); + +void someFunc() +{ + long double i = 1.2_meters; +} diff --git a/Tests/CompileFeatures/cxx_variable_templates.cpp b/Tests/CompileFeatures/cxx_variable_templates.cpp new file mode 100644 index 0000000..5d4bdbc --- /dev/null +++ b/Tests/CompileFeatures/cxx_variable_templates.cpp @@ -0,0 +1,10 @@ + +template<typename T> +constexpr T pi = T(3.1415926535897932385); + +int someFunc() +{ + auto pi_int = pi<int>; + auto pi_float = pi<float>; + return pi_int - 3; +} diff --git a/Tests/CompileFeatures/cxx_variadic_macros.cpp b/Tests/CompileFeatures/cxx_variadic_macros.cpp new file mode 100644 index 0000000..4d007a5 --- /dev/null +++ b/Tests/CompileFeatures/cxx_variadic_macros.cpp @@ -0,0 +1,12 @@ + +int someFunc(int, char, int) +{ + return 0; +} + +#define FUNC_WRAPPER(...) someFunc(__VA_ARGS__) + +void otherFunc() +{ + FUNC_WRAPPER(42, 'a', 7); +} diff --git a/Tests/CompileFeatures/cxx_variadic_templates.cpp b/Tests/CompileFeatures/cxx_variadic_templates.cpp new file mode 100644 index 0000000..1d5a706 --- /dev/null +++ b/Tests/CompileFeatures/cxx_variadic_templates.cpp @@ -0,0 +1,65 @@ +template<int I, int... Is> +struct Interface; + +template<int I> +struct Interface<I> +{ + static int accumulate() + { + return I; + } +}; + +template<int I, int... Is> +struct Interface +{ + static int accumulate() + { + return I + Interface<Is...>::accumulate(); + } +}; + +// Note: split this into a separate test if a +// cxx_variadic_template_template_parameters feature is added. + +template<typename T> +struct eval { + enum { + Matched = 0 + }; +}; + +template<template<typename...> class T, typename... U> +struct eval<T<U...> > { + enum { + Matched = 1 + }; +}; + +template<typename...> +struct A { + +}; +template<typename T> +struct B { + +}; +template<typename T, typename U> +struct C { + +}; +template<typename T, typename U, typename...> +struct D { + +}; + +// Note: This test assumes that a compiler supporting this feature +// supports static_assert. Add a workaround if that does not hold. +static_assert(eval<A<> >::Matched, "A Matches"); +static_assert(eval<A<int> >::Matched, "A Matches"); +static_assert(eval<A<int, char> >::Matched, "A Matches"); +static_assert(eval<B<int> >::Matched, "B Matches"); +static_assert(eval<C<int, char> >::Matched, "C Matches"); +static_assert(eval<D<int, char> >::Matched, "D Matches"); +static_assert(eval<D<int, char, bool> >::Matched, "D Matches"); +static_assert(eval<D<int, char, bool, double> >::Matched, "D Matches"); diff --git a/Tests/CompileFeatures/feature_test.cpp b/Tests/CompileFeatures/feature_test.cpp new file mode 100644 index 0000000..4406c16 --- /dev/null +++ b/Tests/CompileFeatures/feature_test.cpp @@ -0,0 +1,10 @@ + +#define STRINGIFY_IMPL(X) #X +#define STRINGIFY(X) STRINGIFY_IMPL(X) + +#include STRINGIFY(TEST) + +int main() +{ + return 0; +} diff --git a/Tests/CompileFeatures/genex_test.cpp b/Tests/CompileFeatures/genex_test.cpp new file mode 100644 index 0000000..ca38883 --- /dev/null +++ b/Tests/CompileFeatures/genex_test.cpp @@ -0,0 +1,21 @@ + +#if !HAVE_OVERRIDE_CONTROL +#error "Expect override control feature" +#else + +struct A +{ + virtual int getA() { return 7; } +}; + +struct B final : A +{ + int getA() override { return 42; } +}; + +#endif + +int main() +{ + +} diff --git a/Tests/CompileFeatures/main.c b/Tests/CompileFeatures/main.c new file mode 100644 index 0000000..831c5eb2 --- /dev/null +++ b/Tests/CompileFeatures/main.c @@ -0,0 +1,12 @@ + +int foo(int * restrict a, int * restrict b) +{ + (void)a; + (void)b; + return 0; +} + +int main() +{ + return 0; +} diff --git a/Tests/CompileFeatures/main.cpp b/Tests/CompileFeatures/main.cpp new file mode 100644 index 0000000..3a8e0fc --- /dev/null +++ b/Tests/CompileFeatures/main.cpp @@ -0,0 +1,6 @@ + +int main(int,char**) +{ + auto value = 0; + return value; +} diff --git a/Tests/Complex/CMakeLists.txt b/Tests/Complex/CMakeLists.txt index fcde44d..222250c 100644 --- a/Tests/Complex/CMakeLists.txt +++ b/Tests/Complex/CMakeLists.txt @@ -36,7 +36,7 @@ ASSERT(Complex_BINARY_DIR "The PROJECT command is broken") # macro(TEST_ARGC value1 value2) add_definitions(${value1} ${value2}) - if (${ARGC} MATCHES 4) + if (${ARGC} EQUAL 4) add_definitions(${ARGV2} ${ARGV3}) endif () endmacro() @@ -70,7 +70,7 @@ if(NOT 2.4 EQUAL 2.4) message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4") endif() -if(CMAKE_SYSTEM MATCHES "OSF1-V.*") +if(CMAKE_SYSTEM MATCHES "OSF1-V") if(NOT CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") endif() @@ -83,6 +83,14 @@ set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_RELEASE CMAKE_IS_FUN_IN_RELEASE_MODE ) +set_property(DIRECTORY + PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO + CMAKE_IS_FUN_IN_RELEASE_MODE + ) +set_property(DIRECTORY + PROPERTY COMPILE_DEFINITIONS_MINSIZEREL + CMAKE_IS_FUN_IN_RELEASE_MODE + ) set(TEST_SEP "a b c") separate_arguments(TEST_SEP) @@ -392,6 +400,21 @@ if(NOT RESULT STREQUAL "a[b]c[d]e") "string(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")") endif() +# +# This tests needs Ansi C++98 +# +set(CMAKE_CXX_STANDARD 98) +# +# GNU extensions are needed for stricmp() on Windows. +# +set(CMAKE_CXX_EXTENSIONS TRUE) + +# Those versions of the HP compiler that need a flag to get proper C++98 +# template support also need a flag to use the newer C++ library. +if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND + CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA") +endif () # # Create the libs and the main exe diff --git a/Tests/ComplexOneConfig/CMakeLists.txt b/Tests/ComplexOneConfig/CMakeLists.txt index a4a0e0e..3f17dcc 100644 --- a/Tests/ComplexOneConfig/CMakeLists.txt +++ b/Tests/ComplexOneConfig/CMakeLists.txt @@ -36,7 +36,7 @@ ASSERT(Complex_BINARY_DIR "The PROJECT command is broken") # macro(TEST_ARGC value1 value2) add_definitions(${value1} ${value2}) - if (${ARGC} MATCHES 4) + if (${ARGC} EQUAL 4) add_definitions(${ARGV2} ${ARGV3}) endif () endmacro() @@ -70,7 +70,7 @@ if(NOT 2.4 EQUAL 2.4) message(FATAL_ERROR "Failed: NOT 2.4 EQUAL 2.4") endif() -if(CMAKE_SYSTEM MATCHES "OSF1-V.*") +if(CMAKE_SYSTEM MATCHES "OSF1-V") if(NOT CMAKE_COMPILER_IS_GNUCXX) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ") endif() @@ -83,6 +83,14 @@ set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_RELEASE CMAKE_IS_FUN_IN_RELEASE_MODE ) +set_property(DIRECTORY + PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO + CMAKE_IS_FUN_IN_RELEASE_MODE + ) +set_property(DIRECTORY + PROPERTY COMPILE_DEFINITIONS_MINSIZEREL + CMAKE_IS_FUN_IN_RELEASE_MODE + ) set(TEST_SEP "a b c") separate_arguments(TEST_SEP) @@ -362,6 +370,21 @@ if(NOT RESULT STREQUAL "a[b]c[d]e") "string(REGEX REPLACE ... ) test failed (\"${RESULT}\" v. \"a[b]c[d]e\")") endif() +# +# This tests needs Ansi C++98 +# +set(CMAKE_CXX_STANDARD 98) +# +# GNU extensions are needed for stricmp() on Windows. +# +set(CMAKE_CXX_EXTENSIONS TRUE) + +# Those versions of the HP compiler that need a flag to get proper C++98 +# template support also need a flag to use the newer C++ library. +if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND + CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA") +endif () # # Create the libs and the main exe diff --git a/Tests/ConfigSources/CMakeLists.txt b/Tests/ConfigSources/CMakeLists.txt new file mode 100644 index 0000000..c272257 --- /dev/null +++ b/Tests/ConfigSources/CMakeLists.txt @@ -0,0 +1,17 @@ + +cmake_minimum_required(VERSION 3.0) + +project(ConfigSources) + +add_library(iface INTERFACE) +set_property(TARGET iface PROPERTY INTERFACE_SOURCES + iface_src.cpp + $<$<CONFIG:Debug>:iface_debug_src.cpp> + $<$<CONFIG:Release>:does_not_exist.cpp> +) + +add_executable(ConfigSources + $<$<CONFIG:Debug>:main.cpp> + $<$<CONFIG:Release>:does_not_exist.cpp> +) +target_link_libraries(ConfigSources iface) diff --git a/Tests/ConfigSources/iface_debug.h b/Tests/ConfigSources/iface_debug.h new file mode 100644 index 0000000..a23d737 --- /dev/null +++ b/Tests/ConfigSources/iface_debug.h @@ -0,0 +1,4 @@ + +int iface_src(); + +int iface_debug(); diff --git a/Tests/ConfigSources/iface_debug_src.cpp b/Tests/ConfigSources/iface_debug_src.cpp new file mode 100644 index 0000000..63b22fc --- /dev/null +++ b/Tests/ConfigSources/iface_debug_src.cpp @@ -0,0 +1,7 @@ + +#include "iface_debug.h" + +int iface_debug() +{ + return 0; +} diff --git a/Tests/ConfigSources/iface_src.cpp b/Tests/ConfigSources/iface_src.cpp new file mode 100644 index 0000000..c3a0c8f --- /dev/null +++ b/Tests/ConfigSources/iface_src.cpp @@ -0,0 +1,5 @@ + +int iface_src() +{ + return 0; +} diff --git a/Tests/ConfigSources/main.cpp b/Tests/ConfigSources/main.cpp new file mode 100644 index 0000000..71af72f --- /dev/null +++ b/Tests/ConfigSources/main.cpp @@ -0,0 +1,7 @@ + +#include "iface_debug.h" + +int main(int argc, char** argv) +{ + return iface_src() + iface_debug(); +} diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index bbae387..b97cd16 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -185,7 +185,7 @@ add_executable(CustomCommand # here to test adding the generation rule after referencing the # generated source in a target. add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/generated.c - DEPENDS generator + DEPENDS $<1:generator> $<0:does_not_exist> COMMAND generator ARGS ${PROJECT_BINARY_DIR}/generated.c ) @@ -221,8 +221,11 @@ add_subdirectory(GeneratorInExtraDir) add_executable(tcat tcat.cxx) +# Test that list expansion from a generator expression works. +set_property(TARGET tcat PROPERTY DEPSLIST tcat gen_redirect_in.c) + add_custom_command(OUTPUT gen_redirect.c - DEPENDS tcat gen_redirect_in.c + DEPENDS $<TARGET_PROPERTY:tcat,DEPSLIST> COMMAND tcat < ${CMAKE_CURRENT_SOURCE_DIR}/gen_redirect_in.c > gen_redirect.c COMMAND ${CMAKE_COMMAND} -E echo "#endif" >> gen_redirect.c VERBATIM @@ -364,8 +367,8 @@ endif() foreach(arg ${CHECK_ARGS} "") set(ARG "${arg}") - string(REGEX REPLACE "\\\\" "\\\\\\\\" ARG "${ARG}") - string(REGEX REPLACE "\"" "\\\\\"" ARG "${ARG}") + string(REPLACE "\\" "\\\\" ARG "${ARG}") + string(REPLACE "\"" "\\\"" ARG "${ARG}") set(EXPECTED_ARGUMENTS "${EXPECTED_ARGUMENTS} \"${ARG}\", ") @@ -453,3 +456,30 @@ add_custom_target(source_in_custom_target SOURCES source_in_custom_target.cpp) set_property(SOURCE source_in_custom_target PROPERTY COMPILE_DEFINITIONS "TEST" ) + +set(gen_path "${CMAKE_CURRENT_BINARY_DIR}//./foo") +set(gen_file "${gen_path}/foo.cxx") + +add_custom_command( + OUTPUT "${gen_file}" + # Make sure the output directory exists before trying to write to it. + COMMAND ${CMAKE_COMMAND} -E make_directory "${gen_path}" + COMMAND ${CMAKE_COMMAND} -E touch "${gen_file}" +) + +add_library(NormOutput "${gen_file}") + +set(gen_path "${gen_path}/bar") +set(gen_file "${gen_path}/bar.cxx") + +add_custom_command( + OUTPUT "${gen_path}" + COMMAND ${CMAKE_COMMAND} -E make_directory "${gen_path}" +) + +add_custom_command( + OUTPUT "${gen_file}" + DEPENDS "${gen_path}" + COMMAND ${CMAKE_COMMAND} -E touch "${gen_file}") + +add_library(NormDepends "${gen_file}") diff --git a/Tests/CxxDialect/CMakeLists.txt b/Tests/CxxDialect/CMakeLists.txt new file mode 100644 index 0000000..8c90339 --- /dev/null +++ b/Tests/CxxDialect/CMakeLists.txt @@ -0,0 +1,28 @@ +cmake_minimum_required(VERSION 2.8.12) +cmake_policy(SET CMP0025 NEW) +project(CxxDialect) + +add_executable(use_typeof use_typeof.cxx) +set_property(TARGET use_typeof PROPERTY CXX_STANDARD 98) + +add_executable(use_constexpr use_constexpr.cxx) +set_property(TARGET use_constexpr PROPERTY CXX_STANDARD 11) + +add_executable(CxxDialect use_constexpr_and_typeof.cxx) +set_property(TARGET CxxDialect PROPERTY CXX_STANDARD 11) + +try_compile(typeof_no_extensions_works + "${CMAKE_CURRENT_BINARY_DIR}/use_typeof_test" + "${CMAKE_CURRENT_SOURCE_DIR}/use_typeof.cxx" + COMPILE_DEFINITIONS + CMAKE_FLAGS + "-DCMAKE_CXX_STANDARD=98" + "-DCMAKE_CXX_EXTENSIONS=FALSE" + OUTPUT_VARIABLE OUTPUT +) + +if (typeof_no_extensions_works) + message("Use of typeof extension with extensions disabled works, but is expected to fail: ${OUTPUT}") +else() + message("Use of typeof extension with extensions disabled fails, as expected") +endif() diff --git a/Tests/CxxDialect/use_constexpr.cxx b/Tests/CxxDialect/use_constexpr.cxx new file mode 100644 index 0000000..30ccc4c --- /dev/null +++ b/Tests/CxxDialect/use_constexpr.cxx @@ -0,0 +1,10 @@ + +constexpr int foo() +{ + return 0; +} + +int main(int argc, char**) +{ + return foo(); +} diff --git a/Tests/CxxDialect/use_constexpr_and_typeof.cxx b/Tests/CxxDialect/use_constexpr_and_typeof.cxx new file mode 100644 index 0000000..af217b6 --- /dev/null +++ b/Tests/CxxDialect/use_constexpr_and_typeof.cxx @@ -0,0 +1,11 @@ + +constexpr int foo() +{ + return 0; +} + +int main(int argc, char**) +{ + typeof(argc) ret = foo(); + return ret; +} diff --git a/Tests/CxxDialect/use_typeof.cxx b/Tests/CxxDialect/use_typeof.cxx new file mode 100644 index 0000000..dabb61f --- /dev/null +++ b/Tests/CxxDialect/use_typeof.cxx @@ -0,0 +1,6 @@ + +int main(int argc, char**) +{ + typeof(argc) ret = 0; + return ret; +} diff --git a/Tests/ExportImport/CMakeLists.txt b/Tests/ExportImport/CMakeLists.txt index 02a0371..a6f8921 100644 --- a/Tests/ExportImport/CMakeLists.txt +++ b/Tests/ExportImport/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 2.7.20090711) project(ExportImport C CXX) -if(NOT DEFINED CMAKE_TEST_MAKEPROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") - set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}") +if(NOT DEFINED CMake_TEST_NESTED_MAKE_PROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") + set(CMake_TEST_NESTED_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM}") endif() # Wipe out the install tree to make sure the exporter works. diff --git a/Tests/ExportImport/Export/Interface/CMakeLists.txt b/Tests/ExportImport/Export/Interface/CMakeLists.txt index 9d4793d..523fc29 100644 --- a/Tests/ExportImport/Export/Interface/CMakeLists.txt +++ b/Tests/ExportImport/Export/Interface/CMakeLists.txt @@ -23,7 +23,13 @@ set_property(TARGET sharedlib PROPERTY INTERFACE_COMPILE_DEFINITIONS "SHAREDLIB_ add_library(sharediface INTERFACE) target_link_libraries(sharediface INTERFACE sharedlib) -install(TARGETS headeronly sharediface +add_library(use_auto_type INTERFACE) +target_compile_features(use_auto_type INTERFACE cxx_auto_type) + +add_library(use_c_restrict INTERFACE) +target_compile_features(use_c_restrict INTERFACE c_restrict) + +install(TARGETS headeronly sharediface use_auto_type use_c_restrict EXPORT expInterface ) install(TARGETS sharedlib diff --git a/Tests/ExportImport/Import/CMakeLists.txt b/Tests/ExportImport/Import/CMakeLists.txt index 5e809a2..189f7a2 100644 --- a/Tests/ExportImport/Import/CMakeLists.txt +++ b/Tests/ExportImport/Import/CMakeLists.txt @@ -1,4 +1,5 @@ cmake_minimum_required (VERSION 2.7.20090711) +cmake_policy(SET CMP0025 NEW) project(Import C CXX) # Import everything in a subdirectory. diff --git a/Tests/ExportImport/Import/Interface/CMakeLists.txt b/Tests/ExportImport/Import/Interface/CMakeLists.txt index cf7e2bc..4028405 100644 --- a/Tests/ExportImport/Import/Interface/CMakeLists.txt +++ b/Tests/ExportImport/Import/Interface/CMakeLists.txt @@ -17,6 +17,7 @@ set_property(TARGET bld::sharediface APPEND PROPERTY INTERFACE_LINK_LIBRARIES de add_executable(interfacetest_bld interfacetest.cpp) target_link_libraries(interfacetest_bld bld::sharediface) +include(CheckCSourceCompiles) include(CheckCXXSourceCompiles) macro(do_try_compile prefix) @@ -40,6 +41,43 @@ macro(do_try_compile prefix) if(NOT ${prefix}IFACE_TRY_COMPILE) message(SEND_ERROR "${prefix} try_compile with IMPORTED INTERFACE target failed!\n\n${OUTPUT}") endif() + + if (";${CMAKE_C_COMPILE_FEATURES};" MATCHES ";c_restrict;") + set(CMAKE_REQUIRED_LIBRARIES ${prefix}::use_c_restrict) + check_c_source_compiles( + " + int foo(int * restrict a, int * restrict b) + { + (void)a; + (void)b; + return 0; + } + int main() + { + return 0; + } + " ${prefix}IMPORTED_IFACE_C_RESTRICT) + + if(NOT ${prefix}IMPORTED_IFACE_C_RESTRICT) + message(SEND_ERROR "${prefix} try_compile with IMPORTED INTERFACE target failed!\n\n${OUTPUT}") + endif() + endif() + if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_auto_type;") + set(CMAKE_REQUIRED_LIBRARIES ${prefix}::use_auto_type) + check_cxx_source_compiles( + " + int main(int,char**) + { + auto value = 0; + return value; + } + " ${prefix}IMPORTED_IFACE_AUTO_TYPE) + + if(NOT ${prefix}IMPORTED_IFACE_AUTO_TYPE) + message(SEND_ERROR "${prefix} try_compile with IMPORTED INTERFACE target failed!\n\n${OUTPUT}") + endif() + endif() + endmacro() do_try_compile(bld) diff --git a/Tests/ExportImport/InitialCache.cmake.in b/Tests/ExportImport/InitialCache.cmake.in index fba6ee2..f600d90 100644 --- a/Tests/ExportImport/InitialCache.cmake.in +++ b/Tests/ExportImport/InitialCache.cmake.in @@ -1,4 +1,4 @@ -set(CMAKE_MAKE_PROGRAM "@CMAKE_TEST_MAKEPROGRAM@" CACHE FILEPATH "Make Program") +set(CMAKE_MAKE_PROGRAM "@CMake_TEST_NESTED_MAKE_PROGRAM@" CACHE FILEPATH "Make Program") set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE STRING "C Compiler") set(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "C Flags") set(CMAKE_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "C Flags") diff --git a/Tests/ExternalProject/CMakeLists.txt b/Tests/ExternalProject/CMakeLists.txt index d9344ec..0ed5561 100644 --- a/Tests/ExternalProject/CMakeLists.txt +++ b/Tests/ExternalProject/CMakeLists.txt @@ -98,6 +98,7 @@ ExternalProject_Add(${proj} CVS_TAG "" DEPENDS "MinimalNoOpProject" NonExternalProjectTarget DOWNLOAD_COMMAND "" + DOWNLOAD_NO_PROGRESS 1 INSTALL_COMMAND "" PATCH_COMMAND "" STEP_TARGETS install update diff --git a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake index b6f848a..ea59a8e 100644 --- a/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake +++ b/Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake @@ -12,7 +12,7 @@ macro(check_a_tag desired_tag resulting_sha fetch_expected) # Configure execute_process(COMMAND ${CMAKE_COMMAND} - -G ${CMAKE_TEST_GENERATOR} -T "${CMAKE_TEST_GENERATOR_TOOLSET}" + -G ${CMAKE_GENERATOR} -T "${CMAKE_GENERATOR_TOOLSET}" -DTEST_GIT_TAG:STRING=${desired_tag} ${ExternalProjectUpdate_SOURCE_DIR} WORKING_DIRECTORY ${ExternalProjectUpdate_BINARY_DIR} diff --git a/Tests/FindPackageModeMakefileTest/CMakeLists.txt b/Tests/FindPackageModeMakefileTest/CMakeLists.txt index 5d1b376..8e21c32 100644 --- a/Tests/FindPackageModeMakefileTest/CMakeLists.txt +++ b/Tests/FindPackageModeMakefileTest/CMakeLists.txt @@ -10,7 +10,7 @@ if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Makefile") ERROR_QUIET TIMEOUT 10) string(TOUPPER "${makeVersionOutput}" MAKE_VERSION_OUTPUT) - if("${MAKE_VERSION_OUTPUT}" MATCHES ".*GNU MAKE.*") + if("${MAKE_VERSION_OUTPUT}" MATCHES "GNU MAKE") # build a library which we can search during the test add_library(foo STATIC foo.cpp) diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index a77713f..092bf20 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -320,18 +320,55 @@ endif() #----------------------------------------------------------------------------- # Test export(PACKAGE) with find_package. + +# Choose a unique version. +string(REGEX REPLACE "-.*$" "" version ${CMAKE_VERSION}) +string(RANDOM LENGTH 4 ALPHABET "0123456789" v) +set(version "${version}.${v}") + message(STATUS "Preparing export(PACKAGE) test project") try_compile(EXPORTER_COMPILED - ${FindPackageTest_BINARY_DIR}/Exporter + ${FindPackageTest_BINARY_DIR}/Exporter-build ${FindPackageTest_SOURCE_DIR}/Exporter CMakeTestExportPackage dummy + CMAKE_FLAGS "-UCMAKE_EXPORT_NO_PACKAGE_REGISTRY" + -Dversion=${version} OUTPUT_VARIABLE output) message(STATUS "Searching for export(PACKAGE) test project") set(CMakeTestExportPackage_DIR "" CACHE FILEPATH "Wipe out find results for testing." FORCE) -string(REGEX REPLACE "-.*$" "" version ${CMAKE_VERSION}) find_package(CMakeTestExportPackage 1.${version} EXACT REQUIRED) +message(STATUS "Searching for export(PACKAGE) test project with CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=TRUE") +set(CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY TRUE) +set(CMakeTestExportPackage_DIR "" CACHE FILEPATH + "Wipe out find results for testing." FORCE) +find_package(CMakeTestExportPackage 1.${version} EXACT QUIET) +if(CMakeTestExportPackage_FOUND) + message(SEND_ERROR "CMakeTestExportPackage should not be FOUND!") +endif() +unset(CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY) + +message(STATUS "Remove export(PACKAGE) test project") +file(REMOVE_RECURSE ${FindPackageTest_BINARY_DIR}/Exporter-build) +set(CMakeTestExportPackage_DIR "" CACHE FILEPATH + "Wipe out find results for testing." FORCE) +find_package(CMakeTestExportPackage QUIET) # Should clean the user package cache +# +message(STATUS "Preparing export(PACKAGE) test project with CMAKE_EXPORT_NO_PACKAGE_REGISTRY=TRUE") +try_compile(EXPORTER_COMPILED + ${FindPackageTest_BINARY_DIR}/Exporter-build + ${FindPackageTest_SOURCE_DIR}/Exporter + CMakeTestExportPackage dummy + CMAKE_FLAGS "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY:BOOL=TRUE" + -Dversion=${version} + OUTPUT_VARIABLE output) +message(STATUS "Searching for export(PACKAGE) test project") +find_package(CMakeTestExportPackage 1.${version} EXACT QUIET) +if(CMakeTestExportPackage_FOUND) + message(SEND_ERROR "CMakeTestExportPackage should not be FOUND!") +endif() + #----------------------------------------------------------------------------- # Test configure_package_config_file(). diff --git a/Tests/FindPackageTest/Exporter/CMakeTestExportPackageConfigVersion.cmake.in b/Tests/FindPackageTest/Exporter/CMakeTestExportPackageConfigVersion.cmake.in index 42bd84e..6eac6e6 100644 --- a/Tests/FindPackageTest/Exporter/CMakeTestExportPackageConfigVersion.cmake.in +++ b/Tests/FindPackageTest/Exporter/CMakeTestExportPackageConfigVersion.cmake.in @@ -1,5 +1,5 @@ # Test config file. -set(PACKAGE_VERSION "1.@CMAKE_VERSION@") +set(PACKAGE_VERSION "1.@version@") if("${PACKAGE_FIND_VERSION}" VERSION_EQUAL "${PACKAGE_VERSION}") set(PACKAGE_VERSION_COMPATIBLE 1) set(PACKAGE_VERSION_EXACT 1) diff --git a/Tests/FindPackageTest/FindLotsOfComponents.cmake b/Tests/FindPackageTest/FindLotsOfComponents.cmake index 9076d86..5d959c5 100644 --- a/Tests/FindPackageTest/FindLotsOfComponents.cmake +++ b/Tests/FindPackageTest/FindLotsOfComponents.cmake @@ -4,7 +4,7 @@ set(LotsOfComponents_AComp_FOUND TRUE) set(LotsOfComponents_BComp_FOUND FALSE) set(LotsOfComponents_CComp_FOUND TRUE) -include(FindPackageHandleStandardArgs) +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args(LotsOfComponents REQUIRED_VARS LOC_FOO HANDLE_COMPONENTS) diff --git a/Tests/FindPackageTest/FindSomePackage.cmake b/Tests/FindPackageTest/FindSomePackage.cmake index 83d1d0e..7283d24 100644 --- a/Tests/FindPackageTest/FindSomePackage.cmake +++ b/Tests/FindPackageTest/FindSomePackage.cmake @@ -1,6 +1,6 @@ set(SOP_FOO TRUE) -include(FindPackageHandleStandardArgs) +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args(SomePackage REQUIRED_VARS SOP_FOO FOUND_VAR SomePackage_FOUND ) diff --git a/Tests/FindPackageTest/FindUpperCasePackage.cmake b/Tests/FindPackageTest/FindUpperCasePackage.cmake index 66c2fea..425d417 100644 --- a/Tests/FindPackageTest/FindUpperCasePackage.cmake +++ b/Tests/FindPackageTest/FindUpperCasePackage.cmake @@ -1,6 +1,6 @@ set(UCP_FOO TRUE) -include(FindPackageHandleStandardArgs) +include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake) find_package_handle_standard_args(UpperCasePackage REQUIRED_VARS UCP_FOO FOUND_VAR UPPERCASEPACKAGE_FOUND ) diff --git a/Tests/Fortran/CMakeLists.txt b/Tests/Fortran/CMakeLists.txt index 7918129..ef3b317 100644 --- a/Tests/Fortran/CMakeLists.txt +++ b/Tests/Fortran/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 3.0) project(testf C CXX Fortran) -if(NOT DEFINED CMAKE_TEST_MAKEPROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") - set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}") +if(NOT DEFINED CMake_TEST_NESTED_MAKE_PROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") + set(CMake_TEST_NESTED_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM}") endif() message("CTEST_FULL_OUTPUT ") @@ -208,7 +208,7 @@ if(TEST_MODULE_DEPENDS) -DCMAKE_Fortran_FLAGS_RELEASE:STRING=${CMAKE_Fortran_FLAGS_RELEASE} -DCMAKE_Fortran_FLAGS_MINSIZEREL:STRING=${CMAKE_Fortran_FLAGS_MINSIZEREL} -DCMAKE_Fortran_FLAGS_RELWITHDEBINFO:STRING=${CMAKE_Fortran_FLAGS_RELWITHDEBINFO} - -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMAKE_TEST_MAKEPROGRAM} + -DCMAKE_MAKE_PROGRAM:FILEPATH=${CMake_TEST_NESTED_MAKE_PROGRAM} ${External_BUILD_TYPE} VERBATIM ) diff --git a/Tests/FortranC/Flags.cmake.in b/Tests/FortranC/Flags.cmake.in index 3436309..28c38e4 100644 --- a/Tests/FortranC/Flags.cmake.in +++ b/Tests/FortranC/Flags.cmake.in @@ -14,8 +14,8 @@ set(COMMAND) execute_process( WORKING_DIRECTORY "${bld}" - COMMAND ${CMAKE_COMMAND} "${src}" -G "@CMAKE_TEST_GENERATOR@" - -T "@CMAKE_TEST_GENERATOR_TOOLSET@" + COMMAND ${CMAKE_COMMAND} "${src}" -G "@CMAKE_GENERATOR@" + -T "@CMAKE_GENERATOR_TOOLSET@" "-DFortranC_TEST_FLAGS=1" "-DCMAKE_C_COMPILER=${bld}/cc.sh" "-DCMAKE_C_FLAGS:STRING=@CMAKE_C_FLAGS@" diff --git a/Tests/GeneratorExpression/CMakeLists.txt b/Tests/GeneratorExpression/CMakeLists.txt index a0e34ef..758165c 100644 --- a/Tests/GeneratorExpression/CMakeLists.txt +++ b/Tests/GeneratorExpression/CMakeLists.txt @@ -166,7 +166,7 @@ add_library(imported4 SHARED IMPORTED) set_property(TARGET imported4 APPEND PROPERTY INCLUDE_DIRECTORIES $<TARGET_PROPERTY:imported3,INTERFACE_INCLUDE_DIRECTORIES>) -add_executable(someexe empty.cpp) +add_executable(someexe $<1:empty.cpp> $<0:does_not_exist>) add_executable(Alias::SomeExe ALIAS someexe) add_library(Alias::SomeLib ALIAS empty1) diff --git a/Tests/InterfaceLibrary/CMakeLists.txt b/Tests/InterfaceLibrary/CMakeLists.txt index 81b34e6..d4f49c2 100644 --- a/Tests/InterfaceLibrary/CMakeLists.txt +++ b/Tests/InterfaceLibrary/CMakeLists.txt @@ -8,8 +8,18 @@ target_compile_definitions(iface_nodepends INTERFACE IFACE_DEFINE) add_subdirectory(headerdir) +# Add an interface target in a subdirectory that uses an imported interface. +add_subdirectory(ifacedir) + +# Poison an imported interface with the same name as that in the subdir +# to ensure that the transitive lookup occurs in the subdir. +add_library(imp::iface INTERFACE IMPORTED) +set_property(TARGET imp::iface APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP) +set_property(TARGET imp::iface PROPERTY INTERFACE_SOMEPROP OFF) +set_property(TARGET imp::iface PROPERTY INTERFACE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/does_not_exist.cpp) + add_executable(InterfaceLibrary definetestexe.cpp) -target_link_libraries(InterfaceLibrary iface_nodepends headeriface) +target_link_libraries(InterfaceLibrary iface_nodepends headeriface subiface) add_subdirectory(libsdir) diff --git a/Tests/InterfaceLibrary/definetestexe.cpp b/Tests/InterfaceLibrary/definetestexe.cpp index e7a10c1..30f2925 100644 --- a/Tests/InterfaceLibrary/definetestexe.cpp +++ b/Tests/InterfaceLibrary/definetestexe.cpp @@ -15,7 +15,9 @@ #error Expected IFACE_HEADER_BUILDDIR #endif +extern int sub(); + int main(int,char**) { - return 0; + return sub(); } diff --git a/Tests/InterfaceLibrary/ifacedir/CMakeLists.txt b/Tests/InterfaceLibrary/ifacedir/CMakeLists.txt new file mode 100644 index 0000000..228715e --- /dev/null +++ b/Tests/InterfaceLibrary/ifacedir/CMakeLists.txt @@ -0,0 +1,8 @@ +add_library(imp::iface INTERFACE IMPORTED) +set_property(TARGET imp::iface APPEND PROPERTY COMPATIBLE_INTERFACE_BOOL SOMEPROP) +set_property(TARGET imp::iface PROPERTY INTERFACE_SOMEPROP ON) +set_property(TARGET imp::iface PROPERTY INTERFACE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sub.cpp) + +add_library(subiface INTERFACE) +target_link_libraries(subiface INTERFACE imp::iface) +set_property(TARGET subiface PROPERTY INTERFACE_SOMEPROP ON) diff --git a/Tests/InterfaceLibrary/ifacedir/sub.cpp b/Tests/InterfaceLibrary/ifacedir/sub.cpp new file mode 100644 index 0000000..165a66a --- /dev/null +++ b/Tests/InterfaceLibrary/ifacedir/sub.cpp @@ -0,0 +1 @@ +int sub() { return 0; } diff --git a/Tests/JacocoCoverage/Coverage/src/main/java/org/cmake/CoverageTest.java b/Tests/JacocoCoverage/Coverage/src/main/java/org/cmake/CoverageTest.java new file mode 100644 index 0000000..4fb43c6 --- /dev/null +++ b/Tests/JacocoCoverage/Coverage/src/main/java/org/cmake/CoverageTest.java @@ -0,0 +1,52 @@ +package org.cmake.Coverage; + +import java.io.Serializable; +import java.util.Map; +import java.util.List; +import java.awt.*; + +public class CoverageTest { + + public static String VarOne = "test1"; + public static String VarTwo = "test2"; + private Integer IntOne = 4; + + public static Boolean equalsVarOne(String inString) { + + if(VarOne.equals(inString)){ + return true; + } + else { + return false; + } + } + + public static boolean equalsVarTwo(String inString){ + + if(VarTwo.equals(inString)){ + return true; + } + else { + return false; + } + } + + private Integer timesIntOne(Integer inVal){ + + return inVal * IntOne; + } + + public static boolean whileLoop(Integer StopInt){ + + Integer i = 0; + while(i < StopInt){ + i=i+1; + } + if (i.equals(5)){ + return true; + } + else { + return false; + } + } +} diff --git a/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml b/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml new file mode 100644 index 0000000..49c3e87 --- /dev/null +++ b/Tests/JacocoCoverage/Coverage/target/site/jacoco.xml @@ -0,0 +1 @@ +<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.0//EN" "report.dtd"><report name="Coverage"><sessioninfo id="vagrant-ubuntu-precise-32-f1c264e9" start="1402427058670" dump="1402427059269"/><package name="org/cmake"><class name="org/cmake/Coverage/CoverageTest"><method name="<init>" desc="()V" line="8"><counter type="INSTRUCTION" missed="7" covered="0"/><counter type="LINE" missed="2" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="equalsVarOne" desc="(Ljava/lang/String;)Ljava/lang/Boolean;" line="16"><counter type="INSTRUCTION" missed="3" covered="7"/><counter type="BRANCH" missed="1" covered="1"/><counter type="LINE" missed="1" covered="2"/><counter type="COMPLEXITY" missed="1" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="equalsVarTwo" desc="(Ljava/lang/String;)Z" line="26"><counter type="INSTRUCTION" missed="0" covered="8"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="3"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><method name="timesIntOne" desc="(Ljava/lang/Integer;)Ljava/lang/Integer;" line="36"><counter type="INSTRUCTION" missed="8" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="whileLoop" desc="(Ljava/lang/Integer;)Z" line="41"><counter type="INSTRUCTION" missed="0" covered="24"/><counter type="BRANCH" missed="0" covered="4"/><counter type="LINE" missed="0" covered="6"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="1"/></method><method name="<clinit>" desc="()V" line="10"><counter type="INSTRUCTION" missed="0" covered="5"/><counter type="LINE" missed="0" covered="2"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="18" covered="44"/><counter type="BRANCH" missed="1" covered="7"/><counter type="LINE" missed="4" covered="13"/><counter type="COMPLEXITY" missed="3" covered="7"/><counter type="METHOD" missed="2" covered="4"/><counter type="CLASS" missed="0" covered="1"/></class><sourcefile name="CoverageTest.java"><line nr="8" mi="2" ci="0" mb="0" cb="0"/><line nr="10" mi="0" ci="2" mb="0" cb="0"/><line nr="11" mi="0" ci="3" mb="0" cb="0"/><line nr="12" mi="5" ci="0" mb="0" cb="0"/><line nr="16" mi="0" ci="4" mb="1" cb="1"/><line nr="17" mi="0" ci="3" mb="0" cb="0"/><line nr="20" mi="3" ci="0" mb="0" cb="0"/><line nr="26" mi="0" ci="4" mb="0" cb="2"/><line nr="27" mi="0" ci="2" mb="0" cb="0"/><line nr="30" mi="0" ci="2" mb="0" cb="0"/><line nr="36" mi="8" ci="0" mb="0" cb="0"/><line nr="41" mi="0" ci="3" mb="0" cb="0"/><line nr="42" mi="0" ci="5" mb="0" cb="2"/><line nr="43" mi="0" ci="7" mb="0" cb="0"/><line nr="45" mi="0" ci="5" mb="0" cb="2"/><line nr="46" mi="0" ci="2" mb="0" cb="0"/><line nr="49" mi="0" ci="2" mb="0" cb="0"/><counter type="INSTRUCTION" missed="18" covered="44"/><counter type="BRANCH" missed="1" covered="7"/><counter type="LINE" missed="4" covered="13"/><counter type="COMPLEXITY" missed="3" covered="7"/><counter type="METHOD" missed="2" covered="4"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><counter type="INSTRUCTION" missed="18" covered="44"/><counter type="BRANCH" missed="1" covered="7"/><counter type="LINE" missed="4" covered="13"/><counter type="COMPLEXITY" missed="3" covered="7"/><counter type="METHOD" missed="2" covered="4"/><counter type="CLASS" missed="0" covered="1"/></package><counter type="INSTRUCTION" missed="18" covered="44"/><counter type="BRANCH" missed="1" covered="7"/><counter type="LINE" missed="4" covered="13"/><counter type="COMPLEXITY" missed="3" covered="7"/><counter type="METHOD" missed="2" covered="4"/><counter type="CLASS" missed="0" covered="1"/></report> diff --git a/Tests/JacocoCoverage/DartConfiguration.tcl.in b/Tests/JacocoCoverage/DartConfiguration.tcl.in new file mode 100644 index 0000000..cc10e9c --- /dev/null +++ b/Tests/JacocoCoverage/DartConfiguration.tcl.in @@ -0,0 +1,8 @@ +# This file is configured by CMake automatically as DartConfiguration.tcl +# If you choose not to use CMake, this file may be hand configured, by +# filling in the required variables. + + +# Configuration directories and files +SourceDirectory: ${CMake_BINARY_DIR}/Testing/JacocoCoverage +BuildDirectory: ${CMake_BINARY_DIR}/Testing/JacocoCoverage diff --git a/Tests/MacRuntimePath/CMakeLists.txt b/Tests/MacRuntimePath/CMakeLists.txt index 5c7b921..eeb3653 100644 --- a/Tests/MacRuntimePath/CMakeLists.txt +++ b/Tests/MacRuntimePath/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required (VERSION 2.8) project(MacRuntimePath) -if(NOT DEFINED CMAKE_TEST_MAKEPROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") - set(CMAKE_TEST_MAKEPROGRAM "${CMAKE_MAKE_PROGRAM}") +if(NOT DEFINED CMake_TEST_NESTED_MAKE_PROGRAM AND NOT CMAKE_GENERATOR MATCHES "Visual Studio") + set(CMake_TEST_NESTED_MAKE_PROGRAM "${CMAKE_MAKE_PROGRAM}") endif() # Wipe out the install tree to make sure the exporter works. diff --git a/Tests/MacRuntimePath/InitialCache.cmake.in b/Tests/MacRuntimePath/InitialCache.cmake.in index 3dc9041..a9f6a3c 100644 --- a/Tests/MacRuntimePath/InitialCache.cmake.in +++ b/Tests/MacRuntimePath/InitialCache.cmake.in @@ -1,4 +1,4 @@ -set(CMAKE_MAKE_PROGRAM "@CMAKE_TEST_MAKEPROGRAM@" CACHE FILEPATH "Make Program") +set(CMAKE_MAKE_PROGRAM "@CMake_TEST_NESTED_MAKE_PROGRAM@" CACHE FILEPATH "Make Program") set(CMAKE_C_COMPILER "@CMAKE_C_COMPILER@" CACHE STRING "C Compiler") set(CMAKE_C_FLAGS "@CMAKE_C_FLAGS@" CACHE STRING "C Flags") set(CMAKE_C_FLAGS_DEBUG "@CMAKE_C_FLAGS_DEBUG@" CACHE STRING "C Flags") diff --git a/Tests/Module/ExternalData/CMakeLists.txt b/Tests/Module/ExternalData/CMakeLists.txt index 5a6f3d5..ebca48e 100644 --- a/Tests/Module/ExternalData/CMakeLists.txt +++ b/Tests/Module/ExternalData/CMakeLists.txt @@ -23,6 +23,8 @@ ExternalData_Add_Test(Data1 COMMAND ${CMAKE_COMMAND} -D Data=DATA{Data.dat} ${Data1CheckSpaces} + -D DataMissing=DATA{DataMissing.dat} + -D DataMissingWithAssociated=DATA{DataMissing.dat,Data.dat} -D SeriesA=DATA{SeriesA.dat,:} -D SeriesB=DATA{SeriesB.dat,:} -D SeriesC=DATA{SeriesC.dat,:} diff --git a/Tests/Module/ExternalData/Data1Check.cmake b/Tests/Module/ExternalData/Data1Check.cmake index 5770245..485b5c6 100644 --- a/Tests/Module/ExternalData/Data1Check.cmake +++ b/Tests/Module/ExternalData/Data1Check.cmake @@ -8,6 +8,28 @@ if(DEFINED DataSpace) message(SEND_ERROR "Input file:\n ${DataSpace}\ndoes not have expected content, but [[${lines}]]") endif() endif() +if(DataMissing) + if(EXISTS "${DataMissing}") + message(SEND_ERROR + "Input file:\n" + " ${DataMissing}\n" + "exists but should not." + ) + endif() +else() + message(SEND_ERROR "DataMissing is not set!") +endif() +if(DataMissingWithAssociated) + if(EXISTS "${DataMissingWithAssociated}") + message(SEND_ERROR + "Input file:\n" + " ${DataMissingWithAssociated}\n" + "exists but should not." + ) + endif() +else() + message(SEND_ERROR "DataMissingWithAssociated is not set!") +endif() set(SeriesAn1 "1\\.dat") set(SeriesBn1 "_1\\.dat") set(SeriesCn1 "\\.1\\.dat") diff --git a/Tests/Module/FindDependency/CMakeLists.txt b/Tests/Module/FindDependency/CMakeLists.txt new file mode 100644 index 0000000..dcb998a --- /dev/null +++ b/Tests/Module/FindDependency/CMakeLists.txt @@ -0,0 +1,11 @@ + +cmake_minimum_required(VERSION 3.0) +project(FindDependency) + +set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/packages") + +find_package(Pack1 REQUIRED) +find_package(Pack4 4.3 EXACT REQUIRED) + +add_executable(FindDependency main.cpp) +target_link_libraries(FindDependency Pack1::Lib Pack4::Lib) diff --git a/Tests/Module/FindDependency/main.cpp b/Tests/Module/FindDependency/main.cpp new file mode 100644 index 0000000..50c5958 --- /dev/null +++ b/Tests/Module/FindDependency/main.cpp @@ -0,0 +1,29 @@ + +#ifndef HAVE_PACK1 +#error Expected HAVE_PACK1 +#endif + +#ifndef HAVE_PACK2 +#error Expected HAVE_PACK2 +#endif + +#ifndef HAVE_PACK3 +#error Expected HAVE_PACK3 +#endif + +#ifndef HAVE_PACK4 +#error Expected HAVE_PACK4 +#endif + +#ifndef HAVE_PACK5 +#error Expected HAVE_PACK5 +#endif + +#ifndef HAVE_PACK6 +#error Expected HAVE_PACK6 +#endif + +int main(int argc, char** argv) +{ + return 0; +} diff --git a/Tests/Module/FindDependency/packages/Pack1/Pack1Config.cmake b/Tests/Module/FindDependency/packages/Pack1/Pack1Config.cmake new file mode 100644 index 0000000..ff533c2 --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack1/Pack1Config.cmake @@ -0,0 +1,9 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack2 2.3) +find_dependency(Pack3) + +add_library(Pack1::Lib INTERFACE IMPORTED) +set_property(TARGET Pack1::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK1) +set_property(TARGET Pack1::Lib PROPERTY INTERFACE_LINK_LIBRARIES Pack2::Lib Pack3::Lib) diff --git a/Tests/Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake new file mode 100644 index 0000000..dfb7b6c --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake @@ -0,0 +1,11 @@ + +set(PACKAGE_VERSION "1.3") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/Tests/Module/FindDependency/packages/Pack2/Pack2Config.cmake b/Tests/Module/FindDependency/packages/Pack2/Pack2Config.cmake new file mode 100644 index 0000000..672288e --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack2/Pack2Config.cmake @@ -0,0 +1,5 @@ + +set(PACK2_VAR ON) + +add_library(Pack2::Lib INTERFACE IMPORTED) +set_property(TARGET Pack2::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK2) diff --git a/Tests/Module/FindDependency/packages/Pack2/Pack2ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack2/Pack2ConfigVersion.cmake new file mode 100644 index 0000000..42f58c0 --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack2/Pack2ConfigVersion.cmake @@ -0,0 +1,11 @@ + +set(PACKAGE_VERSION "2.4") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/Tests/Module/FindDependency/packages/Pack3/Pack3Config.cmake b/Tests/Module/FindDependency/packages/Pack3/Pack3Config.cmake new file mode 100644 index 0000000..25c32f3 --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack3/Pack3Config.cmake @@ -0,0 +1,5 @@ + +set(PACK3_VAR ON) + +add_library(Pack3::Lib INTERFACE IMPORTED) +set_property(TARGET Pack3::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK3) diff --git a/Tests/Module/FindDependency/packages/Pack3/Pack3ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack3/Pack3ConfigVersion.cmake new file mode 100644 index 0000000..870f747 --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack3/Pack3ConfigVersion.cmake @@ -0,0 +1,11 @@ + +set(PACKAGE_VERSION "1.4") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/Tests/Module/FindDependency/packages/Pack4/Pack4Config.cmake b/Tests/Module/FindDependency/packages/Pack4/Pack4Config.cmake new file mode 100644 index 0000000..62fddb1 --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack4/Pack4Config.cmake @@ -0,0 +1,9 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack5 3.1) # Actual version is 3.3. EXACT not propagated. +find_dependency(Pack6 5.5 EXACT) + +add_library(Pack4::Lib INTERFACE IMPORTED) +set_property(TARGET Pack4::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK4) +set_property(TARGET Pack4::Lib PROPERTY INTERFACE_LINK_LIBRARIES Pack5::Lib Pack6::Lib) diff --git a/Tests/Module/FindDependency/packages/Pack4/Pack4ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack4/Pack4ConfigVersion.cmake new file mode 100644 index 0000000..ae982b0 --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack4/Pack4ConfigVersion.cmake @@ -0,0 +1,11 @@ + +set(PACKAGE_VERSION "4.3") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/Tests/Module/FindDependency/packages/Pack5/Pack5Config.cmake b/Tests/Module/FindDependency/packages/Pack5/Pack5Config.cmake new file mode 100644 index 0000000..1edda9a --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack5/Pack5Config.cmake @@ -0,0 +1,3 @@ + +add_library(Pack5::Lib INTERFACE IMPORTED) +set_property(TARGET Pack5::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK5) diff --git a/Tests/Module/FindDependency/packages/Pack5/Pack5ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack5/Pack5ConfigVersion.cmake new file mode 100644 index 0000000..e944f96 --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack5/Pack5ConfigVersion.cmake @@ -0,0 +1,11 @@ + +set(PACKAGE_VERSION "3.3") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/Tests/Module/FindDependency/packages/Pack6/Pack6Config.cmake b/Tests/Module/FindDependency/packages/Pack6/Pack6Config.cmake new file mode 100644 index 0000000..d6c85fb --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack6/Pack6Config.cmake @@ -0,0 +1,3 @@ + +add_library(Pack6::Lib INTERFACE IMPORTED) +set_property(TARGET Pack6::Lib PROPERTY INTERFACE_COMPILE_DEFINITIONS HAVE_PACK6) diff --git a/Tests/Module/FindDependency/packages/Pack6/Pack6ConfigVersion.cmake b/Tests/Module/FindDependency/packages/Pack6/Pack6ConfigVersion.cmake new file mode 100644 index 0000000..0dd00d2 --- /dev/null +++ b/Tests/Module/FindDependency/packages/Pack6/Pack6ConfigVersion.cmake @@ -0,0 +1,11 @@ + +set(PACKAGE_VERSION "5.5") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/Tests/Module/GenerateExportHeader/CMakeLists.txt b/Tests/Module/GenerateExportHeader/CMakeLists.txt index bf867a9..b52c44d 100644 --- a/Tests/Module/GenerateExportHeader/CMakeLists.txt +++ b/Tests/Module/GenerateExportHeader/CMakeLists.txt @@ -57,6 +57,15 @@ endif() include(GenerateExportHeader) +set(CMAKE_CXX_STANDARD 98) + +# Those versions of the HP compiler that need a flag to get proper C++98 +# template support also need a flag to use the newer C++ library. +if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND + CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA") +endif () + add_subdirectory(lib_shared_and_static) add_compiler_export_flags() diff --git a/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt new file mode 100644 index 0000000..645cc65 --- /dev/null +++ b/Tests/Module/WriteCompilerDetectionHeader/CMakeLists.txt @@ -0,0 +1,88 @@ +cmake_minimum_required(VERSION 3.0.0) +project(WriteCompilerDetectionHeader) + +set(CMAKE_INCLUDE_CURRENT_DIR ON) + +include(WriteCompilerDetectionHeader) + +get_property(cxx_known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES) +get_property(c_known_features GLOBAL PROPERTY CMAKE_C_KNOWN_FEATURES) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h" + PREFIX TEST + COMPILERS GNU Clang + VERSION 3.1 + PROLOG "// something" + EPILOG "// more" + FEATURES + ${cxx_known_features} ${c_known_features} +) + +if (NOT CMAKE_CXX_COMPILE_FEATURES AND NOT CMAKE_C_COMPILE_FEATURES) + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp" + "int main(int,char**) { return 0; }\n" + ) + add_executable(WriteCompilerDetectionHeader "${CMAKE_CURRENT_BINARY_DIR}/dummy.cpp") + + include(CheckCXXSourceCompiles) + check_cxx_source_compiles("#include \"${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h\"\nint main() { return 0; }\n" + file_include_works + ) + if (file_include_works) + message(SEND_ERROR "Inclusion of ${CMAKE_CURRENT_BINARY_DIR}/test_compiler_detection.h was expected to cause an error, but did not.") + endif() + return() +endif() + +string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" COMPILER_VERSION_MAJOR "${CMAKE_CXX_COMPILER_VERSION}") +string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" COMPILER_VERSION_MINOR "${CMAKE_CXX_COMPILER_VERSION}") +string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" COMPILER_VERSION_PATCH "${CMAKE_CXX_COMPILER_VERSION}") + +macro(set_defines target true_defs false_defs) + set(defines) + foreach(def ${true_defs}) + list(APPEND defines ${def}=1) + endforeach() + foreach(def ${false_defs}) + list(APPEND defines ${def}=0) + endforeach() + target_compile_definitions(${target} + PRIVATE + ${defines} + EXPECTED_COMPILER_VERSION_MAJOR=${COMPILER_VERSION_MAJOR} + EXPECTED_COMPILER_VERSION_MINOR=${COMPILER_VERSION_MINOR} + EXPECTED_COMPILER_VERSION_PATCH=${COMPILER_VERSION_PATCH} + ) +endmacro() + +if (CMAKE_CXX_COMPILER_ID STREQUAL GNU + OR CMAKE_CXX_COMPILER_ID STREQUAL Clang) + # False for C++98 mode. + list(APPEND false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) + list(APPEND false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) +endif() + +add_executable(WriteCompilerDetectionHeader main.cpp) +set_property(TARGET WriteCompilerDetectionHeader PROPERTY CXX_STANDARD 98) +set_defines(WriteCompilerDetectionHeader "${true_defs}" "${false_defs}") + +if(MSVC) + return() # MSVC has only one mode. +endif() + +# Since GNU 4.7 +if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_delegating_constructors;") + list(APPEND true_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) + list(REMOVE_ITEM false_defs EXPECTED_COMPILER_CXX_DELEGATING_CONSTRUCTORS) +endif() + +# Since GNU 4.4 +if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";cxx_variadic_templates;") + list(APPEND true_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) + list(REMOVE_ITEM false_defs EXPECTED_COMPILER_CXX_VARIADIC_TEMPLATES) +endif() + +add_executable(WriteCompilerDetectionHeader_11 main.cpp) +set_property(TARGET WriteCompilerDetectionHeader_11 PROPERTY CXX_STANDARD 11) +set_defines(WriteCompilerDetectionHeader_11 "${true_defs}" "${false_defs}") diff --git a/Tests/Module/WriteCompilerDetectionHeader/main.cpp b/Tests/Module/WriteCompilerDetectionHeader/main.cpp new file mode 100644 index 0000000..b807ad5 --- /dev/null +++ b/Tests/Module/WriteCompilerDetectionHeader/main.cpp @@ -0,0 +1,31 @@ + +#include "test_compiler_detection.h" + +#define JOIN_IMPL(A, B) A ## B +#define JOIN(A, B) JOIN_IMPL(A, B) +#define CHECK(FEATURE) (JOIN(TEST_COMPILER_, FEATURE) == JOIN(EXPECTED_COMPILER_, FEATURE)) + +#if !CHECK(CXX_DELEGATING_CONSTRUCTORS) +#error cxx_delegating_constructors expected availability did not match. +#endif + +#if !CHECK(CXX_VARIADIC_TEMPLATES) +#error cxx_variadic_templates expected availability did not match. +#endif + +#if !CHECK(VERSION_MAJOR) +#error Compiler major version did not match. +#endif + +#if !CHECK(VERSION_MINOR) +#error Compiler minor version did not match. +#endif + +#if !CHECK(VERSION_PATCH) +#error Compiler patch version did not match. +#endif + +int main() +{ + return 0; +} diff --git a/Tests/MumpsCoverage/Accounts_ReceivableTest.cmcov b/Tests/MumpsCoverage/Accounts_ReceivableTest.cmcov deleted file mode 100644 index c3b3342..0000000 --- a/Tests/MumpsCoverage/Accounts_ReceivableTest.cmcov +++ /dev/null @@ -1,304 +0,0 @@ -Routine,Line,RtnLine,Code
-DDIOL,1,0,"DDIOL ;SFISC/MKO-THE LOADER ;1:53 PM 12 Sep 1995"
-,2,0," ;;22.0;VA FileMan;;Mar 30, 1999"
-,3,0," ;Per VHA Directive 10-93-142, this routine should not be modified."
-,4,0," ;"
-,5,0,"EN(A,G,FMT) ;Write the text contained in local array A or global array G"
-,6,0," ;If one string passed, use format FMT"
-,7,0," N %,Y,DINAKED"
-,8,0," S DINAKED=$$LGR^%ZOSV"
-,9,0," ;"
-,10,0," S:'$D(A) A="""""
-,11,0," I $G(A)="""",$D(A)<9,$G(FMT)="""",$G(G)'?1""^""1A.7AN,$G(G)'?1""^""1A.7AN1""("".E1"")"" Q"
-,12,0," ;"
-,13,0," G:$D(DDS) SM"
-,14,0," G:$D(DIQUIET) LD"
-,15,0," ;"
-,16,0," N F,I,S"
-,17,0," I $D(A)=1,$G(G)="""" D"
-,18,0," . S F=$S($G(FMT)]"""":FMT,1:""!"")"
-,19,0," . W @F,A"
-,20,0," ;"
-,21,0," E I $D(A)>9 S I=0 F S I=$O(A(I)) Q:I'=+$P(I,""E"") D"
-,22,0," . S F=$G(A(I,""F""),""!"") S:F="""" F=""?0"""
-,23,0," . W @F,$G(A(I))"
-,24,0," ;"
-,25,0," E S I=0 F S I=$O(@G@(I)) Q:I'=+$P(I,""E"") D"
-,26,0," . S S=$G(@G@(I,0),$G(@G@(I)))"
-,27,0," . S F=$G(@G@(I,""F""),""!"") S:F="""" F=""?0"""
-,28,0," . W @F,S"
-,29,0," ;"
-,30,0," I DINAKED]"""" S DINAKED=$S(DINAKED["""""""""""":$O(@DINAKED),1:$D(@DINAKED))"
-,31,0," Q"
-,32,0," ;"
-,33,0,"LD ;Load text into ^TMP"
-,34,0," N I,N,T"
-,35,0," S T=$S($G(DDIOLFLG)[""H"":""DIHELP"",1:""DIMSG"")"
-,36,0," S N=$O(^TMP(T,$J,"" ""),-1)"
-,37,0," ;"
-,38,0," I $D(A)=1,$G(G)="""" D"
-,39,0," . D LD1(A,$S($G(FMT)]"""":FMT,1:""!""))"
-,40,0," ;"
-,41,0," E I $D(A)>9 S I=0 F S I=$O(A(I)) Q:I'=+$P(I,""E"") D"
-,42,0," . D LD1($G(A(I)),$G(A(I,""F""),""!""))"
-,43,0," ;"
-,44,0," E S I=0 F S I=$O(@G@(I)) Q:I'=+$P(I,""E"") D"
-,45,0," . D LD1($G(@G@(I),$G(@G@(I,0))),$G(@G@(I,""F""),""!""))"
-,46,0," ;"
-,47,0," K:'N @T S:N @T=N"
-,48,0," I DINAKED]"""" S DINAKED=$S(DINAKED["""""""""""":$O(@DINAKED),1:$D(@DINAKED))"
-,49,0," Q"
-,50,0," ;"
-,51,0,"LD1(S,F) ;Load string S, with format F"
-,52,0," ;In: N and T"
-,53,0," N C,J,L"
-,54,0," S:S[$C(7) S=$TR(S,$C(7),"""")"
-,55,0," F J=1:1:$L(F,""!"")-1 S N=N+1,^TMP(T,$J,N)="""""
-,56,0," S:'N N=1"
-,57,0," S:F[""?"" @(""C=""_$P(F,""?"",2))"
-,58,0," S L=$G(^TMP(T,$J,N))"
-,59,0," S ^TMP(T,$J,N)=L_$J("""",$G(C)-$L(L))_S"
-,60,0," Q"
-,61,0," ;"
-,62,0,"SM ;Print text in ScreenMan's Command Area"
-,63,0," I $D(DDSID),$D(DTOUT)!$D(DUOUT) G SMQ"
-,64,0," N DDIOL"
-,65,0," S DDIOL=1"
-,66,0," ;"
-,67,0," I $D(A)=1&($G(G)="""")!($D(A)>9) D"
-,68,0," . D MSG^DDSMSG(.A,"""",$G(FMT))"
-,69,0," E I $D(@G@(+$O(@G@(0)),0))#2 D"
-,70,0," . D WP^DDSMSG(G)"
-,71,0," E D HLP^DDSMSG(G)"
-,72,0," ;"
-,73,0,"SMQ I DINAKED]"""" S DINAKED=$S(DINAKED["""""""""""":$O(@DINAKED),1:$D(@DINAKED))"
-,74,0," Q"
-Totals for DDIOL,,0,
-XINDEX,1,0,"XINDEX ;ISC/REL,GFT,GRK,RWF - INDEX & CROSS-REFERENCE ;08/04/08 13:19"
-,2,1," ;;7.3;TOOLKIT;**20,27,48,61,66,68,110,121,128**;Apr 25, 1995;Build 1"
-,3,0," ; Per VHA Directive 2004-038, this routine should not be modified."
-,4,1," G ^XINDX6"
-,5,107216,"SEP F I=1:1 S CH=$E(LIN,I) D QUOTE:CH=Q Q:"" ""[CH"
-,6,107216," S ARG=$E(LIN,1,I-1) S:CH="" "" I=I+1 S LIN=$E(LIN,I,999) Q"
-,7,36371,"QUOTE F I=I+1:1 S CH=$E(LIN,I) Q:CH=""""!(CH=Q)"
-,8,36371," Q:CH]"""" S ERR=6 G ^XINDX1"
-,9,0,"ALIVE ;enter here from taskman"
-,10,1," D SETUP^XINDX7 ;Get ready to process"
-,11,468,"A2 S RTN=$O(^UTILITY($J,RTN)) G ^XINDX5:RTN="""""
-,12,467," S INDLC=(RTN?1""|""1.4L.NP) D LOAD:'INDLC"
-,13,467," I $D(ZTQUEUED),$$S^%ZTLOAD S RTN=""~"",IND(""QUIT"")=1,ZTSTOP=1 G A2"
-,14,467," I 'INDDS,INDLC W !!?10,""Data Dictionaries"",! S INDDS=1"
-,15,467," D BEG"
-,16,467," G A2"
-,17,0," ;"
-,18,467,"LOAD S X=RTN,XCNP=0,DIF=""^UTILITY(""_$J_"",1,RTN,0,"" X ^%ZOSF(""TEST"") Q:'$T X ^%ZOSF(""LOAD"") S ^UTILITY($J,1,RTN,0,0)=XCNP-1"
-,19,467," I $D(^UTILITY($J,1,RTN,0,0)) S ^UTILITY($J,1,RTN,""RSUM"")=""B""_$$SUMB^XPDRSUM($NA(^UTILITY($J,1,RTN,0)))"
-,20,467," Q"
-,21,0,"BEG ;"
-,22,467," S %=INDLC*5 W:$X+10+%>IOM ! W RTN,$J("""",10+%-$L(RTN))"
-,23,467," S (IND(""DO""),IND(""SZT""),IND(""SZC""),LABO)=0,LC=$G(^UTILITY($J,1,RTN,0,0))"
-,24,467," I LC="""" W !,"">>>Routine '"",RTN,""' not found <<<"",! Q"
-,25,467," S TXT="""",LAB=$P(^UTILITY($J,1,RTN,0,1,0),"" "") I RTN'=$P(LAB,""("") D E^XINDX1(17)"
-,26,467," I 'INDLC,LAB[""("" D E^XINDX1(55) S LAB=$P(LAB,""("")"
-,27,0," ;if M routine(not compiled template or DD) and has more than 2 lines, check lines 1 & 2"
-,28,467," I 'INDLC,LC>2 D"
-,29,467," . N LABO S LABO=1"
-,30,467," . S LIN=$G(^UTILITY($J,1,RTN,0,1,0)),TXT=1"
-,31,0," . ;check 1st line (site/dev - ) patch 128"
-,32,467," . I $P(LIN,"";"",2,4)'?.E1""/"".E.1""-"".E D E^XINDX1(62)"
-,33,467," . S LIN=$G(^UTILITY($J,1,RTN,0,2,0)),TXT=2"
-,34,0," . ;check 2nd line (;;nn.nn[TV]nn;package;.anything)"
-,35,467," . I $P(LIN,"";"",3,99)'?1.2N1"".""1.2N.1(1""T"",1""V"").2N1"";""1A.AP1"";"".E D E^XINDX1(44) ;patch 121"
-,36,467," . I $L(INP(11)) X INP(11) ;Version number check"
-,37,467," . I $L(INP(12)) X INP(12) ;Patch number check"
-,38,467,"B5 F TXT=1:1:LC S LIN=^UTILITY($J,1,RTN,0,TXT,0),LN=$L(LIN),IND(""SZT"")=IND(""SZT"")+LN+2 D LN,ST ;Process Line"
-,39,467," S LAB="""",LABO=0,TXT=0,^UTILITY($J,1,RTN,0)=IND(""SZT"")_""^""_LC_""^""_IND(""SZC"")"
-,40,467," I IND(""SZT"")>INP(""MAX""),'INDLC S ERR=35,ERR(1)=IND(""SZT"") D ^XINDX1"
-,41,467," I IND(""SZT"")-IND(""SZC"")>INP(""CMAX""),'INDLC S ERR=58,ERR(1)=IND(""SZT"")-IND(""SZC"") D ^XINDX1"
-,42,467," D POSTRTN"
-,43,467," Q"
-,44,0," ;Proccess one line, LN = Length, LIN = Line."
-,45,44620,"LN K V S (ARG,GRB,IND(""COM""),IND(""DOL""),IND(""F""))="""",X=$P(LIN,"" "")"
-,46,44620," I '$L(X) S LABO=LABO+1 G CD"
-,47,5073," S (IND(""COM""),LAB)=$P(X,""(""),ARG=$P($P(X,""("",2),"")""),LABO=0,IND(""PP"")=X?1.8E1""("".E1"")"""
-,48,5073," D:$L(ARG) NE^XINDX3 ;Process formal parameters as New list."
-,49,5073," I 'INDLC,'$$VT^XINDX2(LAB) D E^XINDX1($S(LAB=$$CASE^XINDX52(LAB):37,1:55)) ;Check for bad labels"
-,50,5073," I $D(^UTILITY($J,1,RTN,""T"",LAB)) D E^XINDX1(15) G CD ;DUP label"
-,51,5073," S ^UTILITY($J,1,RTN,""T"",LAB)="""""
-,52,44620,"CD I LN>245 D:'(LN=246&($E(RTN,1,3)=""|dd"")) E^XINDX1(19) ;patch 119"
-,53,44620," D:LIN'?1.ANP E^XINDX1(18)"
-,54,44620," S LIN=$P(LIN,"" "",2,999),IND(""LCC"")=1"
-,55,44620," I LIN="""" D E^XINDX1(42) Q ;Blank line ;p110"
-,56,44620," S I=0 ;Watch the scope of I, counts dots"
-,57,44620," I "" .""[$E(LIN) D S X=$L($E(LIN,1,I),""."")-1,LIN=$E(LIN,I,999)"
-,58,10770," . F I=1:1:245 Q:"". ""'[$E(LIN,I)"
-,59,10770," . Q"
-,60,0," ;check dots against Do level IND(""DO""), IND(""DOL"")=dot level"
-,61,44620," D:'I&$G(IND(""DO1"")) E^XINDX1(51) S IND(""DO1"")=0 S:'I IND(""DO"")=0"
-,62,44620," I I D:X>IND(""DO"") E^XINDX1(51) S (IND(""DO""),IND(""DOL""))=X"
-,63,0," ;Count Comment lines, skip ;; lines"
-,64,44620," I $E(LIN)="";"",$E(LIN,2)'="";"" S IND(""SZC"")=IND(""SZC"")+$L(LIN) ;p110"
-,65,0," ;Process commands on line."
-,66,116081,"EE I LIN="""" D ^XINDX2 Q"
-,67,71461," S COM=$E(LIN),GK="""",ARG="""""
-,68,71461," I COM="";"" S LIN="""" G EE ;p110"
-,69,54870," I COM="" "" S ERR=$S(LIN?1."" "":13,1:0),LIN=$S(ERR:"""",1:$E(LIN,2,999)) D:ERR ^XINDX1 G EE"
-,70,53608," D SEP"
-,71,53608," S CM=$P(ARG,"":"",1),POST=$P(ARG,"":"",2,999),IND(""COM"")=IND(""COM"")_$C(9)_COM,ERR=48"
-,72,53608," D:ARG["":""&(POST']"""") ^XINDX1 S:POST]"""" GRB=GRB_$C(9)_POST,IND(""COM"")=IND(""COM"")_"":"""
-,73,0," ;SAC now allows lowercase commands"
-,74,53608," I CM?.E1L.E S CM=$$CASE^XINDX52(CM),COM=$E(CM) ;I IND(""LCC"") S IND(""LCC"")=0 D E^XINDX1(47)"
-,75,53608," I CM="""" D E^XINDX1(21) G EE ;Missing command"
-,76,53608," S CX=$G(IND(""CMD"",CM)) I CX="""" D G:CX="""" EE"
-,77,0," . I $E(CM)=""Z"" S CX=""^Z"" Q ;Proccess Z commands"
-,78,0," . D E^XINDX1(1) S LIN="""" Q"
-,79,53608," S CX=$P(CX,""^"",2,9)"
-,80,53608," D SEP I '$L(LIN),CH="" "" D E^XINDX1(13) ;trailing space"
-,81,53608," I ARG="""",""CGJMORSUWX""[COM S ERR=49 G ^XINDX1"
-,82,53608," I CX>0 D E^XINDX1(CX) S CX="""""
-,83,53608," D:$L(CX) @CX S:ARG'="""" GRB=GRB_$C(9)_ARG G EE"
-,84,0,"B S ERR=25 G ^XINDX1"
-,85,0,"C S ERR=29 G ^XINDX1"
-,86,0,"D G DG1^XINDX4"
-,87,0,"E Q:ARG="""" S ERR=7 G ^XINDX1"
-,88,1559,"F G:ARG]"""" FR^XINDX4 S IND(""F"")=1 Q"
-,89,1932,"G G DG^XINDX4"
-,90,11,"H Q:ARG'="""" S ERR=32 G ^XINDX1"
-,91,0,"J S ERR=36,ARG="""" G ^XINDX1"
-,92,2218,"K S ERR=$S(ARG?1""("".E:22,ARG?."" "":23,1:0) D:ERR ^XINDX1"
-,93,2218," G KL^XINDX3"
-,94,259,"L G LO^XINDX4"
-,95,30,"M G S^XINDX3"
-,96,1721,"N G NE^XINDX3"
-,97,0,"O S ERR=34 D ^XINDX1,O^XINDX3 Q"
-,98,7762,"Q Q:ARG="""" G Q^XINDX4"
-,99,85,"R S RDTIME=0 G RD^XINDX3"
-,100,17549,"S G S^XINDX3"
-,101,0,"TR Q ;What to process. p110"
-,102,72,"U S ARG=$P(ARG,"":"") Q"
-,103,0,"V S ARG="""",ERR=20 G ^XINDX1"
-,104,4584,"W G WR^XINDX4"
-,105,220,"X G XE^XINDX4"
-,106,0,"Z S ERR=2 D ^XINDX1 G ZC^XINDX4"
-,107,0," ;"
-,108,0," ;Save off items from line."
-,109,44620,"ST S R=LAB_$S(LABO:""+""_LABO,1:"""")"
-,110,0," ;Local variable, Global, Marked Items, Naked global, Internal ref, eXternal ref., Tag ref."
-,111,44620," S LOC="""" F S LOC=$O(V(LOC)),S="""" Q:LOC="""" F S S=$O(V(LOC,S)) Q:S="""" D SET"
-,112,44620," S ^UTILITY($J,1,RTN,""COM"",TXT)=IND(""COM"")"
-,113,44620," Q"
-,114,0," ;"
-,115,85079,"SET I V(LOC,S)]"""" F %=""!"",""~"" I V(LOC,S)[%,$G(^UTILITY($J,1,RTN,LOC,S))'[% S ^(S)=$G(^(S))_%"
-,116,85079," S %=0"
-,117,86891,"SE2 S ARG=$G(^UTILITY($J,1,RTN,LOC,S,%)) I $L(ARG)>230 S %=%+1 G SE2"
-,118,85079," S ^UTILITY($J,1,RTN,LOC,S,%)=ARG_R_V(LOC,S)_"","""
-,119,85079," Q"
-,120,0," ;"
-,121,0,"POSTRTN ;Do more overall checking"
-,122,467," N V,E,T,T1,T2"
-,123,467," S T="""" ;Check for missing Labels"
-,124,467," F S T=$O(^UTILITY($J,1,RTN,""I"",T)),T2=T Q:T="""" S T1=$G(^(T,0)) D"
-,125,2091," . Q:$E(T2,1,2)=""@("""
-,126,2044," . S:$E(T2,1,2)=""$$"" T2=$E(T2,3,99)"
-,127,2044," . I T2]"""",'$D(^UTILITY($J,1,RTN,""T"",$P(T2,""+"",1))) D"
-,128,0," . . F I=1:1:$L(T1,"","")-1 S LAB=$P(T1,"","",I),LABO=+$P(LAB,""+"",2),LAB=$P(LAB,""+""),E=14,E(1)=T D E^XINDX1(.E)"
-,129,0," . . Q"
-,130,2044," . Q"
-,131,467," S LAB="""",LABO=0 ;Check for valid label names"
-,132,467," I 'INDLC F S LAB=$O(^UTILITY($J,1,RTN,""T"",LAB)) Q:LAB="""" D"
-,133,5073," . I '$$VA^XINDX2(LAB) D E^XINDX1(55) Q"
-,134,5073," . D:'$$VT^XINDX2(LAB) E^XINDX1(37)"
-,135,5073," . Q"
-,136,467," S LAB="""",LABO=0 ;Check for valid variable names."
-,137,467," F S LAB=$O(^UTILITY($J,1,RTN,""L"",LAB)) Q:LAB="""" D"
-,138,15909," . D VLNF^XINDX3($P(LAB,""(""))"
-,139,15909," . Q"
-,140,467," Q"
-,141,0," ;"
-,142,0,"QUICK ;Quick, Just get a routine an print the results"
-,143,0," D QUICK^XINDX6()"
-,144,0," Q"
-Totals for XINDEX,,2446443,
-XINDX1,1,0,"XINDX1 ;ISC/REL,GRK,RWF - ERROR ROUTINE ;08/05/08 13:59"
-,2,2," ;;7.3;TOOLKIT;**20,61,66,68,110,121,128**;Apr 25, 1995;Build 1"
-,3,0," ; Per VHA Directive 2004-038, this routine should not be modified."
-,4,2," G A"
-,5,0,"E(ERR) ;"
-,6,75,"A N %,%1 ;TXT is the line of the error."
-,7,75," S ERTX=LAB_$S(LABO:""+""_LABO,1:"""")_$C(9),%1=$T(ERROR+ERR),ERTX=ERTX_$S(ERR:$P(%1,"";"",4,9),1:ERR) ;p110"
-,8,75," I ERTX[""|"" F %=1:1 S ERTX=$P(ERTX,""|"")_$S($D(ERR(%)):ERR(%),1:""??"")_$P(ERTX,""|"",%+1,99) Q:ERTX'[""|"""
-,9,75,"B I $P(%1,"";"",3)]"""" D Q:%1]"""" ;Don't flag kernel doing kernel."
-,10,0," . S %1=$P(%1,"";"",3)"
-,11,0," . F Q:RTN[$P(%1,"","") S %1=$P(%1,"","",2,99) ;quit if RTN[%1 or null."
-,12,0," . Q"
-,13,75," I ERR=17,$E(RTN)'=""%"",$E(LAB)=""%"" Q ;Don't flag %RTN w/o %."
-,14,0," ;Global is Error Line,tab,error tag,tab,error text"
-,15,75," S %=$G(^UTILITY($J,1,RTN,""E"",0))+1,^(0)=%,^(%)=TXT_$C(9)_ERTX"
-,16,75," Q"
-,17,0," ;"
-,18,0," ;F = Fatal, S = Standard, W = Warning, I = Info"
-,19,0,"ERROR ;"
-,20,0,"1 ;;;F - UNDEFINED COMMAND (rest of line not checked)."
-,21,0,"2 ;;;F - Non-standard (Undefined) 'Z' command."
-,22,0,"3 ;;XTRMON;F - Undefined Function."
-,23,0,"4 ;;;F - Undefined Special Variable."
-,24,0,"5 ;;;F - Unmatched Parenthesis."
-,25,0,"6 ;;;F - Unmatched Quotation Marks."
-,26,0,"7 ;;;F - ELSE Command followed by only one space."
-,27,0,"8 ;;;F - FOR Command did not contain '='."
-,28,0,"9 ;;;I - QUIT Command followed by only one space."
-,29,0,"10 ;;;F - Unrecognized argument in SET command."
-,30,0,"11 ;;;W - Invalid local variable name."
-,31,0,"12 ;;;W - Invalid global variable name."
-,32,0,"13 ;;;W - Blank(s) at end of line."
-,33,0,"14 ;;;F - Call to missing label '|' in this routine."
-,34,0,"15 ;;;W - Duplicate label. (M57)"
-,35,0,"16 ;;;F - Error in pattern code."
-,36,0,"17 ;;;W - First line label NOT routine name."
-,37,0,"18 ;;;W - Line contains a CONTROL (non-graphic) character."
-,38,0,"19 ;;;S - Line is longer than 245 bytes."
-,39,0,"20 ;;;S - View command used."
-,40,0,"21 ;;;F - General Syntax Error."
-,41,0,"22 ;;;S - Exclusive Kill."
-,42,0,"23 ;;;S - Unargumented Kill."
-,43,0,"24 ;;;S - Kill of an unsubscripted global."
-,44,0,"25 ;;;S - Break command used."
-,45,0,"26 ;;;S - Exclusive or Unargumented NEW command."
-,46,0,"27 ;;;S - $View function used."
-,47,0,"28 ;;ZOSV,ZIS,ZT;S - Non-standard $Z special variable used."
-,48,0,"29 ;;ZIS,ZTM;S - 'Close' command should be invoked through 'D ^%ZISC'."
-,49,0,"30 ;;;S - LABEL+OFFSET syntax."
-,50,0,"31 ;;ZOSV,ZIS,ZT;S - Non-standard $Z function used."
-,51,0,"32 ;;;S - 'HALT' command should be invoked through 'G ^XUSCLEAN'."
-,52,0,"33 ;;;S - Read command doesn't have a timeout."
-,53,0,"34 ;;ZIS;S - 'OPEN' command should be invoked through ^%ZIS."
-,54,0,"35 ;;;S - Routine exceeds SACC maximum size of 20000 (|)."
-,55,0,"36 ;;ZTM;S - Should use 'TASKMAN' instead of 'JOB' command."
-,56,0,"37 ;;;F - Label is not valid."
-,57,0,"38 ;;;F - Call to this |"
-,58,0,"39 ;;ZIS,XUS,XUP;S - Kill of a protected variable (|)."
-,59,0,"40 ;;;S - Space where a command should be."
-,60,0,"41 ;;;I - Star or pound READ used."
-,61,0,"42 ;;;W - Null line (no commands or comment)."
-,62,0,"43 ;;;F - Invalid or wrong number of arguments to a function."
-,63,0,"44 ;;;S - 2nd line of routine violates the SAC."
-,64,0,"45 ;;ZT,ZIS,XUTM,XTER;S - Set to a '%' global."
-,65,0,"46 ;;;F - Quoted string not followed by a separator."
-,66,0,"47 ;;;S - Lowercase command(s) used in line."
-,67,0,"48 ;;;F - Missing argument to a command post-conditional."
-,68,0,"49 ;;;F - Command missing an argument."
-,69,0,"50 ;;ZTM;S - Extended reference."
-,70,0,"51 ;;;F - Block structure mismatch."
-,71,0,"52 ;;;F - Reference to routine '^|'. That isn't in this UCI."
-,72,0,"53 ;;;F - Bad Number."
-,73,0,"54 ;;XG;S - Access to SSVN's restricted to Kernel."
-,74,0,"55 ;;;S - Violates VA programming standards."
-,75,0,"56 ;;;S - Patch number '|' missing from second line."
-,76,0,"57 ;;;S - Lower/Mixed case Variable name used."
-,77,0,"58 ;;;S - Routine code exceeds SACC maximum size of 15000 (|)."
-,78,0,"59 ;;;F - Bad WRITE syntax."
-,79,0,"60 ;;;S - Lock missing Timeout."
-,80,0,"61 ;;;S - Non-Incremental Lock."
-,81,0,"62 ;;;S - First line of routine violates the SAC."
-,82,0,"63 ;;;F - GO or DO mismatch from block structure (M45)."
-Totals for XINDX1,,529,
diff --git a/Tests/MumpsCoverage/Accounts_ReceivableTest.mcov b/Tests/MumpsCoverage/Accounts_ReceivableTest.mcov deleted file mode 100644 index 3c585f5..0000000 --- a/Tests/MumpsCoverage/Accounts_ReceivableTest.mcov +++ /dev/null @@ -1,1445 +0,0 @@ -%GO Global Output Utility -GT.M 17-APR-2012 17:18:27 ZWR -^ZZCOVERAGE("%RSEL","SRC")="1:0:0:0" -^ZZCOVERAGE("%RSEL","SRC",1)="1:0:0:0" -^ZZCOVERAGE("%RSEL","SRC",2)="1:0:0:0" -^ZZCOVERAGE("%RSEL","SRC",3)="1:0:0:0" -^ZZCOVERAGE("%RSEL","SRC",4)="1:0:0:0" -^ZZCOVERAGE("%RSEL","SRC",5)="1:0:0:0" -^ZZCOVERAGE("%RSEL","SRC",6)="1:0:0:0" -^ZZCOVERAGE("%RSEL","SRC",7)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init")="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",1)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",3)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",4)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",5)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",6)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",7)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",8)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",8,"FOR_LOOP",1)=1 -^ZZCOVERAGE("%RSEL","init",9)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",10)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",11)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",12)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",13)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",14)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",15)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",16)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",17)="1:0:0:0" -^ZZCOVERAGE("%RSEL","init",17,"FOR_LOOP",1)=2 -^ZZCOVERAGE("%RSEL","init",18)="2:0:0:0" -^ZZCOVERAGE("%RSEL","init",19)="2:0:0:0" -^ZZCOVERAGE("%RSEL","init",20)="2:0:0:0" -^ZZCOVERAGE("%RSEL","init",40)="1:0:0:0" -^ZZCOVERAGE("%RSEL","main")="1:32001:84004:116005" -^ZZCOVERAGE("%RSEL","main",1)="1:0:0:0" -^ZZCOVERAGE("%RSEL","main",2)="1:0:0:0" -^ZZCOVERAGE("%RSEL","main",3)="1:0:0:0" -^ZZCOVERAGE("%RSEL","main",3,"FOR_LOOP",1)=468 -^ZZCOVERAGE("%RSEL","main",4)="468:0:24003:24003" -^ZZCOVERAGE("%RSEL","main",5)="468:0:0:0" -^ZZCOVERAGE("%RSEL","main",6)="468:32001:48001:80002" -^ZZCOVERAGE("%RSEL","main",7)="467:0:12000:12000" -^ZZCOVERAGE("%RSEL","main",8)="467:0:0:0" -^ZZCOVERAGE("%RSEL","main",9)="467:0:0:0" -^ZZCOVERAGE("%RSEL","main",10)="467:0:0:0" -^ZZCOVERAGE("%RSEL","main",11)="1:0:0:0" -^ZZCOVERAGE("%RSEL","main",12)="1:0:0:0" -^ZZCOVERAGE("%RSEL","main",13)="1:0:0:0" -^ZZCOVERAGE("%RSEL","main",14)="1:0:0:0" -^ZZCOVERAGE("%RSEL","next")="1403:12001:20002:32003" -^ZZCOVERAGE("%RSEL","next",0)="1403:0:0:0" -^ZZCOVERAGE("%RSEL","next",1)="1403:12001:20002:32003" -^ZZCOVERAGE("%RSEL","next",1,"FOR_LOOP",1)=1403 -^ZZCOVERAGE("%RSEL","next",2)="1403:0:0:0" -^ZZCOVERAGE("%RSEL","save")="467:0:4001:4001" -^ZZCOVERAGE("%RSEL","save",1)="467:0:0:0" -^ZZCOVERAGE("%RSEL","save",5)="467:0:0:0" -^ZZCOVERAGE("%RSEL","save",6)="467:0:0:0" -^ZZCOVERAGE("%RSEL","save",7)="467:0:0:0" -^ZZCOVERAGE("%RSEL","save",8)="467:0:4001:4001" -^ZZCOVERAGE("%RSEL","save",9)="467:0:0:0" -^ZZCOVERAGE("%RSEL","search")="934:0:16001:16001" -^ZZCOVERAGE("%RSEL","search",0)="934:0:4000:4000" -^ZZCOVERAGE("%RSEL","search",1)="934:0:0:0" -^ZZCOVERAGE("%RSEL","search",2)="934:0:4001:4001" -^ZZCOVERAGE("%RSEL","search",2,"FOR_LOOP",1)=1868 -^ZZCOVERAGE("%RSEL","search",3)="934:0:8000:8000" -^ZZCOVERAGE("%RSEL","search",4)="934:0:0:0" -^ZZCOVERAGE("%RSEL","search",5)="934:0:0:0" -^ZZCOVERAGE("%RSEL","start")="468:0:4001:4001" -^ZZCOVERAGE("%RSEL","start",0)="468:0:0:0" -^ZZCOVERAGE("%RSEL","start",1)="468:0:0:0" -^ZZCOVERAGE("%RSEL","start",2)="468:0:0:0" -^ZZCOVERAGE("%RSEL","start",2,"FOR_LOOP",1)=936 -^ZZCOVERAGE("%RSEL","start",3)="468:0:0:0" -^ZZCOVERAGE("%RSEL","work")="467:20002:24001:44003" -^ZZCOVERAGE("%RSEL","work",1)="467:0:0:0" -^ZZCOVERAGE("%RSEL","work",2)="467:0:0:0" -^ZZCOVERAGE("%RSEL","work",3)="467:0:4000:4000" -^ZZCOVERAGE("%RSEL","work",4)="467:0:0:0" -^ZZCOVERAGE("%RSEL","work",6)="467:4000:12000:16000" -^ZZCOVERAGE("%RSEL","work",6,"FOR_LOOP",1)=3421 -^ZZCOVERAGE("%RSEL","work",7)="467:0:0:0" -^ZZCOVERAGE("%RSEL","work",8)="467:4001:0:4001" -^ZZCOVERAGE("%RSEL","work",9)="467:0:0:0" -^ZZCOVERAGE("%RSEL","work",10)="467:0:0:0" -^ZZCOVERAGE("%RSEL","work",11)="467:0:0:0" -^ZZCOVERAGE("%RSEL","work",12)="467:4000:0:4000" -^ZZCOVERAGE("%RSEL","work",13)="467:0:4000:4000" -^ZZCOVERAGE("%RSEL","work",14)="467:0:0:0" -^ZZCOVERAGE("%RSEL","work",15)="467:4001:4001:8002" -^ZZCOVERAGE("%RSEL","work",15,"FOR_LOOP",1)=934 -^ZZCOVERAGE("%RSEL","work",16)="467:0:0:0" -^ZZCOVERAGE("%ZIS","%ZIS")="2:0:0:0" -^ZZCOVERAGE("%ZIS","%ZIS",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS","%ZIS",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS","A",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS","A",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS","CLEAN")="3:0:0:0" -^ZZCOVERAGE("%ZIS","CLEAN",1)="3:0:0:0" -^ZZCOVERAGE("%ZIS","CLEAN",2)="3:0:0:0" -^ZZCOVERAGE("%ZIS","CLEAN",3)="3:0:0:0" -^ZZCOVERAGE("%ZIS","CLEAN",4)="3:0:0:0" -^ZZCOVERAGE("%ZIS","GETHOME")="2:0:0:0" -^ZZCOVERAGE("%ZIS","GETHOME",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS","GETHOME",1)="1:0:0:0" -^ZZCOVERAGE("%ZIS","GETHOME",3)="1:0:0:0" -^ZZCOVERAGE("%ZIS","GETHOME",4)="1:0:0:0" -^ZZCOVERAGE("%ZIS","GETHOME",5)="1:0:0:0" -^ZZCOVERAGE("%ZIS","GETHOME",6)="1:0:0:0" -^ZZCOVERAGE("%ZIS","GETHOME",7)="1:0:0:0" -^ZZCOVERAGE("%ZIS","HOME")="1:0:0:0" -^ZZCOVERAGE("%ZIS","HOME",1)="1:0:0:0" -^ZZCOVERAGE("%ZIS","HOME",2)="1:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",6)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",8)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",10)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",11)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",12)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",13)="2:0:0:0" -^ZZCOVERAGE("%ZIS","INIT",15)="2:0:0:0" -^ZZCOVERAGE("%ZIS","K2",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS","K2",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS","K2",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS","K2",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS","VIRTUAL")="2:0:0:0" -^ZZCOVERAGE("%ZIS","VIRTUAL",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS","VIRTUAL",4,"FOR_LOOP",1)=6 -^ZZCOVERAGE("%ZIS","VIRTUAL",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS","VIRTUAL",7)="2:0:0:0" -^ZZCOVERAGE("%ZIS","VTLKUP")="4:0:0:0" -^ZZCOVERAGE("%ZIS","VTLKUP",0)="4:0:0:0" -^ZZCOVERAGE("%ZIS","VTLKUP",0,"FOR_LOOP",1)=8 -^ZZCOVERAGE("%ZIS","VTLKUP",1)="4:0:0:0" -^ZZCOVERAGE("%ZIS1","EX2",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","EX2",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","EXIT",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","EXIT",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","EXIT",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","EXIT",6)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","EXIT",7)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","EXIT",8)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","EXIT",9)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","G",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","IOP")="1:0:0:0" -^ZZCOVERAGE("%ZIS1","IOP",1)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","K2")="2:0:0:0" -^ZZCOVERAGE("%ZIS1","K2",1)="4:0:0:0" -^ZZCOVERAGE("%ZIS1","K2",2)="4:0:0:0" -^ZZCOVERAGE("%ZIS1","K2",3)="4:0:0:0" -^ZZCOVERAGE("%ZIS1","K2",4)="4:0:0:0" -^ZZCOVERAGE("%ZIS1","KIL",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","KIL",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","KIL",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",6)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",7)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",8)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",9)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",10)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",11)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","L1",12)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","LKUP")="2:0:0:0" -^ZZCOVERAGE("%ZIS1","LKUP",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","LKUP",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","LKUP",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","MAIN",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","R")="1:0:0:0" -^ZZCOVERAGE("%ZIS1","R",0)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","R",1)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","R",2)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","RD",0)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","RD",1)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","RD",2)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","RD",3)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","RD",4)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","RD",5)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","SBR")="1:0:0:0" -^ZZCOVERAGE("%ZIS1","SBR",1)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","SBR",2)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","SBR",3)="1:0:0:0" -^ZZCOVERAGE("%ZIS1","SETQ")="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETQ",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETQ",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETQ",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETQ",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETQ",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",7)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",8)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",9)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",10)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",11)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",12)="2:0:0:0" -^ZZCOVERAGE("%ZIS1","SETVAR",13)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","CHECK",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","CHECK",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","CHECK",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","CHECK",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","CHECK",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","CHECK",6)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","IOPAR")="4:0:0:0" -^ZZCOVERAGE("%ZIS2","IOPAR",0)="4:0:0:0" -^ZZCOVERAGE("%ZIS2","IOPAR",1)="4:0:0:0" -^ZZCOVERAGE("%ZIS2","L2")="2:0:0:0" -^ZZCOVERAGE("%ZIS2","L2",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","OCPU",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","OOS",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","OOS",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","OTHCPU")="2:0:0:0" -^ZZCOVERAGE("%ZIS2","OTHCPU",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","OTHCPU",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","OTHCPU",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","OTHCPU",2,"FOR_LOOP",1)=4 -^ZZCOVERAGE("%ZIS2","OTHCPU",3)="4:0:0:0" -^ZZCOVERAGE("%ZIS2","OTHCPU",4)="4:0:0:0" -^ZZCOVERAGE("%ZIS2","OTHCPU",5)="4:0:0:0" -^ZZCOVERAGE("%ZIS2","OTHCPU",15)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","PTIME",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","QUECHK")="2:0:0:0" -^ZZCOVERAGE("%ZIS2","QUECHK",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","QUECHK",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","QUECHK",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","QUECHK",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","QUECHK",9)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","QUECHK",13)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","SLAVE",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","T2",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","T2",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",10)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",11)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",12)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",15)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",16)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","TMPVAR",18)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","VTRM",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS2","VTRM",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","%ZIS3",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","%ZIS3",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","%ZIS3",6)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","%ZIS3",8)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","%ZIS3",9)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","%ZIS3",11)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","ALTP",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","ASKMAR",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","ASKMAR",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","MARGN")="2:0:0:0" -^ZZCOVERAGE("%ZIS3","MARGN",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","MARGN",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","MARGN",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","MARGN",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","Q",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","Q",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","Q",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","SETPAR")="2:0:0:0" -^ZZCOVERAGE("%ZIS3","SETPAR",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","SETPAR",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","ST")="2:0:0:0" -^ZZCOVERAGE("%ZIS3","ST",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","ST",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","ST",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","ST",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","STP",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","STP",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","STP",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","STP",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","TRM",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","TRM",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","TRM",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","TRM",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","TRM",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","W")="2:0:0:0" -^ZZCOVERAGE("%ZIS3","W",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","W",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS3","W",2)="1:0:0:0" -^ZZCOVERAGE("%ZIS3","W",3)="1:0:0:0" -^ZZCOVERAGE("%ZIS4","O")="2:0:0:0" -^ZZCOVERAGE("%ZIS4","O",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","O",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","O1")="2:0:0:0" -^ZZCOVERAGE("%ZIS4","O1",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","O1",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","O1",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","O1",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",4)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",5)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",9)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",10)="2:0:0:0" -^ZZCOVERAGE("%ZIS4","OPAR",12)="2:0:0:0" -^ZZCOVERAGE("%ZIS6","ANSBAK",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS6","ANSBAK",2)="2:0:0:0" -^ZZCOVERAGE("%ZIS6","ANSBAK",3)="2:0:0:0" -^ZZCOVERAGE("%ZIS6","OXECUTE",1)="2:0:0:0" -^ZZCOVERAGE("%ZIS6","QUIT",0)="2:0:0:0" -^ZZCOVERAGE("%ZIS6","QUIT",1)="2:0:0:0" -^ZZCOVERAGE("%ZISC","C0")="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",1)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",3)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",5)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",6)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",8)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",9)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",10)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",13)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",16)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",17)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",21)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",26)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",27)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",29)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",32)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",33)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",34)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",37)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",41)="1:0:0:0" -^ZZCOVERAGE("%ZISC","C0",43)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS")="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",0)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",1)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",2)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",3)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",4)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",5)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",6)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",7)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CIOS",8)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CLOSPP")="1:0:0:0" -^ZZCOVERAGE("%ZISC","CLOSPP",0)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CLOSPP",1)="1:0:0:0" -^ZZCOVERAGE("%ZISC","CLOSPP",2)="1:0:0:0" -^ZZCOVERAGE("%ZISC","END",0)="1:0:0:0" -^ZZCOVERAGE("%ZISC","END",2)="1:0:0:0" -^ZZCOVERAGE("%ZISC","END",4)="1:0:0:0" -^ZZCOVERAGE("%ZISC","FF")="1:0:0:0" -^ZZCOVERAGE("%ZISC","FF",0)="1:0:0:0" -^ZZCOVERAGE("%ZISC","FF",1)="1:0:0:0" -^ZZCOVERAGE("%ZISC","FF",2)="1:0:0:0" -^ZZCOVERAGE("%ZISC","RM")="1:0:0:0" -^ZZCOVERAGE("%ZISC","RM",0)="1:0:0:0" -^ZZCOVERAGE("%ZISC","RM",1)="1:0:0:0" -^ZZCOVERAGE("%ZISC","S1",0)="1:0:0:0" -^ZZCOVERAGE("%ZISC","S1",1)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",2)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",4)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",5)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",6)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",7)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",8)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",9)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",10)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SETIO",12)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SUBTYPE")="1:0:0:0" -^ZZCOVERAGE("%ZISC","SUBTYPE",1)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SUBTYPE",2)="1:0:0:0" -^ZZCOVERAGE("%ZISC","SUBTYPE",3)="1:0:0:0" -^ZZCOVERAGE("%ZISUTL","LINEPORT")="1:0:0:0" -^ZZCOVERAGE("%ZISUTL","LINEPORT",0)="1:0:0:0" -^ZZCOVERAGE("%ZISUTL","LINEPORT",2)="1:0:0:0" -^ZZCOVERAGE("%ZISUTL","LINEPORT",3)="1:0:0:0" -^ZZCOVERAGE("%ZISUTL","LINEPORT",4)="1:0:0:0" -^ZZCOVERAGE("%ZISUTL","LINEPORT",5)="1:0:0:0" -^ZZCOVERAGE("%ZISUTL","LINEPORT",6)="1:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTIEN")="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTIEN",0)="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTIEN",1)="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTNAM")="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTNAM",0)="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTNAM",1)="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTNAM",2)="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTNAM",3)="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTNAM",5)="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTNAM",6)="3:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTSUB")="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTSUB",0)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTSUB",1)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTSUB",2)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","LNPRTSUB",3)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","SYMBOL")="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","SYMBOL",0)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","SYMBOL",1)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","SYMBOL",3)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","SYMBOL",4)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","SYMBOL",5)="2:0:0:0" -^ZZCOVERAGE("%ZISUTL","SYMBOL",5,"FOR_LOOP",1)=40 -^ZZCOVERAGE("%ZISUTL","SYMBOL",6)="40:0:0:0" -^ZZCOVERAGE("%ZISUTL","SYMBOL",10)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","GETENV")="2:0:0:0" -^ZZCOVERAGE("%ZOSV","GETENV",1)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","GETENV",2)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","GETENV",3)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","LGR")="2:0:0:0" -^ZZCOVERAGE("%ZOSV","LGR",0)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","LGR",1)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","PRI")="1:0:0:0" -^ZZCOVERAGE("%ZOSV","PRI",0)="1:0:0:0" -^ZZCOVERAGE("%ZOSV","PRI",3)="1:0:0:0" -^ZZCOVERAGE("%ZOSV","RETURN")="2:0:4000:4000" -^ZZCOVERAGE("%ZOSV","RETURN",0)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","RETURN",2)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","RETURN",3)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","RETURN",4)="2:0:4000:4000" -^ZZCOVERAGE("%ZOSV","RETURN",5)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","RETURN",7)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","TEMP")="2:0:0:0" -^ZZCOVERAGE("%ZOSV","TEMP",0)="2:0:0:0" -^ZZCOVERAGE("%ZOSV","TEMP",2)="2:0:0:0" -^ZZCOVERAGE("%ZOSV2","LOAD")="467:1000060:340019:1340079" -^ZZCOVERAGE("%ZOSV2","LOAD",0)="467:0:0:0" -^ZZCOVERAGE("%ZOSV2","LOAD",1)="467:0:8001:8001" -^ZZCOVERAGE("%ZOSV2","LOAD",2)="467:1000060:320018:1320078" -^ZZCOVERAGE("%ZOSV2","LOAD",2,"FOR_LOOP",1)=45087 -^ZZCOVERAGE("%ZOSV2","LOAD",3)="467:0:12000:12000" -^ZZCOVERAGE("DIALOG","EZBLD")="2:0:4000:4000" -^ZZCOVERAGE("DIALOG","EZBLD",0)="2:0:0:0" -^ZZCOVERAGE("DIALOG","EZBLD",2)="2:0:0:0" -^ZZCOVERAGE("DIALOG","EZBLD",3)="2:0:0:0" -^ZZCOVERAGE("DIALOG","EZBLD",4)="2:0:0:0" -^ZZCOVERAGE("DIALOG","EZBLD",5)="2:0:0:0" -^ZZCOVERAGE("DIALOG","EZBLD",6)="2:0:0:0" -^ZZCOVERAGE("DIALOG","EZBLD",7)="2:0:0:0" -^ZZCOVERAGE("DIALOG","EZBLD",8)="2:0:0:0" -^ZZCOVERAGE("DIALOG","EZBLD",9)="2:0:0:0" -^ZZCOVERAGE("DIALOG","PARAM")="2:0:0:0" -^ZZCOVERAGE("DIALOG","PARAM",0)="4:0:0:0" -^ZZCOVERAGE("DIALOG","PARAM",1)="2:0:0:0" -^ZZCOVERAGE("DIALOG","PARAM",2)="2:0:0:0" -^ZZCOVERAGE("DIALOG","PARAM",3)="2:0:0:0" -^ZZCOVERAGE("DIALOG","Q1",0)="2:0:0:0" -^ZZCOVERAGE("DIALOG","Q2")="2:0:0:0" -^ZZCOVERAGE("DIALOG","Q2",0)="2:0:0:0" -^ZZCOVERAGE("DIALOG","QEZ",0)="2:0:4000:4000" -^ZZCOVERAGE("DIALOG","QEZ",1)="2:0:0:0" -^ZZCOVERAGE("DIALOG","QP",0)="2:0:0:0" -^ZZCOVERAGE("DIC","A1",0)="2:0:0:0" -^ZZCOVERAGE("DIC","ASK",0)="2:0:0:0" -^ZZCOVERAGE("DIC","ASK",1)="2:0:0:0" -^ZZCOVERAGE("DIC","ASK",2)="2:0:0:0" -^ZZCOVERAGE("DIC","ASK",3)="2:0:0:0" -^ZZCOVERAGE("DIC","ASK",4)="2:0:0:0" -^ZZCOVERAGE("DIC","DIC")="2:0:0:0" -^ZZCOVERAGE("DIC","DIC",3)="2:0:0:0" -^ZZCOVERAGE("DIC","DIC",4)="2:0:0:0" -^ZZCOVERAGE("DIC","DIC",5)="2:0:0:0" -^ZZCOVERAGE("DIC","DIC",6)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",0)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",1)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",2)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",3)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",4)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",5)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",6)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",7)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",8)="2:0:0:0" -^ZZCOVERAGE("DIC","EN",9)="2:0:0:0" -^ZZCOVERAGE("DIC","RTN",0)="2:0:0:0" -^ZZCOVERAGE("DIC","RTN",3)="2:0:0:0" -^ZZCOVERAGE("DIC","RTN",6)="2:0:0:0" -^ZZCOVERAGE("DIC","X",1)="2:0:0:0" -^ZZCOVERAGE("DIC","X",4)="2:0:0:0" -^ZZCOVERAGE("DIC","X",5)="2:0:0:0" -^ZZCOVERAGE("DIC","X",6)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE")="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",0)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",1)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",2)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",3)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",4)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",7)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",8)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",11)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",12)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",13)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",14)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",15)="2:0:0:0" -^ZZCOVERAGE("DIC0","GETFILE",16)="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT")="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT",1)="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT",2)="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT",3)="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT",4)="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT",5)="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT",6)="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT",7)="2:0:0:0" -^ZZCOVERAGE("DIC0","INIT",8)="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN")="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN",0)="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN",1)="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN",2)="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN",3)="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN",4)="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN",5)="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN",5,"FOR_LOOP",1)=2 -^ZZCOVERAGE("DIC0","SETIEN",6)="2:0:0:0" -^ZZCOVERAGE("DIC0","SETIEN",7)="2:0:0:0" -^ZZCOVERAGE("DIC1","B",0)="2:0:0:0" -^ZZCOVERAGE("DIC1","DIC1")="2:0:0:0" -^ZZCOVERAGE("DIC1","DIC1",3)="2:0:0:0" -^ZZCOVERAGE("DIC1","DIC1",4)="2:0:0:0" -^ZZCOVERAGE("DIC1","DIC1",5)="2:0:0:0" -^ZZCOVERAGE("DIC1","DO")="4:0:0:0" -^ZZCOVERAGE("DIC1","DO",1)="4:0:0:0" -^ZZCOVERAGE("DIC1","DO",2)="2:0:0:0" -^ZZCOVERAGE("DIC1","DO2",0)="2:0:0:0" -^ZZCOVERAGE("DIC1","DO2",1)="2:0:0:0" -^ZZCOVERAGE("DIC1","DO2",2)="2:0:0:0" -^ZZCOVERAGE("DIC1","DO2",3)="2:0:0:0" -^ZZCOVERAGE("DIC1","GETFA")="4:0:0:0" -^ZZCOVERAGE("DIC1","GETFA",0)="4:0:0:0" -^ZZCOVERAGE("DIC1","GETFA",2)="4:0:0:0" -^ZZCOVERAGE("DIC1","P",1)="2:0:0:0" -^ZZCOVERAGE("DIC1","P",2)="2:0:0:0" -^ZZCOVERAGE("DIC1","PROMPT",1)="2:0:0:0" -^ZZCOVERAGE("DIC1","PROMPT",2)="2:0:0:0" -^ZZCOVERAGE("DIC1","W",0)="2:0:0:0" -^ZZCOVERAGE("DIC1","W",0,"FOR_LOOP",1)=4 -^ZZCOVERAGE("DIC1","W",1)="3:0:0:0" -^ZZCOVERAGE("DIC1","W",2)="3:0:0:0" -^ZZCOVERAGE("DIC1","W",3)="2:0:0:0" -^ZZCOVERAGE("DIC1","W",4)="2:0:0:0" -^ZZCOVERAGE("DIC1","W",5)="2:0:0:0" -^ZZCOVERAGE("DIC1","W",6)="2:0:0:0" -^ZZCOVERAGE("DIC1","WOV")="1:0:0:0" -^ZZCOVERAGE("DIC1","WOV",0)="1:0:0:0" -^ZZCOVERAGE("DIC1","WOV",1)="1:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT")="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",0)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",1)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",2)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",3)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",3,"FOR_LOOP",1)=2 -^ZZCOVERAGE("DIC11","GETPRMT",4)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",8)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",9)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",10)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",11)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",12)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",13)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",14)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",15)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",16)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",17)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",18)="2:0:0:0" -^ZZCOVERAGE("DIC11","GETPRMT",19)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",0)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",1)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",2)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",3)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",4)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",6)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",8)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",9)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",11)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",12)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",13)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",14)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",15)="2:0:0:0" -^ZZCOVERAGE("DIC11","PR1",16)="2:0:0:0" -^ZZCOVERAGE("DIC11","PROMPT")="2:0:0:0" -^ZZCOVERAGE("DIC11","PROMPT",0)="2:0:0:0" -^ZZCOVERAGE("DIC11","PROMPT",1)="2:0:0:0" -^ZZCOVERAGE("DIC11","PROMPT",1,"FOR_LOOP",1)=2 -^ZZCOVERAGE("DIC11","PROMPT",2)="2:0:0:0" -^ZZCOVERAGE("DIC11","PROMPT",3)="2:0:0:0" -^ZZCOVERAGE("DIC11","PROMPT",5)="2:0:0:0" -^ZZCOVERAGE("DIC2","PGM")="4:0:0:0" -^ZZCOVERAGE("DIC2","PGM",0)="4:0:0:0" -^ZZCOVERAGE("DIC2","PGM",1)="4:0:0:0" -^ZZCOVERAGE("DIC2","PGM",2)="4:0:0:0" -^ZZCOVERAGE("DIC2","Q")="2:0:0:0" -^ZZCOVERAGE("DIC2","Q",0)="2:0:0:0" -^ZZCOVERAGE("DIC2","Q",1)="2:0:0:0" -^ZZCOVERAGE("DIC2","Q",2)="2:0:0:0" -^ZZCOVERAGE("DICL","DINDEX")="2:0:0:0" -^ZZCOVERAGE("DICL","DINDEX",0)="2:0:0:0" -^ZZCOVERAGE("DICL","DINDEX",1)="2:0:0:0" -^ZZCOVERAGE("DICL","DINDEX",2)="2:0:0:0" -^ZZCOVERAGE("DICL","DINDEX",5)="2:0:0:0" -^ZZCOVERAGE("DICL","DINDEX",6)="2:0:0:0" -^ZZCOVERAGE("DICUIX","I1",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX","I1",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX","I1",4)="2:0:0:0" -^ZZCOVERAGE("DICUIX","I1",5)="2:0:0:0" -^ZZCOVERAGE("DICUIX","INDEX")="2:0:0:0" -^ZZCOVERAGE("DICUIX","INDEX",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X1",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X1",8)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X1",9)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",4)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",5)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",8)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",11)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",12)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",13)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",14)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",15)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",15,"FOR_LOOP",1)=2 -^ZZCOVERAGE("DICUIX","X2",16)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",17)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",18)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",19)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",20)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",21)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",22)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",23)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",24)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",25)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",26)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",27)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",28)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",29)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",30)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",31)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",32)="2:0:0:0" -^ZZCOVERAGE("DICUIX","X2",33)="2:0:0:0" -^ZZCOVERAGE("DICUIX","XREF")="2:0:0:0" -^ZZCOVERAGE("DICUIX","XREF",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G1",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G1",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G1",4)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G2",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G2",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G3",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G30",1)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G4",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G4",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G4",4)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G4",5)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G4",6)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G4",7)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G5",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G5",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","G5",7)="2:0:0:0" -^ZZCOVERAGE("DICUIX1","GET")="2:0:0:0" -^ZZCOVERAGE("DICUIX1","GET",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C1",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C1",1)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C2",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C2",1)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C3",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C3",1)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C3",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C3",5)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",1)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",4)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",5)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",6)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",7)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",8)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",9)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",10)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",11)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",12)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",17)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",18)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",23)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C4",24)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C5",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C5",1)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C6",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C6",18)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C6",19)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C6",20)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C7",0)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","C7",7)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON1")="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON1",1)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON1",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON1",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON1",4)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON1",5)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON1",6)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON1",7)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2")="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",1)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",2)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",3)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",4)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",5)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",6)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",7)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",8)="2:0:0:0" -^ZZCOVERAGE("DICUIX2","COMMON2",9)="2:0:0:0" -^ZZCOVERAGE("DIEFU","IENX",1)="2:0:0:0" -^ZZCOVERAGE("DIEFU","IENX",2)="2:0:0:0" -^ZZCOVERAGE("DIEFU","IENX",3)="2:0:0:0" -^ZZCOVERAGE("DIEFU","IENX",3,"FOR_LOOP",1)=4 -^ZZCOVERAGE("DIEFU","IENX",4)="2:0:0:0" -^ZZCOVERAGE("DIEFU","IENX",5)="2:0:0:0" -^ZZCOVERAGE("DILF","CREF")="4:0:0:0" -^ZZCOVERAGE("DILF","CREF",0)="4:0:0:0" -^ZZCOVERAGE("DILF","IENS")="2:0:0:0" -^ZZCOVERAGE("DILF","IENS",0)="2:0:0:0" -^ZZCOVERAGE("DILF","IENS",1)="2:0:0:0" -^ZZCOVERAGE("DILF","OREF")="2:0:0:0" -^ZZCOVERAGE("DILF","OREF",0)="2:0:0:0" -^ZZCOVERAGE("DILIBF","FNO")="2:0:0:0" -^ZZCOVERAGE("DILIBF","FNO",0)="2:0:0:0" -^ZZCOVERAGE("DILIBF","FNO",1)="2:0:0:0" -^ZZCOVERAGE("DILIBF","FNO",2)="2:0:0:0" -^ZZCOVERAGE("DIQGU","ENCREF",0)="4:0:0:0" -^ZZCOVERAGE("DIQGU","ENOREF",0)="2:0:0:0" -^ZZCOVERAGE("DIQGU","OR2")="2:0:0:0" -^ZZCOVERAGE("DIQGU","OR2",0)="2:0:0:0" -^ZZCOVERAGE("XINDEX","A2",0)="468:0:4000:4000" -^ZZCOVERAGE("XINDEX","A2",1)="467:0:0:0" -^ZZCOVERAGE("XINDEX","A2",2)="467:0:0:0" -^ZZCOVERAGE("XINDEX","A2",3)="467:4000:0:4000" -^ZZCOVERAGE("XINDEX","A2",4)="467:0:4000:4000" -^ZZCOVERAGE("XINDEX","A2",5)="467:0:0:0" -^ZZCOVERAGE("XINDEX","ALIVE",1)="1:0:0:0" -^ZZCOVERAGE("XINDEX","B5",0)="467:188012:220012:408024" -^ZZCOVERAGE("XINDEX","B5",0,"FOR_LOOP",1)=44620 -^ZZCOVERAGE("XINDEX","B5",1)="467:20000:8000:28000" -^ZZCOVERAGE("XINDEX","B5",2)="467:4000:0:4000" -^ZZCOVERAGE("XINDEX","B5",3)="467:0:0:0" -^ZZCOVERAGE("XINDEX","B5",4)="467:4000:0:4000" -^ZZCOVERAGE("XINDEX","B5",5)="467:0:0:0" -^ZZCOVERAGE("XINDEX","BEG")="467:2460149:2872194:5332343" -^ZZCOVERAGE("XINDEX","BEG",1)="467:8000:0:8000" -^ZZCOVERAGE("XINDEX","BEG",2)="467:4000:0:4000" -^ZZCOVERAGE("XINDEX","BEG",3)="467:0:4000:4000" -^ZZCOVERAGE("XINDEX","BEG",4)="467:0:4000:4000" -^ZZCOVERAGE("XINDEX","BEG",5)="467:4001:0:4001" -^ZZCOVERAGE("XINDEX","BEG",7)="467:0:0:0" -^ZZCOVERAGE("XINDEX","BEG",8)="467:0:0:0" -^ZZCOVERAGE("XINDEX","BEG",9)="467:0:0:0" -^ZZCOVERAGE("XINDEX","BEG",11)="467:4000:0:4000" -^ZZCOVERAGE("XINDEX","BEG",12)="467:0:4000:4000" -^ZZCOVERAGE("XINDEX","BEG",14)="467:0:0:0" -^ZZCOVERAGE("XINDEX","BEG",15)="467:0:0:0" -^ZZCOVERAGE("XINDEX","BEG",16)="467:0:0:0" -^ZZCOVERAGE("XINDEX","CD",0)="44620:32001:36002:68003" -^ZZCOVERAGE("XINDEX","CD",1)="44620:40002:60004:100006" -^ZZCOVERAGE("XINDEX","CD",2)="44620:40001:60002:100003" -^ZZCOVERAGE("XINDEX","CD",3)="44620:36002:44004:80006" -^ZZCOVERAGE("XINDEX","CD",4)="44620:28000:40002:68002" -^ZZCOVERAGE("XINDEX","CD",5)="44620:28002:52001:80003" -^ZZCOVERAGE("XINDEX","CD",6)="10770:28003:20000:48003" -^ZZCOVERAGE("XINDEX","CD",6,"FOR_LOOP",1)=57531 -^ZZCOVERAGE("XINDEX","CD",7)="10770:24004:16000:40004" -^ZZCOVERAGE("XINDEX","CD",9)="44620:60005:40004:100009" -^ZZCOVERAGE("XINDEX","CD",10)="44620:44003:48005:92008" -^ZZCOVERAGE("XINDEX","CD",12)="44620:52004:44002:96006" -^ZZCOVERAGE("XINDEX","EE",0)="116081:148007:200014:348021" -^ZZCOVERAGE("XINDEX","EE",1)="71461:44004:44002:88006" -^ZZCOVERAGE("XINDEX","EE",2)="71461:100007:80003:180010" -^ZZCOVERAGE("XINDEX","EE",3)="54870:44001:48001:92002" -^ZZCOVERAGE("XINDEX","EE",4)="53608:88008:100009:188017" -^ZZCOVERAGE("XINDEX","EE",5)="53608:72006:68004:140010" -^ZZCOVERAGE("XINDEX","EE",6)="53608:76005:72004:148009" -^ZZCOVERAGE("XINDEX","EE",8)="53608:60003:64005:124008" -^ZZCOVERAGE("XINDEX","EE",9)="53608:48003:72003:120006" -^ZZCOVERAGE("XINDEX","EE",10)="53608:52002:96008:148010" -^ZZCOVERAGE("XINDEX","EE",13)="53608:52003:44001:96004" -^ZZCOVERAGE("XINDEX","EE",14)="53608:96007:112006:208013" -^ZZCOVERAGE("XINDEX","EE",15)="53608:24001:52004:76005" -^ZZCOVERAGE("XINDEX","EE",16)="53608:52005:88007:140012" -^ZZCOVERAGE("XINDEX","EE",17)="53608:128008:208017:336025" -^ZZCOVERAGE("XINDEX","F")="1559:4000:4001:8001" -^ZZCOVERAGE("XINDEX","F",0)="1559:4000:0:4000" -^ZZCOVERAGE("XINDEX","G")="1932:56003:96009:152012" -^ZZCOVERAGE("XINDEX","G",0)="1932:4000:8002:12002" -^ZZCOVERAGE("XINDEX","H")="11:0:0:0" -^ZZCOVERAGE("XINDEX","H",0)="11:0:0:0" -^ZZCOVERAGE("XINDEX","K")="2218:40001:24002:64003" -^ZZCOVERAGE("XINDEX","K",0)="2218:4000:4000:8000" -^ZZCOVERAGE("XINDEX","K",1)="2218:0:4001:4001" -^ZZCOVERAGE("XINDEX","L")="259:4001:4000:8001" -^ZZCOVERAGE("XINDEX","L",0)="259:0:0:0" -^ZZCOVERAGE("XINDEX","LN",0)="44620:68005:104005:172010" -^ZZCOVERAGE("XINDEX","LN",1)="44620:40001:64004:104005" -^ZZCOVERAGE("XINDEX","LN",2)="5073:12000:4001:16001" -^ZZCOVERAGE("XINDEX","LN",3)="5073:4000:8000:12000" -^ZZCOVERAGE("XINDEX","LN",4)="5073:20001:0:20001" -^ZZCOVERAGE("XINDEX","LN",5)="5073:20003:12002:32005" -^ZZCOVERAGE("XINDEX","LN",6)="5073:12002:16000:28002" -^ZZCOVERAGE("XINDEX","LOAD")="467:88003:196019:284022" -^ZZCOVERAGE("XINDEX","LOAD",0)="467:88003:196019:284022" -^ZZCOVERAGE("XINDEX","LOAD",1)="467:0:0:0" -^ZZCOVERAGE("XINDEX","LOAD",2)="467:0:0:0" -^ZZCOVERAGE("XINDEX","M")="30:4000:0:4000" -^ZZCOVERAGE("XINDEX","M",0)="30:0:0:0" -^ZZCOVERAGE("XINDEX","N")="1721:88005:80004:168009" -^ZZCOVERAGE("XINDEX","N",0)="1721:4000:0:4000" -^ZZCOVERAGE("XINDEX","POSTRTN")="467:108009:96003:204012" -^ZZCOVERAGE("XINDEX","POSTRTN",1)="467:0:0:0" -^ZZCOVERAGE("XINDEX","POSTRTN",2)="467:0:0:0" -^ZZCOVERAGE("XINDEX","POSTRTN",3)="467:12000:8000:20000" -^ZZCOVERAGE("XINDEX","POSTRTN",3,"FOR_LOOP",1)=2558 -^ZZCOVERAGE("XINDEX","POSTRTN",4)="2091:0:0:0" -^ZZCOVERAGE("XINDEX","POSTRTN",5)="2044:4000:0:4000" -^ZZCOVERAGE("XINDEX","POSTRTN",6)="2044:4000:0:4000" -^ZZCOVERAGE("XINDEX","POSTRTN",9)="2044:0:0:0" -^ZZCOVERAGE("XINDEX","POSTRTN",10)="467:0:4000:4000" -^ZZCOVERAGE("XINDEX","POSTRTN",11)="467:12002:16001:28003" -^ZZCOVERAGE("XINDEX","POSTRTN",11,"FOR_LOOP",1)=5540 -^ZZCOVERAGE("XINDEX","POSTRTN",12)="5073:0:4000:4000" -^ZZCOVERAGE("XINDEX","POSTRTN",13)="5073:8000:4000:12000" -^ZZCOVERAGE("XINDEX","POSTRTN",14)="5073:0:0:0" -^ZZCOVERAGE("XINDEX","POSTRTN",15)="467:0:0:0" -^ZZCOVERAGE("XINDEX","POSTRTN",16)="467:28001:20001:48002" -^ZZCOVERAGE("XINDEX","POSTRTN",16,"FOR_LOOP",1)=16376 -^ZZCOVERAGE("XINDEX","POSTRTN",17)="15909:40006:40001:80007" -^ZZCOVERAGE("XINDEX","POSTRTN",18)="15909:0:0:0" -^ZZCOVERAGE("XINDEX","POSTRTN",19)="467:0:0:0" -^ZZCOVERAGE("XINDEX","Q")="7762:12000:20001:32001" -^ZZCOVERAGE("XINDEX","Q",0)="7762:4000:16001:20001" -^ZZCOVERAGE("XINDEX","QUOTE")="36371:188012:232009:420021" -^ZZCOVERAGE("XINDEX","QUOTE",0)="36371:156010:192008:348018" -^ZZCOVERAGE("XINDEX","QUOTE",0,"FOR_LOOP",1)=323268 -^ZZCOVERAGE("XINDEX","QUOTE",1)="36371:20002:20001:40003" -^ZZCOVERAGE("XINDEX","R")="85:0:8001:8001" -^ZZCOVERAGE("XINDEX","R",0)="85:0:0:0" -^ZZCOVERAGE("XINDEX","S")="17549:716055:988057:1704112" -^ZZCOVERAGE("XINDEX","S",0)="17549:28003:28003:56006" -^ZZCOVERAGE("XINDEX","SE2",0)="86891:176010:272017:448027" -^ZZCOVERAGE("XINDEX","SE2",1)="85079:264015:376016:640031" -^ZZCOVERAGE("XINDEX","SE2",2)="85079:72005:112010:184015" -^ZZCOVERAGE("XINDEX","SEP")="107216:736054:648038:1384092" -^ZZCOVERAGE("XINDEX","SEP",0)="107216:580045:440030:1020075" -^ZZCOVERAGE("XINDEX","SEP",0,"FOR_LOOP",1)=1019212 -^ZZCOVERAGE("XINDEX","SEP",1)="107216:120007:144005:264012" -^ZZCOVERAGE("XINDEX","SET")="85079:772044:1124063:1896107" -^ZZCOVERAGE("XINDEX","SET",0)="85079:176007:168008:344015" -^ZZCOVERAGE("XINDEX","SET",0,"FOR_LOOP",1)=74812 -^ZZCOVERAGE("XINDEX","SET",1)="85079:64005:144010:208015" -^ZZCOVERAGE("XINDEX","ST",0)="44620:68001:56004:124005" -^ZZCOVERAGE("XINDEX","ST",2)="44620:260012:376038:636050" -^ZZCOVERAGE("XINDEX","ST",2,"FOR_LOOP",1)=85813 -^ZZCOVERAGE("XINDEX","ST",2,"FOR_LOOP",2)=126272 -^ZZCOVERAGE("XINDEX","ST",3)="44620:224014:184014:408028" -^ZZCOVERAGE("XINDEX","ST",4)="44620:0:0:0" -^ZZCOVERAGE("XINDEX","U")="72:0:0:0" -^ZZCOVERAGE("XINDEX","U",0)="72:0:0:0" -^ZZCOVERAGE("XINDEX","W")="4584:156009:200014:356023" -^ZZCOVERAGE("XINDEX","W",0)="4584:0:16001:16001" -^ZZCOVERAGE("XINDEX","X")="220:0:0:0" -^ZZCOVERAGE("XINDEX","X",0)="220:0:0:0" -^ZZCOVERAGE("XINDEX","XINDEX")="1:32002:36000:68002" -^ZZCOVERAGE("XINDEX","XINDEX",3)="1:0:0:0" -^ZZCOVERAGE("XINDX1","A",0)="75:0:4000:4000" -^ZZCOVERAGE("XINDX1","A",1)="75:0:0:0" -^ZZCOVERAGE("XINDX1","A",2)="75:0:0:0" -^ZZCOVERAGE("XINDX1","B",0)="75:0:0:0" -^ZZCOVERAGE("XINDX1","B",4)="75:0:0:0" -^ZZCOVERAGE("XINDX1","B",6)="75:0:0:0" -^ZZCOVERAGE("XINDX1","B",7)="75:0:0:0" -^ZZCOVERAGE("XINDX1","E")="73:0:4000:4000" -^ZZCOVERAGE("XINDX1","E",0)="73:0:0:0" -^ZZCOVERAGE("XINDX1","XINDX1")="2:0:0:0" -^ZZCOVERAGE("XINDX1","XINDX1",3)="2:0:0:0" -^ZZCOVERAGE("XINDX10","ASK")="1:0:0:0" -^ZZCOVERAGE("XINDX10","ASK",1)="1:0:0:0" -^ZZCOVERAGE("XINDX10","ASK",2)="1:0:0:0" -^ZZCOVERAGE("XINDX10","ASK",3)="1:0:0:0" -^ZZCOVERAGE("XINDX10","ASK",8)="1:0:0:0" -^ZZCOVERAGE("XINDX2","%")="44620:132010:232014:364024" -^ZZCOVERAGE("XINDX2","%",0)="44620:96008:92005:188013" -^ZZCOVERAGE("XINDX2","%",0,"FOR_LOOP",1)=62810 -^ZZCOVERAGE("XINDX2","%",1)="44620:16001:68003:84004" -^ZZCOVERAGE("XINDX2","ARG")="329774:1516089:2124136:3640225" -^ZZCOVERAGE("XINDX2","ARG",1)="330498:328020:360021:688041" -^ZZCOVERAGE("XINDX2","ARG",2)="262221:228015:296022:524037" -^ZZCOVERAGE("XINDX2","ARG",3)="226556:260020:468034:728054" -^ZZCOVERAGE("XINDX2","ARG",4)="126854:104004:160011:264015" -^ZZCOVERAGE("XINDX2","ARG",5)="117750:136007:148011:284018" -^ZZCOVERAGE("XINDX2","ARG",6)="88629:60001:96003:156004" -^ZZCOVERAGE("XINDX2","ARG",7)="88424:80005:100006:180011" -^ZZCOVERAGE("XINDX2","ARG",8)="86550:72002:108007:180009" -^ZZCOVERAGE("XINDX2","ARGG")="18715:288018:352019:640037" -^ZZCOVERAGE("XINDX2","ARGG",0)="18715:76007:84005:160012" -^ZZCOVERAGE("XINDX2","ARGG",0,"FOR_LOOP",1)=49672 -^ZZCOVERAGE("XINDX2","ARGS")="44410:464031:676031:1140062" -^ZZCOVERAGE("XINDX2","ARGS",1)="63125:620038:844037:1464075" -^ZZCOVERAGE("XINDX2","ARGS",1,"FOR_LOOP",1)=291597 -^ZZCOVERAGE("XINDX2","ARGS",2)="63125:24001:60004:84005" -^ZZCOVERAGE("XINDX2","DN")="44410:208011:284017:492028" -^ZZCOVERAGE("XINDX2","DN",0)="44410:44003:108008:152011" -^ZZCOVERAGE("XINDX2","DN",1)="44410:152008:144006:296014" -^ZZCOVERAGE("XINDX2","EXT",1)="1970:4000:8001:12001" -^ZZCOVERAGE("XINDX2","EXT",2)="1970:0:0:0" -^ZZCOVERAGE("XINDX2","EXT",3)="1970:8001:12001:20002" -^ZZCOVERAGE("XINDX2","EXT",4)="1970:0:4000:4000" -^ZZCOVERAGE("XINDX2","FLUSH")="94:0:0:0" -^ZZCOVERAGE("XINDX2","FLUSH",0)="94:0:0:0" -^ZZCOVERAGE("XINDX2","FLUSH",1)="94:0:0:0" -^ZZCOVERAGE("XINDX2","FLUSH",1,"FOR_LOOP",1)=415 -^ZZCOVERAGE("XINDX2","FLUSH",2)="94:0:0:0" -^ZZCOVERAGE("XINDX2","FNC")="12:0:0:0" -^ZZCOVERAGE("XINDX2","FNC",0)="12:0:0:0" -^ZZCOVERAGE("XINDX2","FNC",1)="12:0:0:0" -^ZZCOVERAGE("XINDX2","FNC",2)="12:0:0:0" -^ZZCOVERAGE("XINDX2","FNC",3)="12:0:0:0" -^ZZCOVERAGE("XINDX2","FNC",4)="12:0:0:0" -^ZZCOVERAGE("XINDX2","FUN")="29121:340019:424027:764046" -^ZZCOVERAGE("XINDX2","FUN",0)="29121:36004:40002:76006" -^ZZCOVERAGE("XINDX2","FUN",1)="23452:48002:72003:120005" -^ZZCOVERAGE("XINDX2","FUN",2)="23452:20000:44003:64003" -^ZZCOVERAGE("XINDX2","FUN",3)="23393:96004:56005:152009" -^ZZCOVERAGE("XINDX2","FUN",3,"FOR_LOOP",1)=147754 -^ZZCOVERAGE("XINDX2","FUN",4)="23393:48003:56005:104008" -^ZZCOVERAGE("XINDX2","FUN",5)="23393:60004:92005:152009" -^ZZCOVERAGE("XINDX2","GLO",0)="9104:28002:28001:56003" -^ZZCOVERAGE("XINDX2","GLO",1)="9104:12001:20001:32002" -^ZZCOVERAGE("XINDX2","GLO",2)="9104:16000:28001:44001" -^ZZCOVERAGE("XINDX2","GLO",3)="9104:36002:80004:116006" -^ZZCOVERAGE("XINDX2","GLO",4)="9104:8000:4000:12000" -^ZZCOVERAGE("XINDX2","INC")="322910:416022:652029:1068051" -^ZZCOVERAGE("XINDX2","INC",0)="365505:320019:472020:792039" -^ZZCOVERAGE("XINDX2","INC2")="42595:104006:148008:252014" -^ZZCOVERAGE("XINDX2","INC2",0)="42595:48001:40003:88004" -^ZZCOVERAGE("XINDX2","LOC")="99702:576031:736052:1312083" -^ZZCOVERAGE("XINDX2","LOC",0)="99702:144010:156013:300023" -^ZZCOVERAGE("XINDX2","LOC",1)="99702:124004:148011:272015" -^ZZCOVERAGE("XINDX2","LOC",2)="99702:212011:272014:484025" -^ZZCOVERAGE("XINDX2","LOC",3)="99702:52005:96006:148011" -^ZZCOVERAGE("XINDX2","NAK",0)="996:0:0:0" -^ZZCOVERAGE("XINDX2","NAK",1)="996:0:0:0" -^ZZCOVERAGE("XINDX2","PAT")="205:4000:0:4000" -^ZZCOVERAGE("XINDX2","PAT",0)="205:0:0:0" -^ZZCOVERAGE("XINDX2","PAT",1)="205:4000:0:4000" -^ZZCOVERAGE("XINDX2","PAT",1,"FOR_LOOP",1)=457 -^ZZCOVERAGE("XINDX2","PAT",2)="205:0:0:0" -^ZZCOVERAGE("XINDX2","PATCODE")="457:4000:4000:8000" -^ZZCOVERAGE("XINDX2","PATCODE",0)="457:0:4000:4000" -^ZZCOVERAGE("XINDX2","PATCODE",1)="358:4000:0:4000" -^ZZCOVERAGE("XINDX2","PATCODE",1,"FOR_LOOP",1)=791 -^ZZCOVERAGE("XINDX2","PATCODE",2)="358:0:0:0" -^ZZCOVERAGE("XINDX2","PATCODE",3)="358:0:0:0" -^ZZCOVERAGE("XINDX2","PATCODE",4)="358:0:0:0" -^ZZCOVERAGE("XINDX2","PATQ")="99:4000:4000:8000" -^ZZCOVERAGE("XINDX2","PATQ",0)="99:0:4000:4000" -^ZZCOVERAGE("XINDX2","PATQ",0,"FOR_LOOP",1)=247 -^ZZCOVERAGE("XINDX2","PATQ",1)="99:4000:0:4000" -^ZZCOVERAGE("XINDX2","PATQ",2)="99:0:0:0" -^ZZCOVERAGE("XINDX2","PEEK")="112687:168013:248022:416035" -^ZZCOVERAGE("XINDX2","PEEK",0)="112687:120009:164010:284019" -^ZZCOVERAGE("XINDX2","PEEKDN")="17373:56002:40000:96002" -^ZZCOVERAGE("XINDX2","PEEKDN",0)="17373:48002:32000:80002" -^ZZCOVERAGE("XINDX2","REPCNT")="457:0:0:0" -^ZZCOVERAGE("XINDX2","REPCNT",0)="457:0:0:0" -^ZZCOVERAGE("XINDX2","REPCNT",0,"FOR_LOOP",1)=1004 -^ZZCOVERAGE("XINDX2","REPCNT",1)="457:0:0:0" -^ZZCOVERAGE("XINDX2","REPCNT",2)="457:0:0:0" -^ZZCOVERAGE("XINDX2","SPV",1)="3699:0:8001:8001" -^ZZCOVERAGE("XINDX2","SPV",2)="3699:0:0:0" -^ZZCOVERAGE("XINDX2","ST")="110835:464030:648049:1112079" -^ZZCOVERAGE("XINDX2","ST",0)="110835:192009:248021:440030" -^ZZCOVERAGE("XINDX2","ST",1)="110835:100008:156011:256019" -^ZZCOVERAGE("XINDX2","ST",2)="110835:76005:116005:192010" -^ZZCOVERAGE("XINDX2","TEXT",0)="59:0:0:0" -^ZZCOVERAGE("XINDX2","TEXT",1)="59:0:0:0" -^ZZCOVERAGE("XINDX2","TEXT",2)="59:0:0:0" -^ZZCOVERAGE("XINDX2","TEXT",3)="59:0:0:0" -^ZZCOVERAGE("XINDX2","UP")="44410:116012:180012:296024" -^ZZCOVERAGE("XINDX2","UP",1)="44410:112012:116006:228018" -^ZZCOVERAGE("XINDX2","VA")="5073:16001:20000:36001" -^ZZCOVERAGE("XINDX2","VA",0)="5073:4000:12000:16000" -^ZZCOVERAGE("XINDX2","VA",1)="5073:8000:4000:12000" -^ZZCOVERAGE("XINDX2","VT")="10205:4001:24002:28003" -^ZZCOVERAGE("XINDX2","VT",0)="10205:0:8000:8000" -^ZZCOVERAGE("XINDX2","VT",1)="10205:0:4000:4000" -^ZZCOVERAGE("XINDX3","A",0)="8136:36001:12001:48002" -^ZZCOVERAGE("XINDX3","ASM")="312:12001:0:12001" -^ZZCOVERAGE("XINDX3","ASM",0)="312:0:0:0" -^ZZCOVERAGE("XINDX3","ASM",1)="312:8001:0:8001" -^ZZCOVERAGE("XINDX3","ASM",1,"FOR_LOOP",1)=2110 -^ZZCOVERAGE("XINDX3","ASM",2)="312:0:0:0" -^ZZCOVERAGE("XINDX3","DN")="498:4000:4000:8000" -^ZZCOVERAGE("XINDX3","DN",0)="498:0:4000:4000" -^ZZCOVERAGE("XINDX3","DN",1)="498:4000:0:4000" -^ZZCOVERAGE("XINDX3","FL")="63250:152007:260014:412021" -^ZZCOVERAGE("XINDX3","FL",1)="63250:72000:144009:216009" -^ZZCOVERAGE("XINDX3","FL",2)="63250:64006:80004:144010" -^ZZCOVERAGE("XINDX3","INC")="145482:224018:308026:532044" -^ZZCOVERAGE("XINDX3","INC",0)="145482:188015:196015:384030" -^ZZCOVERAGE("XINDX3","KL",1)="2218:0:4000:4000" -^ZZCOVERAGE("XINDX3","KL1")="28:0:0:0" -^ZZCOVERAGE("XINDX3","KL1",0)="28:0:0:0" -^ZZCOVERAGE("XINDX3","KL2")="724:4000:28000:32000" -^ZZCOVERAGE("XINDX3","KL2",0)="724:0:0:0" -^ZZCOVERAGE("XINDX3","KL2",1)="724:0:4000:4000" -^ZZCOVERAGE("XINDX3","KL2",2)="724:0:0:0" -^ZZCOVERAGE("XINDX3","KL3")="3320:12002:36002:48004" -^ZZCOVERAGE("XINDX3","KL3",0)="3320:4000:8000:12000" -^ZZCOVERAGE("XINDX3","KL3",1)="3320:4001:4000:8001" -^ZZCOVERAGE("XINDX3","KL5",0)="3320:0:20002:20002" -^ZZCOVERAGE("XINDX3","MULT")="498:8001:4000:12001" -^ZZCOVERAGE("XINDX3","MULT",0)="498:4001:0:4001" -^ZZCOVERAGE("XINDX3","MULT",1)="498:4000:4000:8000" -^ZZCOVERAGE("XINDX3","MULT",1,"FOR_LOOP",1)=2401 -^ZZCOVERAGE("XINDX3","MULT",2)="498:0:0:0" -^ZZCOVERAGE("XINDX3","N2",0)="23604:68004:36003:104007" -^ZZCOVERAGE("XINDX3","N2",3)="11802:16002:4000:20002" -^ZZCOVERAGE("XINDX3","N2",4)="187:0:0:0" -^ZZCOVERAGE("XINDX3","N2",5)="187:0:0:0" -^ZZCOVERAGE("XINDX3","N2",6)="11628:12001:20002:32003" -^ZZCOVERAGE("XINDX3","N2",7)="11628:12000:8000:20000" -^ZZCOVERAGE("XINDX3","NE")="779:32002:16001:48003" -^ZZCOVERAGE("XINDX3","NE",1)="2500:4000:4000:8000" -^ZZCOVERAGE("XINDX3","NE",2)="2500:4000:20000:24000" -^ZZCOVERAGE("XINDX3","PEEK")="498:0:0:0" -^ZZCOVERAGE("XINDX3","PEEK",0)="498:0:0:0" -^ZZCOVERAGE("XINDX3","PEEKDN")="39:0:0:0" -^ZZCOVERAGE("XINDX3","PEEKDN",0)="39:0:0:0" -^ZZCOVERAGE("XINDX3","RD",0)="85:0:0:0" -^ZZCOVERAGE("XINDX3","RD1",0)="278:0:4001:4001" -^ZZCOVERAGE("XINDX3","RD1",3)="193:0:4000:4000" -^ZZCOVERAGE("XINDX3","RD1",4)="85:0:0:0" -^ZZCOVERAGE("XINDX3","RD1",5)="85:0:0:0" -^ZZCOVERAGE("XINDX3","RD2")="85:0:4000:4000" -^ZZCOVERAGE("XINDX3","RD2",0)="255:0:0:0" -^ZZCOVERAGE("XINDX3","RD2",1)="170:0:0:0" -^ZZCOVERAGE("XINDX3","RD2",2)="170:0:4000:4000" -^ZZCOVERAGE("XINDX3","RD2",3)="85:0:0:0" -^ZZCOVERAGE("XINDX3","RD3")="108:0:0:0" -^ZZCOVERAGE("XINDX3","RD3",0)="161:0:0:0" -^ZZCOVERAGE("XINDX3","RD3",1)="37:0:0:0" -^ZZCOVERAGE("XINDX3","RD3",2)="37:0:0:0" -^ZZCOVERAGE("XINDX3","S",1)="17579:48005:56003:104008" -^ZZCOVERAGE("XINDX3","S2",0)="110559:164008:220011:384019" -^ZZCOVERAGE("XINDX3","S2",1)="92980:64007:96005:160012" -^ZZCOVERAGE("XINDX3","S2",2)="92980:52004:100005:152009" -^ZZCOVERAGE("XINDX3","S2",3)="87238:60005:68003:128008" -^ZZCOVERAGE("XINDX3","S2",4)="63916:68007:68004:136011" -^ZZCOVERAGE("XINDX3","S2",5)="846:0:0:0" -^ZZCOVERAGE("XINDX3","S2",6)="846:0:4000:4000" -^ZZCOVERAGE("XINDX3","S2",10)="63916:56004:60003:116007" -^ZZCOVERAGE("XINDX3","S2",11)="62481:40002:60003:100005" -^ZZCOVERAGE("XINDX3","S2",12)="62313:56003:56005:112008" -^ZZCOVERAGE("XINDX3","S2",13)="61815:76007:152010:228017" -^ZZCOVERAGE("XINDX3","UP")="498:8000:4000:12000" -^ZZCOVERAGE("XINDX3","UP",1)="498:8000:4000:12000" -^ZZCOVERAGE("XINDX3","VLN",1)="15909:32002:16001:48003" -^ZZCOVERAGE("XINDX3","VLN",2)="15909:44002:28003:72005" -^ZZCOVERAGE("XINDX3","VLNF")="15909:120006:60005:180011" -^ZZCOVERAGE("XINDX3","VLNF",0)="15909:32002:12001:44003" -^ZZCOVERAGE("XINDX4","CNG")="2186:0:24001:24001" -^ZZCOVERAGE("XINDX4","CNG",0)="2186:0:0:0" -^ZZCOVERAGE("XINDX4","CNG",2)="2186:0:8001:8001" -^ZZCOVERAGE("XINDX4","CNG",2,"FOR_LOOP",1)=2202 -^ZZCOVERAGE("XINDX4","CNG",3)="2186:0:12000:12000" -^ZZCOVERAGE("XINDX4","DG",0)="8937:20003:16000:36003" -^ZZCOVERAGE("XINDX4","DG",1)="8937:12000:16001:28001" -^ZZCOVERAGE("XINDX4","DG",2)="8937:8001:20002:28003" -^ZZCOVERAGE("XINDX4","DG",3)="8937:16000:12000:28000" -^ZZCOVERAGE("XINDX4","DG",4)="8937:4000:12001:16001" -^ZZCOVERAGE("XINDX4","DG",5)="8937:0:12002:12002" -^ZZCOVERAGE("XINDX4","DG",6)="8937:12001:12000:24001" -^ZZCOVERAGE("XINDX4","DG",7)="8937:12000:20003:32003" -^ZZCOVERAGE("XINDX4","DG",8)="8937:24001:4001:28002" -^ZZCOVERAGE("XINDX4","DG",9)="8937:4000:12001:16001" -^ZZCOVERAGE("XINDX4","DG",10)="8937:16001:28001:44002" -^ZZCOVERAGE("XINDX4","DG",11)="8937:8000:12000:20000" -^ZZCOVERAGE("XINDX4","DG",12)="8937:4000:16002:20002" -^ZZCOVERAGE("XINDX4","DG",13)="8937:8000:12002:20002" -^ZZCOVERAGE("XINDX4","DG",14)="8937:0:4000:4000" -^ZZCOVERAGE("XINDX4","DG",15)="8937:36002:32002:68004" -^ZZCOVERAGE("XINDX4","DG",16)="8937:8001:4001:12002" -^ZZCOVERAGE("XINDX4","DG",17)="8387:12002:4000:16002" -^ZZCOVERAGE("XINDX4","DG1")="8449:168011:180013:348024" -^ZZCOVERAGE("XINDX4","DG1",0)="8449:12001:16001:28002" -^ZZCOVERAGE("XINDX4","FR",0)="525:0:4001:4001" -^ZZCOVERAGE("XINDX4","FR",1)="525:0:0:0" -^ZZCOVERAGE("XINDX4","FR",2)="525:0:0:0" -^ZZCOVERAGE("XINDX4","INSIDE")="2202:4001:32001:36002" -^ZZCOVERAGE("XINDX4","INSIDE",0)="2202:0:16000:16000" -^ZZCOVERAGE("XINDX4","INSIDE",1)="2202:0:4000:4000" -^ZZCOVERAGE("XINDX4","INSIDE",2)="2202:4001:4000:8001" -^ZZCOVERAGE("XINDX4","LO",1)="259:0:0:0" -^ZZCOVERAGE("XINDX4","LO",2)="259:0:0:0" -^ZZCOVERAGE("XINDX4","LO",3)="259:0:0:0" -^ZZCOVERAGE("XINDX4","LO",4)="259:0:4000:4000" -^ZZCOVERAGE("XINDX4","LO",4,"FOR_LOOP",1)=260 -^ZZCOVERAGE("XINDX4","LO",5)="260:0:0:0" -^ZZCOVERAGE("XINDX4","LO",6)="260:0:0:0" -^ZZCOVERAGE("XINDX4","LO",7)="260:0:0:0" -^ZZCOVERAGE("XINDX4","LO",8)="89:0:0:0" -^ZZCOVERAGE("XINDX4","LO",9)="89:0:0:0" -^ZZCOVERAGE("XINDX4","LO",10)="89:4001:0:4001" -^ZZCOVERAGE("XINDX4","LO",12)="259:0:0:0" -^ZZCOVERAGE("XINDX4","LO",13)="259:0:0:0" -^ZZCOVERAGE("XINDX4","LOOP")="14735:44003:108008:152011" -^ZZCOVERAGE("XINDX4","LOOP",0)="14735:28002:72005:100007" -^ZZCOVERAGE("XINDX4","LOOP",0,"FOR_LOOP",1)=68121 -^ZZCOVERAGE("XINDX4","LOOP",1)="14735:4000:32003:36003" -^ZZCOVERAGE("XINDX4","PAREN")="2638:24000:36004:60004" -^ZZCOVERAGE("XINDX4","PAREN",0)="2638:4000:8000:12000" -^ZZCOVERAGE("XINDX4","PAREN",1)="2638:20000:16001:36001" -^ZZCOVERAGE("XINDX4","PAREN",1,"FOR_LOOP",1)=50171 -^ZZCOVERAGE("XINDX4","PAREN",2)="2638:0:8002:8002" -^ZZCOVERAGE("XINDX4","PAREN",3)="2638:0:0:0" -^ZZCOVERAGE("XINDX4","PRUNE")="2186:8001:16001:24002" -^ZZCOVERAGE("XINDX4","PRUNE",0)="2186:8001:4000:12001" -^ZZCOVERAGE("XINDX4","PRUNE",1)="2186:0:8001:8001" -^ZZCOVERAGE("XINDX4","PRUNE",1,"FOR_LOOP",1)=2186 -^ZZCOVERAGE("XINDX4","PRUNE",2)="2186:0:4000:4000" -^ZZCOVERAGE("XINDX4","PRUNE",2,"FOR_LOOP",1)=2187 -^ZZCOVERAGE("XINDX4","PRUNE",3)="2186:0:0:0" -^ZZCOVERAGE("XINDX4","Q",1)="747:8000:0:8000" -^ZZCOVERAGE("XINDX4","Q",2)="747:0:0:0" -^ZZCOVERAGE("XINDX4","QUOTE")="2402:28002:28000:56002" -^ZZCOVERAGE("XINDX4","QUOTE",0)="2402:20002:20000:40002" -^ZZCOVERAGE("XINDX4","QUOTE",0,"FOR_LOOP",1)=23674 -^ZZCOVERAGE("XINDX4","QUOTE",1)="2402:0:0:0" -^ZZCOVERAGE("XINDX4","QUOTE",2)="2402:8000:4000:12000" -^ZZCOVERAGE("XINDX4","ST")="8937:24000:16002:40002" -^ZZCOVERAGE("XINDX4","ST",0)="8937:12000:8000:20000" -^ZZCOVERAGE("XINDX4","ST",1)="8937:8000:8002:16002" -^ZZCOVERAGE("XINDX4","WR",0)="4584:12001:12000:24001" -^ZZCOVERAGE("XINDX4","WR",1)="4584:0:8000:8000" -^ZZCOVERAGE("XINDX4","WR",2)="4584:72004:56006:128010" -^ZZCOVERAGE("XINDX4","WR",2,"FOR_LOOP",1)=27607 -^ZZCOVERAGE("XINDX4","WR",3)="23023:8002:32003:40005" -^ZZCOVERAGE("XINDX4","WR",4)="20835:12000:32001:44001" -^ZZCOVERAGE("XINDX4","WR",5)="20835:24002:8001:32003" -^ZZCOVERAGE("XINDX4","WR",6)="20835:24000:36002:60002" -^ZZCOVERAGE("XINDX4","WR",7)="20835:0:0:0" -^ZZCOVERAGE("XINDX4","WR",8)="4584:4000:0:4000" -^ZZCOVERAGE("XINDX4","XE",0)="220:0:0:0" -^ZZCOVERAGE("XINDX4","XE",1)="220:0:0:0" -^ZZCOVERAGE("XINDX5","A",0)="468:0:4000:4000" -^ZZCOVERAGE("XINDX5","A",1)="467:28002:24000:52002" -^ZZCOVERAGE("XINDX5","A",1,"FOR_LOOP",1)=4011 -^ZZCOVERAGE("XINDX5","A",2)="467:0:0:0" -^ZZCOVERAGE("XINDX5","AA")="3544:48004:68006:116010" -^ZZCOVERAGE("XINDX5","AA",0)="3544:8002:16003:24005" -^ZZCOVERAGE("XINDX5","AA",1)="1902:0:4000:4000" -^ZZCOVERAGE("XINDX5","AA",2)="1902:4001:0:4001" -^ZZCOVERAGE("XINDX5","AA",3)="1902:12001:4001:16002" -^ZZCOVERAGE("XINDX5","AA",4)="1902:12000:32002:44002" -^ZZCOVERAGE("XINDX5","AA",5)="1902:0:0:0" -^ZZCOVERAGE("XINDX5","AA",6)="1209:0:0:0" -^ZZCOVERAGE("XINDX5","AA",7)="1209:8000:4000:12000" -^ZZCOVERAGE("XINDX5","AA",8)="1209:0:0:0" -^ZZCOVERAGE("XINDX5","AA",9)="1642:0:4000:4000" -^ZZCOVERAGE("XINDX5","AA",10)="1594:0:0:0" -^ZZCOVERAGE("XINDX5","AA",11)="1594:4000:4000:8000" -^ZZCOVERAGE("XINDX5","AA",12)="1642:0:0:0" -^ZZCOVERAGE("XINDX5","B",0)="1:0:0:0" -^ZZCOVERAGE("XINDX5","CLEAN",1)="1:0:0:0" -^ZZCOVERAGE("XINDX5","CLEAN",2)="1:0:0:0" -^ZZCOVERAGE("XINDX5","CLEAN",3)="1:0:0:0" -^ZZCOVERAGE("XINDX5","END",0)="1:0:0:0" -^ZZCOVERAGE("XINDX5","END",1)="1:0:0:0" -^ZZCOVERAGE("XINDX5","END",2)="1:0:0:0" -^ZZCOVERAGE("XINDX5","END",3)="1:0:0:0" -^ZZCOVERAGE("XINDX5","VTAG")="4320:12000:16001:28001" -^ZZCOVERAGE("XINDX5","VTAG",0)="4320:12000:8001:20001" -^ZZCOVERAGE("XINDX5","VTAG",1)="4320:0:4000:4000" -^ZZCOVERAGE("XINDX5","XINDX5",3)="1:0:0:0" -^ZZCOVERAGE("XINDX5","XINDX5",4)="1:0:0:0" -^ZZCOVERAGE("XINDX5","XINDX5",5)="1:0:0:0" -^ZZCOVERAGE("XINDX5","XINDX5",7)="1:0:0:0" -^ZZCOVERAGE("XINDX51","B")="1:0:4001:4001" -^ZZCOVERAGE("XINDX51","B",0)="1:0:0:0" -^ZZCOVERAGE("XINDX51","B",1)="1:0:0:0" -^ZZCOVERAGE("XINDX51","B",3)="1:0:4001:4001" -^ZZCOVERAGE("XINDX51","B",3,"FOR_LOOP",1)=468 -^ZZCOVERAGE("XINDX51","B",4)="1:0:0:0" -^ZZCOVERAGE("XINDX51","B",6)="1:0:0:0" -^ZZCOVERAGE("XINDX51","BHDR")="60:0:4000:4000" -^ZZCOVERAGE("XINDX51","BHDR",0)="60:0:4000:4000" -^ZZCOVERAGE("XINDX51","BHDR",1)="60:0:0:0" -^ZZCOVERAGE("XINDX51","END",0)="1:0:0:0" -^ZZCOVERAGE("XINDX51","HD")="60:0:0:0" -^ZZCOVERAGE("XINDX51","HD",0)="60:0:0:0" -^ZZCOVERAGE("XINDX51","HD",1)="60:0:0:0" -^ZZCOVERAGE("XINDX51","HD1")="1:0:0:0" -^ZZCOVERAGE("XINDX51","HD1",0)="1:0:0:0" -^ZZCOVERAGE("XINDX51","HD1",1)="1:0:0:0" -^ZZCOVERAGE("XINDX51","HD2")="60:4000:0:4000" -^ZZCOVERAGE("XINDX51","HD2",0)="60:4000:0:4000" -^ZZCOVERAGE("XINDX51","HD2",1)="60:0:0:0" -^ZZCOVERAGE("XINDX51","WAIT")="1:0:0:0" -^ZZCOVERAGE("XINDX51","WAIT",0)="1:0:0:0" -^ZZCOVERAGE("XINDX51","WAIT",1)="1:0:0:0" -^ZZCOVERAGE("XINDX51","WAIT",2)="1:0:0:0" -^ZZCOVERAGE("XINDX51","WERR")="60:0:0:0" -^ZZCOVERAGE("XINDX51","WERR",0)="60:0:0:0" -^ZZCOVERAGE("XINDX51","WERR",1)="60:0:0:0" -^ZZCOVERAGE("XINDX51","WERR",2)="60:0:0:0" -^ZZCOVERAGE("XINDX51","WERR",2,"FOR_LOOP",1)=135 -^ZZCOVERAGE("XINDX51","WERR",3)="75:0:0:0" -^ZZCOVERAGE("XINDX51","WERR",4)="75:0:0:0" -^ZZCOVERAGE("XINDX51","WERR",5)="75:0:0:0" -^ZZCOVERAGE("XINDX51","WERR",6)="75:0:0:0" -^ZZCOVERAGE("XINDX51","WERR",7)="60:0:0:0" -^ZZCOVERAGE("XINDX51","WORL")="70:0:0:0" -^ZZCOVERAGE("XINDX51","WORL",0)="70:0:0:0" -^ZZCOVERAGE("XINDX51","WORL",1)="70:0:0:0" -^ZZCOVERAGE("XINDX51","WORL",2)="70:0:0:0" -^ZZCOVERAGE("XINDX51","WORL",3)="70:0:0:0" -^ZZCOVERAGE("XINDX51","WORL",3,"FOR_LOOP",1)=76 -^ZZCOVERAGE("XINDX51","WORL",4)="70:0:0:0" -^ZZCOVERAGE("XINDX52","CASE")="2:0:0:0" -^ZZCOVERAGE("XINDX52","CASE",0)="2:0:0:0" -^ZZCOVERAGE("XINDX52","CASE",1)="2:0:0:0" -^ZZCOVERAGE("XINDX6","ANS")="2:0:0:0" -^ZZCOVERAGE("XINDX6","ANS",0)="2:0:0:0" -^ZZCOVERAGE("XINDX6","ANS",1)="2:0:0:0" -^ZZCOVERAGE("XINDX6","ANS",1,"FOR_LOOP",1)=2 -^ZZCOVERAGE("XINDX6","ANS",2)="2:0:0:0" -^ZZCOVERAGE("XINDX6","ASKRTN")="1:4000:0:4000" -^ZZCOVERAGE("XINDX6","ASKRTN",1)="1:0:0:0" -^ZZCOVERAGE("XINDX6","ASKRTN",1,"FOR_LOOP",1)=468 -^ZZCOVERAGE("XINDX6","ASKRTN",2)="1:4000:0:4000" -^ZZCOVERAGE("XINDX6","ASKRTN",2,"FOR_LOOP",1)=468 -^ZZCOVERAGE("XINDX6","ASKRTN",3)="1:0:0:0" -^ZZCOVERAGE("XINDX6","DEVICE",0)="1:0:0:0" -^ZZCOVERAGE("XINDX6","DEVICE",2)="1:0:0:0" -^ZZCOVERAGE("XINDX6","DEVICE",3)="1:0:0:0" -^ZZCOVERAGE("XINDX6","L7",0)="1:0:0:0" -^ZZCOVERAGE("XINDX6","L7",1)="1:0:0:0" -^ZZCOVERAGE("XINDX6","NY")="1:0:0:0" -^ZZCOVERAGE("XINDX6","NY",0)="1:0:0:0" -^ZZCOVERAGE("XINDX6","PARAM")="1:0:0:0" -^ZZCOVERAGE("XINDX6","PARAM",1)="1:0:0:0" -^ZZCOVERAGE("XINDX6","PARAM",2)="1:0:0:0" -^ZZCOVERAGE("XINDX6","PARAM",2,"FOR_LOOP",1)=10 -^ZZCOVERAGE("XINDX6","PARAM",3)="1:0:0:0" -^ZZCOVERAGE("XINDX6","PARAM",4)="1:0:0:0" -^ZZCOVERAGE("XINDX6","PARAM",5)="1:0:0:0" -^ZZCOVERAGE("XINDX6","PARAM",6)="1:0:0:0" -^ZZCOVERAGE("XINDX6","PARAM",7)="1:0:0:0" -^ZZCOVERAGE("XINDX6","RD")="2:0:0:0" -^ZZCOVERAGE("XINDX6","RD",0)="2:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",5)="1:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",6)="1:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",7)="1:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",8)="1:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",9)="1:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",10)="1:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",11)="1:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",12)="1:0:0:0" -^ZZCOVERAGE("XINDX6","XINDX6",13)="1:0:0:0" -^ZZCOVERAGE("XINDX6","YN")="1:0:0:0" -^ZZCOVERAGE("XINDX6","YN",0)="1:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD")="1:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD",0)="1:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD",1)="1:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD",1,"FOR_LOOP",1)=10 -^ZZCOVERAGE("XINDX7","BUILD",2)="9:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD",3)="6:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD",3,"FOR_LOOP",1)=85 -^ZZCOVERAGE("XINDX7","BUILD",4)="79:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD",5)="79:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD",6)="6:0:0:0" -^ZZCOVERAGE("XINDX7","BUILD",7)="1:0:0:0" -^ZZCOVERAGE("XINDX7","HDR")="2:0:0:0" -^ZZCOVERAGE("XINDX7","HDR",0)="2:0:0:0" -^ZZCOVERAGE("XINDX7","HDR",1)="2:0:0:0" -^ZZCOVERAGE("XINDX7","HDR",2)="1:0:0:0" -^ZZCOVERAGE("XINDX7","HDR",3)="1:0:0:0" -^ZZCOVERAGE("XINDX7","HDR",4)="1:0:0:0" -^ZZCOVERAGE("XINDX7","HDR",5)="1:0:0:0" -^ZZCOVERAGE("XINDX7","HDR",6)="2:0:0:0" -^ZZCOVERAGE("XINDX7","HDR",7)="2:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP")="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",1)="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",2)="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",3)="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",4)="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",6)="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",7)="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",7,"FOR_LOOP",1)=468 -^ZZCOVERAGE("XINDX7","SETUP",8)="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",9)="1:0:0:0" -^ZZCOVERAGE("XINDX7","SETUP",10)="1:0:0:0" -^ZZCOVERAGE("XINDX9","ADD")="406841:436032:684041:1120073" -^ZZCOVERAGE("XINDX9","ADD",0)="598820:552042:692040:1244082" -^ZZCOVERAGE("XINDX9","AR")="197699:748039:1052073:1800112" -^ZZCOVERAGE("XINDX9","AR",0)="197699:708036:936061:1644097" -^ZZCOVERAGE("XINDX9","CASE")="23461:28003:92005:120008" -^ZZCOVERAGE("XINDX9","CASE",0)="23461:12002:48003:60005" -^ZZCOVERAGE("XINDX9","CASE",1)="23461:12001:28000:40001" -^ZZCOVERAGE("XINDX9","DN")="45002:204010:248016:452026" -^ZZCOVERAGE("XINDX9","DN",0)="45002:176008:196011:372019" -^ZZCOVERAGE("XINDX9","DN",1)="45002:16001:24003:40004" -^ZZCOVERAGE("XINDX9","EXT",1)="1970:4000:12001:16001" -^ZZCOVERAGE("XINDX9","FNC")="29146:96005:104009:200014" -^ZZCOVERAGE("XINDX9","FNC",0)="29146:28001:20003:48004" -^ZZCOVERAGE("XINDX9","FNC",1)="29146:44002:72005:116007" -^ZZCOVERAGE("XINDX9","FNC",2)="12:0:0:0" -^ZZCOVERAGE("XINDX9","FNC",3)="12:0:0:0" -^ZZCOVERAGE("XINDX9","FUNC")="29134:284015:400024:684039" -^ZZCOVERAGE("XINDX9","FUNC",1)="29134:112005:120007:232012" -^ZZCOVERAGE("XINDX9","FUNC",2)="23461:48003:72004:120007" -^ZZCOVERAGE("XINDX9","FUNC",3)="23461:20000:32001:52001" -^ZZCOVERAGE("XINDX9","FX",0)="23461:68004:116009:184013" -^ZZCOVERAGE("XINDX9","GVAR")="29134:96004:180015:276019" -^ZZCOVERAGE("XINDX9","GVAR",0)="29134:28000:44003:72003" -^ZZCOVERAGE("XINDX9","GVAR",1)="29134:32001:72005:104006" -^ZZCOVERAGE("XINDX9","GVAR",2)="29134:16000:24002:40002" -^ZZCOVERAGE("XINDX9","INC")="29134:64003:64007:128010" -^ZZCOVERAGE("XINDX9","INC",0)="29134:20001:12001:32002" -^ZZCOVERAGE("XINDX9","INC",1)="29134:32002:40004:72006" -^ZZCOVERAGE("XINDX9","NEW")="287703:532032:660032:1192064" -^ZZCOVERAGE("XINDX9","NEW",0)="287703:200012:244014:444026" -^ZZCOVERAGE("XINDX9","NEW",1)="287703:220014:248008:468022" -^ZZCOVERAGE("XINDX9","NUM")="45379:292023:340026:632049" -^ZZCOVERAGE("XINDX9","NUM",0)="45379:92006:84006:176012" -^ZZCOVERAGE("XINDX9","NUM",0,"FOR_LOOP",1)=71145 -^ZZCOVERAGE("XINDX9","NUM",1)="45379:40005:48002:88007" -^ZZCOVERAGE("XINDX9","NUM",2)="45379:40004:56005:96009" -^ZZCOVERAGE("XINDX9","NUM",3)="45379:76003:88008:164011" -^ZZCOVERAGE("XINDX9","NUM",4)="45379:24003:40003:64006" -^ZZCOVERAGE("XINDX9","PA2",0)="518346:544028:668032:1212060" -^ZZCOVERAGE("XINDX9","PA2",1)="472665:532043:620035:1152078" -^ZZCOVERAGE("XINDX9","PA2",2)="317803:264019:292021:556040" -^ZZCOVERAGE("XINDX9","PA2",3)="317803:200013:324018:524031" -^ZZCOVERAGE("XINDX9","PA2",4)="307072:348020:492025:840045" -^ZZCOVERAGE("XINDX9","PA2",5)="197397:160015:296011:456026" -^ZZCOVERAGE("XINDX9","PA2",6)="152018:120016:132005:252021" -^ZZCOVERAGE("XINDX9","PA2",7)="152018:116009:112008:228017" -^ZZCOVERAGE("XINDX9","PA2",8)="151813:96008:168010:264018" -^ZZCOVERAGE("XINDX9","PA2",9)="151813:100008:172009:272017" -^ZZCOVERAGE("XINDX9","PA2",10)="151813:220008:324022:544030" -^ZZCOVERAGE("XINDX9","PA2",11)="151813:168011:152010:320021" -^ZZCOVERAGE("XINDX9","PA2",12)="151813:128009:148012:276021" -^ZZCOVERAGE("XINDX9","PA2",13)="151813:136005:104009:240014" -^ZZCOVERAGE("XINDX9","PARSE")="45681:3356226:4340257:7696483" -^ZZCOVERAGE("XINDX9","PARSE",0)="45681:104007:108007:212014" -^ZZCOVERAGE("XINDX9","PAT")="205:0:0:0" -^ZZCOVERAGE("XINDX9","PAT",0)="205:0:0:0" -^ZZCOVERAGE("XINDX9","PAT",1)="205:0:0:0" -^ZZCOVERAGE("XINDX9","PAT",1,"FOR_LOOP",1)=1185 -^ZZCOVERAGE("XINDX9","PAT",2)="205:0:0:0" -^ZZCOVERAGE("XINDX9","PAT",3)="205:0:0:0" -^ZZCOVERAGE("XINDX9","PAT",4)="205:0:0:0" -^ZZCOVERAGE("XINDX9","PATC")="28:0:0:0" -^ZZCOVERAGE("XINDX9","PATC",0)="28:0:0:0" -^ZZCOVERAGE("XINDX9","PATQ")="99:0:8000:8000" -^ZZCOVERAGE("XINDX9","PATQ",0)="99:0:0:0" -^ZZCOVERAGE("XINDX9","PATQ",0,"FOR_LOOP",1)=247 -^ZZCOVERAGE("XINDX9","PATQ",1)="99:0:0:0" -^ZZCOVERAGE("XINDX9","PATQ",2)="99:0:8000:8000" -^ZZCOVERAGE("XINDX9","PATU")="15:0:0:0" -^ZZCOVERAGE("XINDX9","PATU",0)="15:0:0:0" -^ZZCOVERAGE("XINDX9","PEND",0)="45681:68001:140014:208015" -^ZZCOVERAGE("XINDX9","PEND",1)="45681:36004:52005:88009" -^ZZCOVERAGE("XINDX9","QUOTE")="35724:244013:304019:548032" -^ZZCOVERAGE("XINDX9","QUOTE",0)="36272:172010:140009:312019" -^ZZCOVERAGE("XINDX9","QUOTE",0,"FOR_LOOP",1)=323021 -^ZZCOVERAGE("XINDX9","QUOTE",1)="36272:28001:72004:100005" -^ZZCOVERAGE("XINDX9","QUOTE",2)="35724:28001:24003:52004" -^ZZCOVERAGE("XINDX9","QUOTE",3)="35724:16001:52002:68003" -^ZZCOVERAGE("XINDX9","SPV",0)="3703:4000:12000:16000" -^ZZCOVERAGE("XINDX9","SPV",1)="3703:8001:4000:12001" -^ZZCOVERAGE("XINDX9","SPV",2)="3703:8001:4000:12001" -^ZZCOVERAGE("XINDX9","SPV",3)="3703:4000:8001:12001" -^ZZCOVERAGE("XINDX9","STR")="287703:560037:724043:1284080" -^ZZCOVERAGE("XINDX9","STR",0)="287703:300018:312020:612038" -^ZZCOVERAGE("XINDX9","SUM")="213322:612034:916052:1528086" -^ZZCOVERAGE("XINDX9","SUM",0)="213322:160009:208011:368020" -^ZZCOVERAGE("XINDX9","SUM",1)="213322:212007:280018:492025" -^ZZCOVERAGE("XINDX9","SUM",2)="213322:136012:268012:404024" -^ZZCOVERAGE("XINDX9","UP")="45002:396026:440029:836055" -^ZZCOVERAGE("XINDX9","UP",0)="45002:24003:44001:68004" -^ZZCOVERAGE("XINDX9","UP",1)="45002:180008:192016:372024" -^ZZCOVERAGE("XINDX9","UP",2)="45002:136010:128005:264015" -^ZZCOVERAGE("XINDX9","UP",3)="45002:40003:52003:92006" -^ZZCOVERAGE("XINDX9","VAR")="138809:828044:1004072:1832116" -^ZZCOVERAGE("XINDX9","VAR",0)="138809:376018:336017:712035" -^ZZCOVERAGE("XINDX9","VAR",0,"FOR_LOOP",1)=462128 -^ZZCOVERAGE("XINDX9","VAR",1)="138809:292018:376034:668052" -^ZZCOVERAGE("XINDX9","VAR",2)="138809:116003:144008:260011" -^ZZCOVERAGE("XINDX9","XINDX9")="45681:296016:320021:616037" -^ZZCOVERAGE("XINDX9","XINDX9",3)="45681:52003:128006:180009" -^ZZCOVERAGE("XINDX9","XINDX9",4)="45681:164006:112008:276014" -^ZZCOVERAGE("XINDX9","XINDX9",4,"FOR_LOOP",1)=128269 -^ZZCOVERAGE("XINDX9","XINDX9",5)="45681:48004:52005:100009" -^ZZCOVERAGE("XLFDT","DT")="1:0:0:0" -^ZZCOVERAGE("XLFDT","DT",0)="1:0:0:0" -^ZZCOVERAGE("XLFDT","DT",1)="1:0:0:0" -^ZZCOVERAGE("XLFDT","HR")="3:0:0:0" -^ZZCOVERAGE("XLFDT","HR",0)="3:0:0:0" -^ZZCOVERAGE("XLFDT","HR",1)="3:0:0:0" -^ZZCOVERAGE("XLFDT","HTE")="1:0:0:0" -^ZZCOVERAGE("XLFDT","HTE",0)="1:0:0:0" -^ZZCOVERAGE("XLFDT","HTE",1)="1:0:0:0" -^ZZCOVERAGE("XLFDT","HTE",2)="1:0:0:0" -^ZZCOVERAGE("XLFDT","HTE",3)="1:0:0:0" -^ZZCOVERAGE("XLFDT","HTFM")="2:0:0:0" -^ZZCOVERAGE("XLFDT","HTFM",0)="2:0:0:0" -^ZZCOVERAGE("XLFDT","HTFM",1)="2:0:0:0" -^ZZCOVERAGE("XLFDT","HTFM",2)="2:0:0:0" -^ZZCOVERAGE("XLFDT","HTFM",3)="2:0:0:0" -^ZZCOVERAGE("XLFDT","HTFM",4)="2:0:0:0" -^ZZCOVERAGE("XLFDT","HTFM",5)="2:0:0:0" -^ZZCOVERAGE("XLFDT","T2",0)="1:0:0:0" -^ZZCOVERAGE("XLFDT","T2",1)="1:0:0:0" -^ZZCOVERAGE("XLFDT","YMD")="2:0:0:0" -^ZZCOVERAGE("XLFDT","YMD",1)="2:0:0:0" -^ZZCOVERAGE("XLFDT","YMD",2)="2:0:0:0" -^ZZCOVERAGE("XLFDT","YMD",3)="2:0:0:0" -^ZZCOVERAGE("XLFDT","YMD",4)="2:0:0:0" -^ZZCOVERAGE("XLFDT","YMD",5)="2:0:0:0" -^ZZCOVERAGE("XLFDT1","F1",1)="1:0:0:0" -^ZZCOVERAGE("XLFDT1","FMT")="1:0:0:0" -^ZZCOVERAGE("XLFDT1","FMT",1)="1:0:0:0" -^ZZCOVERAGE("XLFDT1","FMT",2)="1:0:0:0" -^ZZCOVERAGE("XLFDT1","M")="1:0:0:0" -^ZZCOVERAGE("XLFDT1","M",0)="1:0:0:0" -^ZZCOVERAGE("XLFDT1","TM",1)="1:0:0:0" -^ZZCOVERAGE("XLFDT1","TM",2)="1:0:0:0" -^ZZCOVERAGE("XLFDT1","TM",3)="1:0:0:0" -^ZZCOVERAGE("XLFDT1","TM",7)="1:0:0:0" -^ZZCOVERAGE("XPDRSUM","SUMB")="467:1808124:180014:1988138" -^ZZCOVERAGE("XPDRSUM","SUMB",0)="467:8000:0:8000" -^ZZCOVERAGE("XPDRSUM","SUMB",2)="467:0:0:0" -^ZZCOVERAGE("XPDRSUM","SUMB",3)="467:1796124:180014:1976138" -^ZZCOVERAGE("XPDRSUM","SUMB",3,"FOR_LOOP",1)=44620 -^ZZCOVERAGE("XPDRSUM","SUMB",3,"FOR_LOOP",2)=1566704 -^ZZCOVERAGE("XPDRSUM","SUMB",4)="467:0:0:0" -^ZZCOVERAGE("XTRUTL1","BUILD")="1:0:0:0" -^ZZCOVERAGE("XTRUTL1","BUILD",0)="1:0:0:0" -^ZZCOVERAGE("XTRUTL1","BUILD",1)="1:0:0:0" -^ZZCOVERAGE("XTRUTL1","BUILD",2)="1:0:0:0" -^ZZCOVERAGE("XTRUTL1","BUILD",3)="1:0:0:0" - - diff --git a/Tests/MumpsCoverage/VistA-FOIA/Packages/Toolkit/Routines/XINDEX.m b/Tests/MumpsCoverage/VistA-FOIA/Packages/Toolkit/Routines/XINDEX.m deleted file mode 100644 index b045221..0000000 --- a/Tests/MumpsCoverage/VistA-FOIA/Packages/Toolkit/Routines/XINDEX.m +++ /dev/null @@ -1,144 +0,0 @@ -XINDEX ;ISC/REL,GFT,GRK,RWF - INDEX & CROSS-REFERENCE ;08/04/08 13:19 - ;;7.3;TOOLKIT;**20,27,48,61,66,68,110,121,128**;Apr 25, 1995;Build 1 - ; Per VHA Directive 2004-038, this routine should not be modified. - G ^XINDX6 -SEP F I=1:1 S CH=$E(LIN,I) D QUOTE:CH=Q Q:" "[CH - S ARG=$E(LIN,1,I-1) S:CH=" " I=I+1 S LIN=$E(LIN,I,999) Q -QUOTE F I=I+1:1 S CH=$E(LIN,I) Q:CH=""!(CH=Q) - Q:CH]"" S ERR=6 G ^XINDX1 -ALIVE ;enter here from taskman - D SETUP^XINDX7 ;Get ready to process -A2 S RTN=$O(^UTILITY($J,RTN)) G ^XINDX5:RTN="" - S INDLC=(RTN?1"|"1.4L.NP) D LOAD:'INDLC - I $D(ZTQUEUED),$$S^%ZTLOAD S RTN="~",IND("QUIT")=1,ZTSTOP=1 G A2 - I 'INDDS,INDLC W !!?10,"Data Dictionaries",! S INDDS=1 - D BEG - G A2 - ; -LOAD S X=RTN,XCNP=0,DIF="^UTILITY("_$J_",1,RTN,0," X ^%ZOSF("TEST") Q:'$T X ^%ZOSF("LOAD") S ^UTILITY($J,1,RTN,0,0)=XCNP-1 - I $D(^UTILITY($J,1,RTN,0,0)) S ^UTILITY($J,1,RTN,"RSUM")="B"_$$SUMB^XPDRSUM($NA(^UTILITY($J,1,RTN,0))) - Q -BEG ; - S %=INDLC*5 W:$X+10+%>IOM ! W RTN,$J("",10+%-$L(RTN)) - S (IND("DO"),IND("SZT"),IND("SZC"),LABO)=0,LC=$G(^UTILITY($J,1,RTN,0,0)) - I LC="" W !,">>>Routine '",RTN,"' not found <<<",! Q - S TXT="",LAB=$P(^UTILITY($J,1,RTN,0,1,0)," ") I RTN'=$P(LAB,"(") D E^XINDX1(17) - I 'INDLC,LAB["(" D E^XINDX1(55) S LAB=$P(LAB,"(") - ;if M routine(not compiled template or DD) and has more than 2 lines, check lines 1 & 2 - I 'INDLC,LC>2 D - . N LABO S LABO=1 - . S LIN=$G(^UTILITY($J,1,RTN,0,1,0)),TXT=1 - . ;check 1st line (site/dev - ) patch 128 - . I $P(LIN,";",2,4)'?.E1"/".E.1"-".E D E^XINDX1(62) - . S LIN=$G(^UTILITY($J,1,RTN,0,2,0)),TXT=2 - . ;check 2nd line (;;nn.nn[TV]nn;package;.anything) - . I $P(LIN,";",3,99)'?1.2N1"."1.2N.1(1"T",1"V").2N1";"1A.AP1";".E D E^XINDX1(44) ;patch 121 - . I $L(INP(11)) X INP(11) ;Version number check - . I $L(INP(12)) X INP(12) ;Patch number check -B5 F TXT=1:1:LC S LIN=^UTILITY($J,1,RTN,0,TXT,0),LN=$L(LIN),IND("SZT")=IND("SZT")+LN+2 D LN,ST ;Process Line - S LAB="",LABO=0,TXT=0,^UTILITY($J,1,RTN,0)=IND("SZT")_"^"_LC_"^"_IND("SZC") - I IND("SZT")>INP("MAX"),'INDLC S ERR=35,ERR(1)=IND("SZT") D ^XINDX1 - I IND("SZT")-IND("SZC")>INP("CMAX"),'INDLC S ERR=58,ERR(1)=IND("SZT")-IND("SZC") D ^XINDX1 - D POSTRTN - Q - ;Proccess one line, LN = Length, LIN = Line. -LN K V S (ARG,GRB,IND("COM"),IND("DOL"),IND("F"))="",X=$P(LIN," ") - I '$L(X) S LABO=LABO+1 G CD - S (IND("COM"),LAB)=$P(X,"("),ARG=$P($P(X,"(",2),")"),LABO=0,IND("PP")=X?1.8E1"(".E1")" - D:$L(ARG) NE^XINDX3 ;Process formal parameters as New list. - I 'INDLC,'$$VT^XINDX2(LAB) D E^XINDX1($S(LAB=$$CASE^XINDX52(LAB):37,1:55)) ;Check for bad labels - I $D(^UTILITY($J,1,RTN,"T",LAB)) D E^XINDX1(15) G CD ;DUP label - S ^UTILITY($J,1,RTN,"T",LAB)="" -CD I LN>245 D:'(LN=246&($E(RTN,1,3)="|dd")) E^XINDX1(19) ;patch 119 - D:LIN'?1.ANP E^XINDX1(18) - S LIN=$P(LIN," ",2,999),IND("LCC")=1 - I LIN="" D E^XINDX1(42) Q ;Blank line ;p110 - S I=0 ;Watch the scope of I, counts dots - I " ."[$E(LIN) D S X=$L($E(LIN,1,I),".")-1,LIN=$E(LIN,I,999) - . F I=1:1:245 Q:". "'[$E(LIN,I) - . Q - ;check dots against Do level IND("DO"), IND("DOL")=dot level - D:'I&$G(IND("DO1")) E^XINDX1(51) S IND("DO1")=0 S:'I IND("DO")=0 - I I D:X>IND("DO") E^XINDX1(51) S (IND("DO"),IND("DOL"))=X - ;Count Comment lines, skip ;; lines - I $E(LIN)=";",$E(LIN,2)'=";" S IND("SZC")=IND("SZC")+$L(LIN) ;p110 - ;Process commands on line. -EE I LIN="" D ^XINDX2 Q - S COM=$E(LIN),GK="",ARG="" - I COM=";" S LIN="" G EE ;p110 - I COM=" " S ERR=$S(LIN?1." ":13,1:0),LIN=$S(ERR:"",1:$E(LIN,2,999)) D:ERR ^XINDX1 G EE - D SEP - S CM=$P(ARG,":",1),POST=$P(ARG,":",2,999),IND("COM")=IND("COM")_$C(9)_COM,ERR=48 - D:ARG[":"&(POST']"") ^XINDX1 S:POST]"" GRB=GRB_$C(9)_POST,IND("COM")=IND("COM")_":" - ;SAC now allows lowercase commands - I CM?.E1L.E S CM=$$CASE^XINDX52(CM),COM=$E(CM) ;I IND("LCC") S IND("LCC")=0 D E^XINDX1(47) - I CM="" D E^XINDX1(21) G EE ;Missing command - S CX=$G(IND("CMD",CM)) I CX="" D G:CX="" EE - . I $E(CM)="Z" S CX="^Z" Q ;Proccess Z commands - . D E^XINDX1(1) S LIN="" Q - S CX=$P(CX,"^",2,9) - D SEP I '$L(LIN),CH=" " D E^XINDX1(13) ;trailing space - I ARG="","CGJMORSUWX"[COM S ERR=49 G ^XINDX1 - I CX>0 D E^XINDX1(CX) S CX="" - D:$L(CX) @CX S:ARG'="" GRB=GRB_$C(9)_ARG G EE -B S ERR=25 G ^XINDX1 -C S ERR=29 G ^XINDX1 -D G DG1^XINDX4 -E Q:ARG="" S ERR=7 G ^XINDX1 -F G:ARG]"" FR^XINDX4 S IND("F")=1 Q -G G DG^XINDX4 -H Q:ARG'="" S ERR=32 G ^XINDX1 -J S ERR=36,ARG="" G ^XINDX1 -K S ERR=$S(ARG?1"(".E:22,ARG?." ":23,1:0) D:ERR ^XINDX1 - G KL^XINDX3 -L G LO^XINDX4 -M G S^XINDX3 -N G NE^XINDX3 -O S ERR=34 D ^XINDX1,O^XINDX3 Q -Q Q:ARG="" G Q^XINDX4 -R S RDTIME=0 G RD^XINDX3 -S G S^XINDX3 -TR Q ;What to process. p110 -U S ARG=$P(ARG,":") Q -V S ARG="",ERR=20 G ^XINDX1 -W G WR^XINDX4 -X G XE^XINDX4 -Z S ERR=2 D ^XINDX1 G ZC^XINDX4 - ; - ;Save off items from line. -ST S R=LAB_$S(LABO:"+"_LABO,1:"") - ;Local variable, Global, Marked Items, Naked global, Internal ref, eXternal ref., Tag ref. - S LOC="" F S LOC=$O(V(LOC)),S="" Q:LOC="" F S S=$O(V(LOC,S)) Q:S="" D SET - S ^UTILITY($J,1,RTN,"COM",TXT)=IND("COM") - Q - ; -SET I V(LOC,S)]"" F %="!","~" I V(LOC,S)[%,$G(^UTILITY($J,1,RTN,LOC,S))'[% S ^(S)=$G(^(S))_% - S %=0 -SE2 S ARG=$G(^UTILITY($J,1,RTN,LOC,S,%)) I $L(ARG)>230 S %=%+1 G SE2 - S ^UTILITY($J,1,RTN,LOC,S,%)=ARG_R_V(LOC,S)_"," - Q - ; -POSTRTN ;Do more overall checking - N V,E,T,T1,T2 - S T="" ;Check for missing Labels - F S T=$O(^UTILITY($J,1,RTN,"I",T)),T2=T Q:T="" S T1=$G(^(T,0)) D - . Q:$E(T2,1,2)="@(" - . S:$E(T2,1,2)="$$" T2=$E(T2,3,99) - . I T2]"",'$D(^UTILITY($J,1,RTN,"T",$P(T2,"+",1))) D - . . F I=1:1:$L(T1,",")-1 S LAB=$P(T1,",",I),LABO=+$P(LAB,"+",2),LAB=$P(LAB,"+"),E=14,E(1)=T D E^XINDX1(.E) - . . Q - . Q - S LAB="",LABO=0 ;Check for valid label names - I 'INDLC F S LAB=$O(^UTILITY($J,1,RTN,"T",LAB)) Q:LAB="" D - . I '$$VA^XINDX2(LAB) D E^XINDX1(55) Q - . D:'$$VT^XINDX2(LAB) E^XINDX1(37) - . Q - S LAB="",LABO=0 ;Check for valid variable names. - F S LAB=$O(^UTILITY($J,1,RTN,"L",LAB)) Q:LAB="" D - . D VLNF^XINDX3($P(LAB,"(")) - . Q - Q - ; -QUICK ;Quick, Just get a routine an print the results - D QUICK^XINDX6() - Q diff --git a/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m b/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m new file mode 100644 index 0000000..9a08edf --- /dev/null +++ b/Tests/MumpsCoverage/VistA-FOIA/Packages/Uncategorized/ZZCOVTST.m @@ -0,0 +1,36 @@ +ZZCOVTST;OSEHRA/JPS -- Test routine for Coverage Parsing;4/28/2014 + ; (tab) This is series of comments + ; (tab) it should all be not executable + ; (spaces) one of these sets might be a problem + ; (spaces) we will have to see. +EN ; This entry point shouldn't be found without fixing + N D + S D=1 ;An executable line + D T1^ZZCOVTST + I '$$T5 W "RETURNED FROM t5",! + Q + ; This line not executable + ; +T1 ; This line should always be found + N D + S D=2 + W !,D,!,"This is the second entry point",! + D T2^ZZCOVTST(D) + Q + ; +T2(EQ) ; This is debatable and only called with ENT^ROU notation + N D + S D=3 + W !,D,!,EQ,"This is the third entry point",! + D T3^ZZCOVTST + Q + ; +T3 N D S D=4 W D,!,"Fourth Entry point",! Q + ; +T4 N D S D=5 W "Shouldn't be executed" + W "Lots to not do" + Q +T5(EQ) ;this entry point is called with a $$ notation + W "THIS IS THE $$ NOTATION!",! + Q 0 + ; diff --git a/Tests/MumpsCoverage/ZZCOVTST.cmcov b/Tests/MumpsCoverage/ZZCOVTST.cmcov new file mode 100644 index 0000000..798e5b2 --- /dev/null +++ b/Tests/MumpsCoverage/ZZCOVTST.cmcov @@ -0,0 +1,38 @@ +Routine,Line,RtnLine,Code
+ZZCOVTST,1,0,"ZZCOVTST;OSEHRA/JPS -- Test routine for Coverage Parsing;4/28/2014"
+,2,0," ; (tab) This is series of comments"
+,3,0," ; (tab) it should all be not executable"
+,4,0," ; (spaces) one of these sets might be a problem"
+,5,0," ; (spaces) we will have to see."
+,6,0,"EN ; This entry point shouldn't be found without fixing"
+,7,1," N D"
+,8,1," S D=1 ;An executable line"
+,9,1," D T1^ZZCOVTST"
+,10,1,"I '$$T5 W ""RETURNED FROM t5"",!"
+,11,1," Q"
+,12,0," ; This line not executable"
+,13,0," ;"
+,14,0,"T1 ; This line should always be found"
+,15,1," N D"
+,16,1," S D=2"
+,17,1," W !,D,!,""This is the second entry point"",!"
+,18,1," D T2^ZZCOVTST(D)"
+,19,1," Q"
+,20,0," ;"
+,21,0,"T2(EQ) ; This is debatable"
+,22,1," N D"
+,23,1," S D=3"
+,24,1," W !,D,!,EQ,""This is the third entry point"",!"
+,25,1," D T3^ZZCOVTST"
+,26,1," Q"
+,27,0," ;"
+,28,1,"T3 N D S D=4 W D,!,""Fourth Entry point"",! Q"
+,29,0," ;"
+,30,0,"T4 N D S D=5 W ""Shouldn't be executed"""
+,31,0," W ""Lots to not do"""
+,32,0," Q"
+,33,1,"T5()"
+,34,1," W ""THIS IS ONE WITH $$ NOTATION"",1"
+,35,1," Q 0"
+,36,0," ;"
+Totals for ZZCOVTST,,19,
diff --git a/Tests/MumpsCoverage/ZZCOVTST.mcov b/Tests/MumpsCoverage/ZZCOVTST.mcov new file mode 100644 index 0000000..f73d354 --- /dev/null +++ b/Tests/MumpsCoverage/ZZCOVTST.mcov @@ -0,0 +1,30 @@ +%GO Global Output Utility +GT.M 30-APR-2014 14:24:46 ZWR +^ZZCOVERAGE("*CHILDREN")="0:0:0" +^ZZCOVERAGE("*RUN")="24000:88000:112000" +^ZZCOVERAGE("ZZCOVTST","EN")="1:4000:8000:12000:6464583" +^ZZCOVERAGE("ZZCOVTST","EN",1)="1:0:0:0:20" +^ZZCOVERAGE("ZZCOVTST","EN",2)="1:0:0:0:14" +^ZZCOVERAGE("ZZCOVTST","EN",3)="1:0:0:0:26" +^ZZCOVERAGE("ZZCOVTST","EN",4)="1:0:0:0:228" +^ZZCOVERAGE("ZZCOVTST","T1")="1:0:0:0:92" +^ZZCOVERAGE("ZZCOVTST","T1",1)="1:0:0:0:13" +^ZZCOVERAGE("ZZCOVTST","T1",2)="1:0:0:0:12" +^ZZCOVERAGE("ZZCOVTST","T1",3)="1:0:0:0:14" +^ZZCOVERAGE("ZZCOVTST","T1",4)="1:0:0:0:29" +^ZZCOVERAGE("ZZCOVTST","T1",5)="1:0:0:0:12" +^ZZCOVERAGE("ZZCOVTST","T2")="1:0:0:0:102" +^ZZCOVERAGE("ZZCOVTST","T2",0)="1:0:0:0:14" +^ZZCOVERAGE("ZZCOVTST","T2",1)="1:0:0:0:12" +^ZZCOVERAGE("ZZCOVTST","T2",2)="1:0:0:0:12" +^ZZCOVERAGE("ZZCOVTST","T2",3)="1:0:0:0:14" +^ZZCOVERAGE("ZZCOVTST","T2",4)="1:0:0:0:25" +^ZZCOVERAGE("ZZCOVTST","T2",5)="1:0:0:0:12" +^ZZCOVERAGE("ZZCOVTST","T3")="1:0:0:0:28" +^ZZCOVERAGE("ZZCOVTST","T3",0)="1:0:0:0:17" +^ZZCOVERAGE("ZZCOVTST","T5")="1:0:0:0:388" +^ZZCOVERAGE("ZZCOVTST","T5",0)="1:0:0:0:114" +^ZZCOVERAGE("ZZCOVTST","T5",1)="1:0:0:0:28" +^ZZCOVERAGE("ZZCOVTST","T5",2)="1:0:0:0:14" + + diff --git a/Tests/PDBDirectoryAndName/CMakeLists.txt b/Tests/PDBDirectoryAndName/CMakeLists.txt index 28e46b1..90af600 100644 --- a/Tests/PDBDirectoryAndName/CMakeLists.txt +++ b/Tests/PDBDirectoryAndName/CMakeLists.txt @@ -6,6 +6,13 @@ if(NOT MSVC AND NOT "${CMAKE_C_COMPILER_ID}" MATCHES "^(Intel)$") message(FATAL_ERROR "The PDBDirectoryAndName test works only with MSVC or Intel") endif() +# Intel 11.1 does not support /Fd but Intel 14.0 does. +# TODO: Did a version in between these add it? +if(CMAKE_C_COMPILER_ID STREQUAL Intel AND + CMAKE_C_COMPILER_VERSION VERSION_LESS 14.0) + set(NO_COMPILE_PDB 1) +endif() + set(my_targets "") add_library(mylibA SHARED mylibA.c) @@ -17,12 +24,12 @@ list(APPEND my_targets mylibA) add_library(mylibB STATIC mylibB.c) set_target_properties(mylibB PROPERTIES - PDB_NAME "mylibB_Special" - PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mylibB_PDB" + COMPILE_PDB_NAME "mylibB_Special" + COMPILE_PDB_OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/mylibB_PDB" ) -# TODO: The only .pdb available for a static library is that generated -# by the compiler /Fd option which is not the same as the linker /pdb. -# list(APPEND my_targets mylibB) +if(NOT NO_COMPILE_PDB) + list(APPEND my_targets mylibB) +endif() add_library(mylibC SHARED mylibC.c) set_target_properties(mylibC PROPERTIES @@ -32,10 +39,11 @@ list(APPEND my_targets mylibC) add_library(mylibD STATIC mylibD.c) set_target_properties(mylibD PROPERTIES - PDB_NAME "mylibD_Special" + COMPILE_PDB_NAME "mylibD_Special" ) -# TODO: See comment for mylibB. -# list(APPEND my_targets mylibD) +if(NOT NO_COMPILE_PDB) + list(APPEND my_targets mylibD) +endif() add_executable(myexe myexe.c) set_target_properties(myexe PROPERTIES @@ -66,6 +74,12 @@ set(pdbs "") foreach(t ${my_targets}) get_property(pdb_name TARGET ${t} PROPERTY PDB_NAME) get_property(pdb_dir TARGET ${t} PROPERTY PDB_OUTPUT_DIRECTORY) + if(NOT pdb_name) + get_property(pdb_name TARGET ${t} PROPERTY COMPILE_PDB_NAME) + endif() + if(NOT pdb_dir) + get_property(pdb_dir TARGET ${t} PROPERTY COMPILE_PDB_OUTPUT_DIRECTORY) + endif() if(NOT pdb_dir) set(pdb_dir ${CMAKE_CURRENT_BINARY_DIR}) endif() diff --git a/Tests/PerConfig/perconfig.cmake b/Tests/PerConfig/perconfig.cmake index 6a710ca..0731041 100644 --- a/Tests/PerConfig/perconfig.cmake +++ b/Tests/PerConfig/perconfig.cmake @@ -30,7 +30,7 @@ endif() # Verify that the implementation files are named correctly. foreach(lib pcStatic pcShared) file(STRINGS "${${lib}_file}" info LIMIT_COUNT 1 REGEX "INFO:[^[]*\\[") - if(NOT "${info}" MATCHES ".*INFO:symbol\\[${lib}\\].*") + if(NOT "${info}" MATCHES "INFO:symbol\\[${lib}\\]") message(SEND_ERROR "No INFO:symbol[${lib}] found in:\n ${${lib}_file}") endif() endforeach() diff --git a/Tests/Plugin/CMakeLists.txt b/Tests/Plugin/CMakeLists.txt index c6ed15d..ecdece8 100644 --- a/Tests/Plugin/CMakeLists.txt +++ b/Tests/Plugin/CMakeLists.txt @@ -24,6 +24,16 @@ include_directories( ${Plugin_SOURCE_DIR}/include ) +# We need proper C++98 support from the compiler +set(CMAKE_CXX_STANDARD 98) + +# Those versions of the HP compiler that need a flag to get proper C++98 +# template support also need a flag to use the newer C++ library. +if (CMAKE_CXX_COMPILER_ID STREQUAL HP AND + CMAKE_CXX98_STANDARD_COMPILE_OPTION STREQUAL "+hpxstd98") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -AA") +endif () + # Create an executable that exports an API for use by plugins. add_executable(example_exe src/example_exe.cxx) set_target_properties(example_exe PROPERTIES diff --git a/Tests/Properties/CMakeLists.txt b/Tests/Properties/CMakeLists.txt index 285d596..11fca45 100644 --- a/Tests/Properties/CMakeLists.txt +++ b/Tests/Properties/CMakeLists.txt @@ -143,3 +143,5 @@ set_property(CACHE SOME_ENTRY PROPERTY VALUE "${expect_VALUE}") set_property(CACHE SOME_ENTRY PROPERTY ADVANCED "${expect_ADVANCED}") set_property(CACHE SOME_ENTRY PROPERTY STRINGS "${expect_STRINGS}") check_cache_props() + +add_subdirectory(SubDir2) diff --git a/Tests/Properties/SubDir2/CMakeLists.txt b/Tests/Properties/SubDir2/CMakeLists.txt new file mode 100644 index 0000000..377dc83 --- /dev/null +++ b/Tests/Properties/SubDir2/CMakeLists.txt @@ -0,0 +1,5 @@ + +set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/../subdirtest.cxx" + PROPERTIES COMPILE_DEFINITIONS SUBDIR_TEST) + +add_executable(subdirtest "${CMAKE_CURRENT_SOURCE_DIR}/../subdirtest.cxx") diff --git a/Tests/Properties/subdirtest.cxx b/Tests/Properties/subdirtest.cxx new file mode 100644 index 0000000..02d8f3d --- /dev/null +++ b/Tests/Properties/subdirtest.cxx @@ -0,0 +1,9 @@ + +#ifndef SUBDIR_TEST +#error Expected SUBDIR_TEST +#endif + +int main(int, char**) +{ + return 0; +} diff --git a/Tests/Qt4Targets/CMakeLists.txt b/Tests/Qt4Targets/CMakeLists.txt index af9fc3f..ae0a02b 100644 --- a/Tests/Qt4Targets/CMakeLists.txt +++ b/Tests/Qt4Targets/CMakeLists.txt @@ -36,3 +36,45 @@ add_executable(Qt4WrapMacroTest WIN32 main_wrap_test.cpp ${moc_file}) set_property(TARGET Qt4WrapMacroTest PROPERTY AUTOMOC OFF) target_include_directories(Qt4WrapMacroTest PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/interface") target_link_libraries(Qt4WrapMacroTest Qt4::QtGui) + +macro(test_incremental def) + set(timeformat "%Y%j%H%M%S") + try_compile(RESULT + "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild_${def}" + "${CMAKE_CURRENT_SOURCE_DIR}/IncrementalMoc" + IncrementalMoc + CMAKE_FLAGS -D${def}=0 "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" + OUTPUT_VARIABLE output + ) + file(TIMESTAMP "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild_${def}/moc_foo.cpp" tsvar_before "${timeformat}") + if (NOT tsvar_before) + message(SEND_ERROR + "Unable to read timestamp from moc file from first build with -D${def}!\n" + "try_compile output:\n${output}" + ) + endif() + + execute_process(COMMAND "${CMAKE_COMMAND}" -E sleep 2) # Ensure that the timestamp will change. + + try_compile(RESULT + "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild_${def}" + "${CMAKE_CURRENT_SOURCE_DIR}/IncrementalMoc" + IncrementalMoc + CMAKE_FLAGS -D${def}=1 "-DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}" + OUTPUT_VARIABLE output + ) + file(TIMESTAMP "${CMAKE_CURRENT_BINARY_DIR}/IncrementalMocBuild_${def}/moc_foo.cpp" tsvar_after "${timeformat}") + if (NOT tsvar_after) + message(SEND_ERROR + "Unable to read timestamp from moc file from second build!\n" + "try_compile output:\n${output}" + ) + endif() + + if (NOT tsvar_after GREATER tsvar_before) + message(SEND_ERROR "Rebuild did not re-create moc file with -D${def}. Before: ${tsvar_before}. After: ${tsvar_after}") + endif() +endmacro() + +test_incremental(ADD_TARGET_DEF) +test_incremental(ADD_DIR_DEF) diff --git a/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt b/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt new file mode 100644 index 0000000..65e2b64 --- /dev/null +++ b/Tests/Qt4Targets/IncrementalMoc/CMakeLists.txt @@ -0,0 +1,21 @@ + +cmake_minimum_required(VERSION 2.8.12) +project(IncrementalMoc) + +find_package(Qt4 REQUIRED) + +if (ADD_TARGET_DEF) + set(target_args TARGET testlib) +endif() + +if (ADD_DIR_DEF) + add_definitions(-DNEW_DEF) +endif() + +qt4_generate_moc(foo.h moc_foo.cpp ${target_args}) + +add_library(testlib foo.cpp moc_foo.cpp) +target_link_libraries(testlib Qt4::QtCore) +if (ADD_TARGET_DEF) + target_compile_definitions(testlib PRIVATE NEW_DEF) +endif() diff --git a/Tests/Qt4Targets/IncrementalMoc/foo.cpp b/Tests/Qt4Targets/IncrementalMoc/foo.cpp new file mode 100644 index 0000000..e924f7e --- /dev/null +++ b/Tests/Qt4Targets/IncrementalMoc/foo.cpp @@ -0,0 +1,8 @@ + +#include "foo.h" + +Foo::Foo() + : QObject(0) +{ + +} diff --git a/Tests/Qt4Targets/IncrementalMoc/foo.h b/Tests/Qt4Targets/IncrementalMoc/foo.h new file mode 100644 index 0000000..38d899f --- /dev/null +++ b/Tests/Qt4Targets/IncrementalMoc/foo.h @@ -0,0 +1,9 @@ + +#include <QObject> + +class Foo : QObject +{ + Q_OBJECT +public: + Foo(); +}; diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 0821b45..3973653 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -64,9 +64,15 @@ add_custom_command( DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/myotherinterface.h.in" ) -add_executable(QtAutogen main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp +message("CMAKE_BUILD_TYPE = ${CMAKE_BUILD_TYPE}") +if (CMAKE_BUILD_TYPE MATCHES "[Dd][Ee][Bb][Uu][Gg]" AND NOT CMAKE_CONFIGURATION_TYPES) + set(debug_srcs "$<$<CONFIG:Debug>:debug_class.cpp>" $<$<CONFIG:Debug>:debug_resource.qrc>) + add_definitions(-DTEST_DEBUG_CLASS) +endif() + +add_executable(QtAutogen main.cpp calwidget.cpp second_widget.cpp foo.cpp blub.cpp bar.cpp abc.cpp xyz.cpp yaf.cpp gadget.cpp $<TARGET_OBJECTS:privateSlot> - test.qrc resourcetester.cpp generated.cpp + test.qrc second_resource.qrc resourcetester.cpp generated.cpp ${debug_srcs} ) set_property(TARGET QtAutogen APPEND PROPERTY AUTOGEN_TARGET_DEPENDS generate_moc_input "${CMAKE_CURRENT_BINARY_DIR}/myotherinterface.h") diff --git a/Tests/QtAutogen/debug_class.cpp b/Tests/QtAutogen/debug_class.cpp new file mode 100644 index 0000000..58e72e4 --- /dev/null +++ b/Tests/QtAutogen/debug_class.cpp @@ -0,0 +1,9 @@ + +#include "debug_class.h" +#include "ui_debug_class.h" + +DebugClass::DebugClass(QWidget *parent) + : QWidget(parent), ui(new Ui::DebugClass) +{ + ui->setupUi(this); +} diff --git a/Tests/QtAutogen/debug_class.h b/Tests/QtAutogen/debug_class.h new file mode 100644 index 0000000..71bc104 --- /dev/null +++ b/Tests/QtAutogen/debug_class.h @@ -0,0 +1,20 @@ + +#include <QWidget> + +namespace Ui +{ +class DebugClass; +} + +class DebugClass : public QWidget +{ + Q_OBJECT +public: + explicit DebugClass(QWidget *parent = 0); + +signals: + void someSignal(); + +private: + Ui::DebugClass *ui; +}; diff --git a/Tests/QtAutogen/debug_class.ui b/Tests/QtAutogen/debug_class.ui new file mode 100644 index 0000000..dc2e1ac --- /dev/null +++ b/Tests/QtAutogen/debug_class.ui @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>DebugClass</class> + <widget class="QWidget" name="DebugClass"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>DebugClass</string> + </property> + <widget class="QCheckBox" name="checkBox"> + <property name="geometry"> + <rect> + <x>50</x> + <y>20</y> + <width>82</width> + <height>21</height> + </rect> + </property> + <property name="text"> + <string>CheckBox</string> + </property> + </widget> + <widget class="QPushButton" name="pushButton"> + <property name="geometry"> + <rect> + <x>40</x> + <y>70</y> + <width>94</width> + <height>24</height> + </rect> + </property> + <property name="text"> + <string>PushButton</string> + </property> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/Tests/QtAutogen/debug_resource.qrc b/Tests/QtAutogen/debug_resource.qrc new file mode 100644 index 0000000..db98b9b --- /dev/null +++ b/Tests/QtAutogen/debug_resource.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>debug_class.ui</file> +</qresource> +</RCC> diff --git a/Tests/QtAutogen/main.cpp b/Tests/QtAutogen/main.cpp index c8a036e..eb59665 100644 --- a/Tests/QtAutogen/main.cpp +++ b/Tests/QtAutogen/main.cpp @@ -51,6 +51,11 @@ #include "yaf.h" #include "libC.h" #include "resourcetester.h" +#ifdef TEST_DEBUG_CLASS +#include "debug_class.h" +#include <iostream> +#endif + int main(int argv, char **args) { @@ -81,5 +86,9 @@ int main(int argv, char **args) QTimer::singleShot(0, &rt, SLOT(doTest())); +#ifdef TEST_DEBUG_CLASS + std::cout << DebugClass::staticMetaObject.className() << std::endl; +#endif + return app.exec(); } diff --git a/Tests/QtAutogen/resourcetester.cpp b/Tests/QtAutogen/resourcetester.cpp index 43314e1..043ec75 100644 --- a/Tests/QtAutogen/resourcetester.cpp +++ b/Tests/QtAutogen/resourcetester.cpp @@ -16,6 +16,12 @@ void ResourceTester::doTest() { if (!QFile::exists(":/CMakeLists.txt")) qApp->exit(EXIT_FAILURE); + if (!QFile::exists(":/main.cpp")) + qApp->exit(EXIT_FAILURE); +#ifdef TEST_DEBUG_CLASS + if (!QFile::exists(":/debug_class.ui")) + qApp->exit(EXIT_FAILURE); +#endif QTimer::singleShot(0, qApp, SLOT(quit())); } diff --git a/Tests/QtAutogen/second_resource.qrc b/Tests/QtAutogen/second_resource.qrc new file mode 100644 index 0000000..27bfb14 --- /dev/null +++ b/Tests/QtAutogen/second_resource.qrc @@ -0,0 +1,5 @@ +<!DOCTYPE RCC><RCC version="1.0"> +<qresource> + <file>main.cpp</file> +</qresource> +</RCC> diff --git a/Tests/QtAutogen/second_widget.cpp b/Tests/QtAutogen/second_widget.cpp new file mode 100644 index 0000000..65ba962 --- /dev/null +++ b/Tests/QtAutogen/second_widget.cpp @@ -0,0 +1,14 @@ + +#include "second_widget.h" +#include "ui_second_widget.h" + +SecondWidget::SecondWidget(QWidget *parent) + : QWidget(parent), ui(new Ui::SecondWidget) +{ + ui->setupUi(this); +} + +SecondWidget::~SecondWidget() +{ + delete ui; +} diff --git a/Tests/QtAutogen/second_widget.h b/Tests/QtAutogen/second_widget.h new file mode 100644 index 0000000..fe4d175 --- /dev/null +++ b/Tests/QtAutogen/second_widget.h @@ -0,0 +1,19 @@ + +#include <QWidget> + +namespace Ui +{ +class SecondWidget; +} + +class SecondWidget : public QWidget +{ + Q_OBJECT +public: + explicit SecondWidget(QWidget *parent = 0); + + ~SecondWidget(); + +private: + Ui::SecondWidget* ui; +}; diff --git a/Tests/QtAutogen/second_widget.ui b/Tests/QtAutogen/second_widget.ui new file mode 100644 index 0000000..4effa58 --- /dev/null +++ b/Tests/QtAutogen/second_widget.ui @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>SecondWidget</class> + <widget class="QWidget" name="SecondWidget"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>400</width> + <height>300</height> + </rect> + </property> + <property name="windowTitle"> + <string>Form</string> + </property> + <widget class="QPushButton" name="pushButton"> + <property name="geometry"> + <rect> + <x>80</x> + <y>20</y> + <width>94</width> + <height>24</height> + </rect> + </property> + <property name="text"> + <string>PushButton</string> + </property> + </widget> + </widget> + <resources/> + <connections/> +</ui> diff --git a/Tests/RunCMake/set/PARENT_SCOPE-result.txt b/Tests/RunCMake/CMP0026/ObjlibNotDefined-result.txt index 573541a..573541a 100644 --- a/Tests/RunCMake/set/PARENT_SCOPE-result.txt +++ b/Tests/RunCMake/CMP0026/ObjlibNotDefined-result.txt diff --git a/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt b/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt new file mode 100644 index 0000000..87d198d --- /dev/null +++ b/Tests/RunCMake/CMP0026/ObjlibNotDefined-stderr.txt @@ -0,0 +1,12 @@ +CMake Warning \(dev\) at ObjlibNotDefined.cmake:[0-9]+ \(get_target_property\): + Policy CMP0026 is not set: Disallow use of the LOCATION target property. + Run "cmake --help-policy CMP0026" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + The LOCATION property should not be read from target "objlibuser". Use the + target name directly with add_custom_command, or use the generator + expression \$<TARGET_FILE>, as appropriate. + +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/CMP0026/ObjlibNotDefined.cmake b/Tests/RunCMake/CMP0026/ObjlibNotDefined.cmake new file mode 100644 index 0000000..194760c --- /dev/null +++ b/Tests/RunCMake/CMP0026/ObjlibNotDefined.cmake @@ -0,0 +1,13 @@ + +enable_language(CXX) + +add_executable(objlibuser + empty.cpp + $<TARGET_OBJECTS:bar> +) + +get_target_property(_location objlibuser LOCATION) + +add_library(bar OBJECT + empty.cpp +) diff --git a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake index 1824cc6..7c2582f 100644 --- a/Tests/RunCMake/CMP0026/RunCMakeTest.cmake +++ b/Tests/RunCMake/CMP0026/RunCMakeTest.cmake @@ -9,3 +9,4 @@ run_cmake(CMP0026-CONFIG-LOCATION-WARN) run_cmake(CMP0026-LOCATION-CONFIG-NEW) run_cmake(CMP0026-LOCATION-CONFIG-OLD) run_cmake(CMP0026-LOCATION-CONFIG-WARN) +run_cmake(ObjlibNotDefined) diff --git a/Tests/RunCMake/CMP0051/CMP0051-NEW-result.txt b/Tests/RunCMake/CMP0051/CMP0051-NEW-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-NEW-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0051/CMP0051-NEW-stderr.txt b/Tests/RunCMake/CMP0051/CMP0051-NEW-stderr.txt new file mode 100644 index 0000000..e5578ba --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-NEW-stderr.txt @@ -0,0 +1 @@ +^Sources: "empty.cpp;\$<TARGET_OBJECTS:objects>"$ diff --git a/Tests/RunCMake/CMP0051/CMP0051-NEW.cmake b/Tests/RunCMake/CMP0051/CMP0051-NEW.cmake new file mode 100644 index 0000000..f304bf1 --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-NEW.cmake @@ -0,0 +1,10 @@ + +cmake_policy(SET CMP0051 NEW) + +add_library(objects OBJECT empty.cpp) + +add_library(empty empty.cpp $<TARGET_OBJECTS:objects>) + +get_target_property(srcs empty SOURCES) + +message("Sources: \"${srcs}\"") diff --git a/Tests/RunCMake/CMP0051/CMP0051-OLD-result.txt b/Tests/RunCMake/CMP0051/CMP0051-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt b/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt new file mode 100644 index 0000000..cc17f33 --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-OLD-stderr.txt @@ -0,0 +1 @@ +^Sources: "empty.cpp"$ diff --git a/Tests/RunCMake/CMP0051/CMP0051-OLD.cmake b/Tests/RunCMake/CMP0051/CMP0051-OLD.cmake new file mode 100644 index 0000000..0243e94 --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-OLD.cmake @@ -0,0 +1,10 @@ + +cmake_policy(SET CMP0051 OLD) + +add_library(objects OBJECT empty.cpp) + +add_library(empty empty.cpp $<TARGET_OBJECTS:objects>) + +get_target_property(srcs empty SOURCES) + +message("Sources: \"${srcs}\"") diff --git a/Tests/RunCMake/CMP0051/CMP0051-WARN-Dir/CMakeLists.txt b/Tests/RunCMake/CMP0051/CMP0051-WARN-Dir/CMakeLists.txt new file mode 100644 index 0000000..77cbad5 --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-WARN-Dir/CMakeLists.txt @@ -0,0 +1 @@ +add_library(empty2 ../empty.cpp $<TARGET_OBJECTS:objects>) diff --git a/Tests/RunCMake/CMP0051/CMP0051-WARN-result.txt b/Tests/RunCMake/CMP0051/CMP0051-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt b/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt new file mode 100644 index 0000000..ae2e468 --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-WARN-stderr.txt @@ -0,0 +1,31 @@ +CMake Warning \(dev\) at CMP0051-WARN.cmake:6 \(get_target_property\): + Policy CMP0051 is not set: List TARGET_OBJECTS in SOURCES target property. + Run "cmake --help-policy CMP0051" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + Target "empty" contains \$<TARGET_OBJECTS> generator expression in its + sources list. This content was not previously part of the SOURCES property + when that property was read at configure time. Code reading that 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\) +This warning is for project developers. Use -Wno-dev to suppress it. + +Sources: "empty.cpp" +* +CMake Warning \(dev\) at CMP0051-WARN.cmake:12 \(get_target_property\): + Policy CMP0051 is not set: List TARGET_OBJECTS in SOURCES target property. + Run "cmake --help-policy CMP0051" for policy details. Use the cmake_policy + command to set the policy and suppress this warning. + + Target "empty2" contains \$<TARGET_OBJECTS> generator expression in its + sources list. This content was not previously part of the SOURCES property + when that property was read at configure time. Code reading that 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\) +This warning is for project developers. Use -Wno-dev to suppress it. + +Sources: "../empty.cpp"$ diff --git a/Tests/RunCMake/CMP0051/CMP0051-WARN.cmake b/Tests/RunCMake/CMP0051/CMP0051-WARN.cmake new file mode 100644 index 0000000..744598f --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMP0051-WARN.cmake @@ -0,0 +1,14 @@ + +add_library(objects OBJECT empty.cpp) + +add_library(empty empty.cpp $<TARGET_OBJECTS:objects>) + +get_target_property(srcs empty SOURCES) + +message("Sources: \"${srcs}\"") + +add_subdirectory(CMP0051-WARN-Dir) + +get_target_property(srcs empty2 SOURCES) + +message("Sources: \"${srcs}\"") diff --git a/Tests/RunCMake/CMP0051/CMakeLists.txt b/Tests/RunCMake/CMP0051/CMakeLists.txt new file mode 100644 index 0000000..3482e6b --- /dev/null +++ b/Tests/RunCMake/CMP0051/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0051/RunCMakeTest.cmake b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake new file mode 100644 index 0000000..621192d --- /dev/null +++ b/Tests/RunCMake/CMP0051/RunCMakeTest.cmake @@ -0,0 +1,5 @@ +include(RunCMake) + +run_cmake(CMP0051-OLD) +run_cmake(CMP0051-NEW) +run_cmake(CMP0051-WARN) diff --git a/Tests/RunCMake/CMP0051/empty.cpp b/Tests/RunCMake/CMP0051/empty.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/CMP0051/empty.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/CMP0053/CMP0053-NEW-stderr.txt b/Tests/RunCMake/CMP0053/CMP0053-NEW-stderr.txt new file mode 100644 index 0000000..836b0ff --- /dev/null +++ b/Tests/RunCMake/CMP0053/CMP0053-NEW-stderr.txt @@ -0,0 +1,2 @@ +^called +--><--$ diff --git a/Tests/RunCMake/CMP0053/CMP0053-NEW.cmake b/Tests/RunCMake/CMP0053/CMP0053-NEW.cmake new file mode 100644 index 0000000..6ffedc6 --- /dev/null +++ b/Tests/RunCMake/CMP0053/CMP0053-NEW.cmake @@ -0,0 +1,8 @@ +cmake_policy(SET CMP0053 NEW) + +function (watch_callback) + message("called") +endfunction () + +variable_watch(test watch_callback) +message("-->${test}<--") diff --git a/Tests/RunCMake/CMP0053/CMP0053-OLD-stderr.txt b/Tests/RunCMake/CMP0053/CMP0053-OLD-stderr.txt new file mode 100644 index 0000000..836b0ff --- /dev/null +++ b/Tests/RunCMake/CMP0053/CMP0053-OLD-stderr.txt @@ -0,0 +1,2 @@ +^called +--><--$ diff --git a/Tests/RunCMake/CMP0053/CMP0053-OLD.cmake b/Tests/RunCMake/CMP0053/CMP0053-OLD.cmake new file mode 100644 index 0000000..41f5347 --- /dev/null +++ b/Tests/RunCMake/CMP0053/CMP0053-OLD.cmake @@ -0,0 +1,8 @@ +cmake_policy(SET CMP0053 OLD) + +function (watch_callback) + message("called") +endfunction () + +variable_watch(test watch_callback) +message("-->${test}<--") diff --git a/Tests/RunCMake/CMP0053/CMP0053-WARN-stderr.txt b/Tests/RunCMake/CMP0053/CMP0053-WARN-stderr.txt new file mode 100644 index 0000000..836b0ff --- /dev/null +++ b/Tests/RunCMake/CMP0053/CMP0053-WARN-stderr.txt @@ -0,0 +1,2 @@ +^called +--><--$ diff --git a/Tests/RunCMake/CMP0053/CMP0053-WARN.cmake b/Tests/RunCMake/CMP0053/CMP0053-WARN.cmake new file mode 100644 index 0000000..b010d13 --- /dev/null +++ b/Tests/RunCMake/CMP0053/CMP0053-WARN.cmake @@ -0,0 +1,6 @@ +function (watch_callback) + message("called") +endfunction () + +variable_watch(test watch_callback) +message("-->${test}<--") diff --git a/Tests/RunCMake/CMP0053/CMakeLists.txt b/Tests/RunCMake/CMP0053/CMakeLists.txt new file mode 100644 index 0000000..3482e6b --- /dev/null +++ b/Tests/RunCMake/CMP0053/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CMP0053/RunCMakeTest.cmake b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake new file mode 100644 index 0000000..6521ac0 --- /dev/null +++ b/Tests/RunCMake/CMP0053/RunCMakeTest.cmake @@ -0,0 +1,5 @@ +include(RunCMake) + +run_cmake(CMP0053-OLD) +run_cmake(CMP0053-NEW) +run_cmake(CMP0053-WARN) diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt index 9bb097b..06272ce 100644 --- a/Tests/RunCMake/CMakeLists.txt +++ b/Tests/RunCMake/CMakeLists.txt @@ -3,8 +3,8 @@ macro(add_RunCMake_test test) add_test(RunCMake.${test} ${CMAKE_CMAKE_COMMAND} -DCMAKE_MODULE_PATH=${CMAKE_CURRENT_SOURCE_DIR} - -DRunCMake_GENERATOR=${CMAKE_TEST_GENERATOR} - -DRunCMake_GENERATOR_TOOLSET=${CMAKE_TEST_GENERATOR_TOOLSET} + -DRunCMake_GENERATOR=${CMAKE_GENERATOR} + -DRunCMake_GENERATOR_TOOLSET=${CMAKE_GENERATOR_TOOLSET} -DRunCMake_SOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}/${test} -DRunCMake_BINARY_DIR=${CMAKE_CURRENT_BINARY_DIR}/${test} ${${test}_ARGS} @@ -16,6 +16,10 @@ if(XCODE_VERSION AND "${XCODE_VERSION}" VERSION_LESS 3) set(GeneratorToolset_ARGS -DXCODE_BELOW_3=1) endif() +if(XCODE_VERSION AND "${XCODE_VERSION}" VERSION_LESS 2) + set(TargetSources_ARGS -DXCODE_BELOW_2=1) +endif() + add_RunCMake_test(CMP0019) add_RunCMake_test(CMP0022) add_RunCMake_test(CMP0026) @@ -34,20 +38,28 @@ add_RunCMake_test(CMP0045) add_RunCMake_test(CMP0046) add_RunCMake_test(CMP0049) add_RunCMake_test(CMP0050) +add_RunCMake_test(CMP0051) +add_RunCMake_test(CMP0053) add_RunCMake_test(CTest) -if(UNIX AND "${CMAKE_TEST_GENERATOR}" MATCHES "Unix Makefiles") +if(UNIX AND "${CMAKE_GENERATOR}" MATCHES "Unix Makefiles") add_RunCMake_test(CompilerChange) endif() add_RunCMake_test(CompilerNotFound) add_RunCMake_test(Configure) add_RunCMake_test(DisallowedCommands) add_RunCMake_test(ExternalData) +add_RunCMake_test(FeatureSummary) add_RunCMake_test(FPHSA) add_RunCMake_test(GeneratorExpression) add_RunCMake_test(GeneratorToolset) add_RunCMake_test(TargetPropertyGeneratorExpressions) add_RunCMake_test(Languages) add_RunCMake_test(ObjectLibrary) +add_RunCMake_test(TargetObjects) +add_RunCMake_test(TargetSources) +add_RunCMake_test(find_dependency) +add_RunCMake_test(CompileFeatures) +add_RunCMake_test(WriteCompilerDetectionHeader) if(NOT WIN32) add_RunCMake_test(PositionIndependentCode) set(SKIP_VISIBILITY 0) @@ -77,6 +89,7 @@ add_RunCMake_test(add_dependencies) add_RunCMake_test(build_command) add_RunCMake_test(export) add_RunCMake_test(cmake_minimum_required) +add_RunCMake_test(file) add_RunCMake_test(find_package) add_RunCMake_test(get_filename_component) add_RunCMake_test(if) @@ -94,6 +107,7 @@ add_RunCMake_test(TargetPolicies) add_RunCMake_test(alias_targets) add_RunCMake_test(interface_library) add_RunCMake_test(no_install_prefix) +add_RunCMake_test(configure_file) find_package(Qt4 QUIET) find_package(Qt5Core QUIET) @@ -105,15 +119,27 @@ if (QT4_FOUND) add_RunCMake_test(ObsoleteQtMacros) endif() -if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]") +find_package(PkgConfig QUIET) +if(PKG_CONFIG_FOUND) + add_RunCMake_test(FindPkgConfig) +endif() + +if("${CMAKE_GENERATOR}" MATCHES "Visual Studio [^6]") add_RunCMake_test(include_external_msproject) add_RunCMake_test(SolutionGlobalSections) endif() +if(XCODE_VERSION AND NOT "${XCODE_VERSION}" VERSION_LESS 3) + add_RunCMake_test(XcodeProject) +endif() + add_RunCMake_test(File_Generate) add_RunCMake_test(ExportWithoutLanguage) add_RunCMake_test(target_link_libraries) + +add_RunCMake_test(target_compile_features) add_RunCMake_test(CheckModules) add_RunCMake_test(CommandLine) add_RunCMake_test(install) +add_RunCMake_test(CPackInstallProperties) diff --git a/Tests/RunCMake/CPackInstallProperties/Append-check.cmake b/Tests/RunCMake/CPackInstallProperties/Append-check.cmake new file mode 100644 index 0000000..017b30d --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/Append-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_property("append.txt" CPACK_TEST_PROP "value1;value2;value3") diff --git a/Tests/RunCMake/CPackInstallProperties/Append.cmake b/Tests/RunCMake/CPackInstallProperties/Append.cmake new file mode 100644 index 0000000..cecc45f --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/Append.cmake @@ -0,0 +1,2 @@ +set_property(INSTALL append.txt PROPERTY CPACK_TEST_PROP value1) +set_property(INSTALL append.txt PROPERTY CPACK_TEST_PROP value2 value3 APPEND) diff --git a/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt b/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt new file mode 100644 index 0000000..89ff7c4 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/CMakeLists.txt @@ -0,0 +1,6 @@ +cmake_minimum_required(VERSION 3.0) + +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake) + +include(CPack) diff --git a/Tests/RunCMake/CPackInstallProperties/FilenameGenex-check.cmake b/Tests/RunCMake/CPackInstallProperties/FilenameGenex-check.cmake new file mode 100644 index 0000000..8c9e967 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/FilenameGenex-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_property(${EXPECTED_MYTEST_NAME} CPACK_TEST_PROP2 PROP_VALUE2) diff --git a/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake b/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake new file mode 100644 index 0000000..1a373b9 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/FilenameGenex.cmake @@ -0,0 +1,7 @@ +add_executable(mytest test.cpp) + +file(GENERATE OUTPUT runtest_info.cmake CONTENT [[ +set(EXPECTED_MYTEST_NAME "$<TARGET_FILE_NAME:mytest>") +]]) + +set_property(INSTALL $<TARGET_FILE_NAME:mytest> PROPERTY CPACK_TEST_PROP2 PROP_VALUE2) diff --git a/Tests/RunCMake/CPackInstallProperties/MultipleValues-check.cmake b/Tests/RunCMake/CPackInstallProperties/MultipleValues-check.cmake new file mode 100644 index 0000000..91278ba --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/MultipleValues-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_property("multiple_values.txt" CPACK_TEST_PROP "value1;value2;value3") diff --git a/Tests/RunCMake/CPackInstallProperties/MultipleValues.cmake b/Tests/RunCMake/CPackInstallProperties/MultipleValues.cmake new file mode 100644 index 0000000..26db52a --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/MultipleValues.cmake @@ -0,0 +1 @@ +set_property(INSTALL multiple_values.txt PROPERTY CPACK_TEST_PROP value1 value2 value3) diff --git a/Tests/RunCMake/CPackInstallProperties/PerConfigValue-check.cmake b/Tests/RunCMake/CPackInstallProperties/PerConfigValue-check.cmake new file mode 100644 index 0000000..2966d88 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/PerConfigValue-check.cmake @@ -0,0 +1,13 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +file(GLOB INFO_FILES ${RunCMake_TEST_BINARY_DIR}/runtest_info_*.cmake) + +if(NOT INFO_FILES) + message(FATAL_ERROR "missing expected info files") +endif() + +foreach(INFO_FILE IN LISTS INFO_FILES) + include(${INFO_FILE}) + include(${RunCMake_TEST_BINARY_DIR}/CPackProperties.cmake) + test_property("config.cpp" FOO ${EXPECTED_MYTEST_NAME}) +endforeach() diff --git a/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake b/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake new file mode 100644 index 0000000..77fe8ed --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/PerConfigValue.cmake @@ -0,0 +1,14 @@ +add_executable(mytest test.cpp) + +foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES) + string(TOUPPER ${CONFIG} UPPER_CONFIG) + set_property(TARGET mytest PROPERTY + OUTPUT_NAME_${UPPER_CONFIG} bar_${CONFIG}) +endforeach() + +file(GENERATE OUTPUT runtest_info_$<CONFIG>.cmake CONTENT [[ +set(CPACK_BUILD_CONFIG "$<CONFIG>") +set(EXPECTED_MYTEST_NAME "$<TARGET_FILE_NAME:mytest>") +]]) + +set_property(INSTALL config.cpp PROPERTY FOO $<TARGET_FILE_NAME:mytest>) diff --git a/Tests/RunCMake/CPackInstallProperties/Replace-check.cmake b/Tests/RunCMake/CPackInstallProperties/Replace-check.cmake new file mode 100644 index 0000000..6e492e7 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/Replace-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_property("replace.txt" CPACK_TEST_PROP "value2") diff --git a/Tests/RunCMake/CPackInstallProperties/Replace.cmake b/Tests/RunCMake/CPackInstallProperties/Replace.cmake new file mode 100644 index 0000000..104d5a4 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/Replace.cmake @@ -0,0 +1,2 @@ +set_property(INSTALL replace.txt PROPERTY CPACK_TEST_PROP value1) +set_property(INSTALL replace.txt PROPERTY CPACK_TEST_PROP value2) diff --git a/Tests/RunCMake/CPackInstallProperties/RunCMakeTest.cmake b/Tests/RunCMake/CPackInstallProperties/RunCMakeTest.cmake new file mode 100644 index 0000000..d244ac5 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/RunCMakeTest.cmake @@ -0,0 +1,9 @@ +include(RunCMake) + +run_cmake(Simple) +run_cmake(FilenameGenex) +run_cmake(ValueGenex) +run_cmake(MultipleValues) +run_cmake(Append) +run_cmake(Replace) +run_cmake(PerConfigValue) diff --git a/Tests/RunCMake/CPackInstallProperties/Simple-check.cmake b/Tests/RunCMake/CPackInstallProperties/Simple-check.cmake new file mode 100644 index 0000000..6a7ee2a --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/Simple-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_property("foo/test.cpp" CPACK_TEST_PROP PROP_VALUE) diff --git a/Tests/RunCMake/CPackInstallProperties/Simple.cmake b/Tests/RunCMake/CPackInstallProperties/Simple.cmake new file mode 100644 index 0000000..2eb8755 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/Simple.cmake @@ -0,0 +1 @@ +set_property(INSTALL foo/test.cpp PROPERTY CPACK_TEST_PROP PROP_VALUE) diff --git a/Tests/RunCMake/CPackInstallProperties/ValueGenex-check.cmake b/Tests/RunCMake/CPackInstallProperties/ValueGenex-check.cmake new file mode 100644 index 0000000..cdfbcda --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/ValueGenex-check.cmake @@ -0,0 +1,3 @@ +include(${RunCMake_SOURCE_DIR}/check.cmake) + +test_property("bar/test.cpp" CPACK_TEST_PROP ${EXPECTED_MYTEST_NAME}) diff --git a/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake b/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake new file mode 100644 index 0000000..2e1d465 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/ValueGenex.cmake @@ -0,0 +1,7 @@ +add_executable(mytest test.cpp) + +file(GENERATE OUTPUT runtest_info.cmake CONTENT [[ +set(EXPECTED_MYTEST_NAME "$<TARGET_FILE_NAME:mytest>") +]]) + +set_property(INSTALL bar/test.cpp PROPERTY CPACK_TEST_PROP $<TARGET_FILE_NAME:mytest>) diff --git a/Tests/RunCMake/CPackInstallProperties/check.cmake b/Tests/RunCMake/CPackInstallProperties/check.cmake new file mode 100644 index 0000000..65aa467 --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/check.cmake @@ -0,0 +1,12 @@ +function(test_property FILE NAME EXPECTED_VALUE) + get_property(ACTUAL_VALUE INSTALL "${FILE}" PROPERTY "${NAME}") + + if(NOT "${ACTUAL_VALUE}" STREQUAL "${EXPECTED_VALUE}") + message(FATAL_ERROR "${NAME}@${FILE}: property mismatch expected [${EXPECTED_VALUE}] actual [${ACTUAL_VALUE}] (Config:${CPACK_BUILD_CONFIG})") + endif() +endfunction() + +set(CPACK_BUILD_CONFIG Debug) +include(${RunCMake_TEST_BINARY_DIR}/CPackProperties.cmake) + +include(${RunCMake_TEST_BINARY_DIR}/runtest_info.cmake OPTIONAL) diff --git a/Tests/RunCMake/CPackInstallProperties/test.cpp b/Tests/RunCMake/CPackInstallProperties/test.cpp new file mode 100644 index 0000000..237c8ce --- /dev/null +++ b/Tests/RunCMake/CPackInstallProperties/test.cpp @@ -0,0 +1 @@ +int main() {} diff --git a/Tests/RunCMake/CheckModules/CheckTypeSizeOkNoC.cmake b/Tests/RunCMake/CheckModules/CheckTypeSizeOkNoC.cmake new file mode 100644 index 0000000..b2dcd7f --- /dev/null +++ b/Tests/RunCMake/CheckModules/CheckTypeSizeOkNoC.cmake @@ -0,0 +1,4 @@ +enable_language(CXX) +include(CheckTypeSize) +check_type_size(int SIZEOF_INT LANGUAGE CXX) +check_type_size(int SIZEOF_INT BUILTIN_TYPES_ONLY LANGUAGE CXX) diff --git a/Tests/RunCMake/CheckModules/RunCMakeTest.cmake b/Tests/RunCMake/CheckModules/RunCMakeTest.cmake index fda7ebf..5b4e57e 100644 --- a/Tests/RunCMake/CheckModules/RunCMakeTest.cmake +++ b/Tests/RunCMake/CheckModules/RunCMakeTest.cmake @@ -12,3 +12,5 @@ run_cmake(CheckTypeSizeUnknownLanguage) run_cmake(CheckTypeSizeMissingLanguage) run_cmake(CheckTypeSizeUnknownArgument) run_cmake(CheckTypeSizeMixedArgs) + +run_cmake(CheckTypeSizeOkNoC) diff --git a/Tests/RunCMake/ExternalData/MissingData-result.txt b/Tests/RunCMake/CommandLine/E_env-bad-arg1-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/ExternalData/MissingData-result.txt +++ b/Tests/RunCMake/CommandLine/E_env-bad-arg1-result.txt diff --git a/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt b/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt new file mode 100644 index 0000000..2143ba4 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-bad-arg1-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: unknown option '-bad-arg1'$ diff --git a/Tests/RunCMake/ExternalData/Directory3-result.txt b/Tests/RunCMake/CommandLine/E_env-no-command0-result.txt index d00491f..d00491f 100644 --- a/Tests/RunCMake/ExternalData/Directory3-result.txt +++ b/Tests/RunCMake/CommandLine/E_env-no-command0-result.txt diff --git a/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt b/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt new file mode 100644 index 0000000..d2efa53 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command0-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: no command given$ diff --git a/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt b/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt b/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt new file mode 100644 index 0000000..d2efa53 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-no-command1-stderr.txt @@ -0,0 +1 @@ +^cmake -E env: no command given$ diff --git a/Tests/RunCMake/CommandLine/E_env-set-stdout.txt b/Tests/RunCMake/CommandLine/E_env-set-stdout.txt new file mode 100644 index 0000000..feff117 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-set-stdout.txt @@ -0,0 +1 @@ +^-- TEST_ENV is correctly set in environment: 1$ diff --git a/Tests/RunCMake/CommandLine/E_env-set.cmake b/Tests/RunCMake/CommandLine/E_env-set.cmake new file mode 100644 index 0000000..c2639b6 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-set.cmake @@ -0,0 +1,5 @@ +if(DEFINED ENV{TEST_ENV}) + message(STATUS "TEST_ENV is correctly set in environment: $ENV{TEST_ENV}") +else() + message(FATAL_ERROR "TEST_ENV is incorrectly not set in environment") +endif() diff --git a/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt b/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt new file mode 100644 index 0000000..a1d5c01 --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-unset-stdout.txt @@ -0,0 +1 @@ +^-- TEST_ENV is correctly not set in environment$ diff --git a/Tests/RunCMake/CommandLine/E_env-unset.cmake b/Tests/RunCMake/CommandLine/E_env-unset.cmake new file mode 100644 index 0000000..04976fb --- /dev/null +++ b/Tests/RunCMake/CommandLine/E_env-unset.cmake @@ -0,0 +1,5 @@ +if(DEFINED ENV{TEST_ENV}) + message(FATAL_ERROR "TEST_ENV is incorrectly set in environment") +else() + message(STATUS "TEST_ENV is correctly not set in environment") +endif() diff --git a/Tests/RunCMake/CommandLine/P_directory-result.txt b/Tests/RunCMake/CommandLine/P_directory-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CommandLine/P_directory-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CommandLine/P_directory-stderr.txt b/Tests/RunCMake/CommandLine/P_directory-stderr.txt new file mode 100644 index 0000000..b8319a1 --- /dev/null +++ b/Tests/RunCMake/CommandLine/P_directory-stderr.txt @@ -0,0 +1 @@ +^CMake Error: Error processing file: .*/Tests/RunCMake/CommandLine$ diff --git a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake index 3aaeac0..5622a5b 100644 --- a/Tests/RunCMake/CommandLine/RunCMakeTest.cmake +++ b/Tests/RunCMake/CommandLine/RunCMakeTest.cmake @@ -31,7 +31,15 @@ if(UNIX) ) endif() +run_cmake_command(E_env-no-command0 ${CMAKE_COMMAND} -E env) +run_cmake_command(E_env-no-command1 ${CMAKE_COMMAND} -E env TEST_ENV=1) +run_cmake_command(E_env-bad-arg1 ${CMAKE_COMMAND} -E env -bad-arg1) +run_cmake_command(E_env-set ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-set.cmake) +run_cmake_command(E_env-unset ${CMAKE_COMMAND} -E env TEST_ENV=1 ${CMAKE_COMMAND} -E env --unset=TEST_ENV ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}/E_env-unset.cmake) + run_cmake_command(E_sleep-no-args ${CMAKE_COMMAND} -E sleep) run_cmake_command(E_sleep-bad-arg1 ${CMAKE_COMMAND} -E sleep x) run_cmake_command(E_sleep-bad-arg2 ${CMAKE_COMMAND} -E sleep 1 -1) run_cmake_command(E_sleep-one-tenth ${CMAKE_COMMAND} -E sleep 0.1) + +run_cmake_command(P_directory ${CMAKE_COMMAND} -P ${RunCMake_SOURCE_DIR}) diff --git a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt index 17b8a5c..82a34d5 100644 --- a/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt +++ b/Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt @@ -1,4 +1,11 @@ CMake Debug Log: + Boolean compatibility of property "BOOL_PROP7" for target + "CompatibleInterface" \(result: "FALSE"\): + + \* Target "CompatibleInterface" property is implied by use. + \* Target "iface1" property value "FALSE" \(Agree\) ++ +CMake Debug Log: Boolean compatibility of property "BOOL_PROP1" for target "CompatibleInterface" \(result: "TRUE"\): @@ -40,13 +47,6 @@ CMake Debug Log: \* Target "iface2" property value "FALSE" \(Agree\) + CMake Debug Log: - Boolean compatibility of property "BOOL_PROP7" for target - "CompatibleInterface" \(result: "FALSE"\): - - \* Target "CompatibleInterface" property is implied by use. - \* Target "iface1" property value "FALSE" \(Agree\) -+ -CMake Debug Log: String compatibility of property "STRING_PROP1" for target "CompatibleInterface" \(result: "prop1"\): diff --git a/Tests/RunCMake/CompileFeatures/CMakeLists.txt b/Tests/RunCMake/CompileFeatures/CMakeLists.txt new file mode 100644 index 0000000..3482e6b --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle-result.txt b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle-stderr.txt b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle-stderr.txt new file mode 100644 index 0000000..a584d7d --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle-stderr.txt @@ -0,0 +1,7 @@ +CMake Error in CMakeLists.txt: + The COMPILE_FEATURES property of target "empty1" was evaluated when + computing the link implementation, and the "CXX_STANDARD" was "98" for that + computation. Computing the COMPILE_FEATURES based on the link + implementation resulted in a higher "CXX_STANDARD" "11". This is not + permitted. The COMPILE_FEATURES may not both depend on and be depended on + by the link implementation. diff --git a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake new file mode 100644 index 0000000..9d56bc0 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycle.cmake @@ -0,0 +1,15 @@ + +add_library(empty1 empty.cpp) + +add_library(empty2 INTERFACE) +add_library(empty3 INTERFACE) +target_compile_features(empty3 INTERFACE cxx_constexpr) + +target_link_libraries(empty1 + # When starting, $<COMPILE_FEATURES:cxx_final> is '0', so 'freeze' the + # CXX_STANDARD at 98 during computation. + $<$<COMPILE_FEATURES:cxx_final>:empty2> + # This would add cxx_constexpr, but that would require CXX_STANDARD = 11, + # which is not allowed after freeze. Report an error. + empty3 +) diff --git a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved-result.txt b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved-stderr.txt b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved.cmake b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved.cmake new file mode 100644 index 0000000..0df548b --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/LinkImplementationFeatureCycleSolved.cmake @@ -0,0 +1,14 @@ + +add_library(empty1 empty.cpp) + +add_library(empty2 INTERFACE) +add_library(empty3 INTERFACE) +target_compile_features(empty3 INTERFACE cxx_constexpr) + +target_link_libraries(empty1 + $<$<COMPILE_FEATURES:cxx_final>:empty2> + empty3 +) +# This, or populating the COMPILE_FEATURES property with a feature in the +# same standard as cxx_final, solves the cycle above. +set_property(TARGET empty1 PROPERTY CXX_STANDARD 11) diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures-result.txt b/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures-stderr.txt b/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures-stderr.txt new file mode 100644 index 0000000..fd18c88 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at NoSupportedCFeatures.cmake:[0-9]+ \(target_compile_features\): + target_compile_features no known features for C compiler + + "[^"]*" + + version *[.0-9]+\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures.cmake b/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures.cmake new file mode 100644 index 0000000..3624d4b --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCFeatures.cmake @@ -0,0 +1,5 @@ + +enable_language(C) + +add_library(no_features empty.c) +target_compile_features(no_features PRIVATE c_static_assert) diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex-result.txt b/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex-stderr.txt b/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex-stderr.txt new file mode 100644 index 0000000..df647e8 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex-stderr.txt @@ -0,0 +1,6 @@ +CMake Error in CMakeLists.txt: + No known features for C compiler + + "[^"]*" + + version *[.0-9]+\. diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex.cmake b/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex.cmake new file mode 100644 index 0000000..b6053aa --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCFeaturesGenex.cmake @@ -0,0 +1,5 @@ + +enable_language(C) + +add_library(no_features empty.c) +target_compile_features(no_features PRIVATE $<1:c_static_assert>) diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures-result.txt b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures-stderr.txt b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures-stderr.txt new file mode 100644 index 0000000..fc882cb --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at NoSupportedCxxFeatures.cmake:3 \(target_compile_features\): + target_compile_features no known features for CXX compiler + + "[^"]*" + + version *[.0-9]+\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures.cmake b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures.cmake new file mode 100644 index 0000000..5121948 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeatures.cmake @@ -0,0 +1,3 @@ + +add_library(no_features empty.cpp) +target_compile_features(no_features PRIVATE cxx_constexpr) diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex-result.txt b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex-stderr.txt b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex-stderr.txt new file mode 100644 index 0000000..66d0d41 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex-stderr.txt @@ -0,0 +1,6 @@ +CMake Error in CMakeLists.txt: + No known features for CXX compiler + + "[^"]*" + + version *[.0-9]+\. diff --git a/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex.cmake b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex.cmake new file mode 100644 index 0000000..490f187 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NoSupportedCxxFeaturesGenex.cmake @@ -0,0 +1,3 @@ + +add_library(no_features empty.cpp) +target_compile_features(no_features PRIVATE $<1:cxx_constexpr>) diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget1-result.txt b/Tests/RunCMake/CompileFeatures/NonValidTarget1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget1-stderr.txt b/Tests/RunCMake/CompileFeatures/NonValidTarget1-stderr.txt new file mode 100644 index 0000000..7f3b43b --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget1-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget1.cmake:[0-9]+ \(add_custom_command\): + Error evaluating generator expression: + + \$<COMPILE_FEATURES:cxx_final> + + \$<COMPILE_FEATURE> may only be used with binary targets. It may not be + used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake b/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake new file mode 100644 index 0000000..c6707c1 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget1.cmake @@ -0,0 +1,17 @@ + +set(genexvar $<COMPILE_FEATURES:cxx_final>) + +if (HAVE_FINAL) + set(expected_result 1) +else() + set(expected_result 0) +endif() + +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file${HAVE_FINAL}.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp" +) + +add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp") +if (HAVE_FINAL) + target_compile_features(empty PRIVATE cxx_final) +endif() diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2-result.txt b/Tests/RunCMake/CompileFeatures/NonValidTarget2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2-stderr.txt b/Tests/RunCMake/CompileFeatures/NonValidTarget2-stderr.txt new file mode 100644 index 0000000..635150c --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget2.cmake:4 \(add_custom_target\): + Error evaluating generator expression: + + \$<COMPILE_FEATURES:cxx_final> + + \$<COMPILE_FEATURE> may only be used with binary targets. It may not be + used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake new file mode 100644 index 0000000..eb84692 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NonValidTarget2.cmake @@ -0,0 +1,8 @@ + +set(genexvar $<COMPILE_FEATURES:cxx_final>) + +add_custom_target(copy_target + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.txt" +) + +add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file${genexvar}.cpp") diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature-result.txt b/Tests/RunCMake/CompileFeatures/NotAFeature-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAFeature-stderr.txt new file mode 100644 index 0000000..ff60e50 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature-stderr.txt @@ -0,0 +1,2 @@ +CMake Error in CMakeLists.txt: + Specified unknown feature "not_a_feature" for target "somelib". diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature.cmake b/Tests/RunCMake/CompileFeatures/NotAFeature.cmake new file mode 100644 index 0000000..35246c8 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature.cmake @@ -0,0 +1,3 @@ + +add_library(somelib STATIC empty.cpp) +set_property(TARGET somelib PROPERTY COMPILE_FEATURES "not_a_feature") diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-result.txt b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-stderr.txt new file mode 100644 index 0000000..ff60e50 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex-stderr.txt @@ -0,0 +1,2 @@ +CMake Error in CMakeLists.txt: + Specified unknown feature "not_a_feature" for target "somelib". diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureGenex.cmake b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex.cmake new file mode 100644 index 0000000..ad2bd37 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureGenex.cmake @@ -0,0 +1,3 @@ + +add_library(somelib STATIC empty.cpp) +set_property(TARGET somelib PROPERTY COMPILE_FEATURES "$<1:not_a_feature>") diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive-result.txt b/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive-stderr.txt new file mode 100644 index 0000000..ff60e50 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive-stderr.txt @@ -0,0 +1,2 @@ +CMake Error in CMakeLists.txt: + Specified unknown feature "not_a_feature" for target "somelib". diff --git a/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive.cmake b/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive.cmake new file mode 100644 index 0000000..7311aec --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeatureTransitive.cmake @@ -0,0 +1,6 @@ + +add_library(iface INTERFACE) +set_property(TARGET iface PROPERTY INTERFACE_COMPILE_FEATURES "not_a_feature") + +add_library(somelib STATIC empty.cpp) +target_link_libraries(somelib iface) diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug-result.txt b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug-stderr.txt new file mode 100644 index 0000000..60a8e51 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug-stderr.txt @@ -0,0 +1,11 @@ +CMake Debug Log at NotAFeature_OriginDebug.cmake:4 \(set_property\): + Used compile features for target somelib: + + \* not_a_feature + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error in CMakeLists.txt: + Specified unknown feature "not_a_feature" for target "somelib". diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug.cmake b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug.cmake new file mode 100644 index 0000000..350c2ea --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug.cmake @@ -0,0 +1,4 @@ + +set(CMAKE_DEBUG_TARGET_PROPERTIES COMPILE_FEATURES) +add_library(somelib STATIC empty.cpp) +set_property(TARGET somelib PROPERTY COMPILE_FEATURES "not_a_feature") diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex-result.txt b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex-stderr.txt new file mode 100644 index 0000000..08e20a8 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex-stderr.txt @@ -0,0 +1,11 @@ +CMake Debug Log at NotAFeature_OriginDebugGenex.cmake:4 \(set_property\): + Used compile features for target somelib: + + \* not_a_feature + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error in CMakeLists.txt: + Specified unknown feature "not_a_feature" for target "somelib". diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex.cmake b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex.cmake new file mode 100644 index 0000000..2122981 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugGenex.cmake @@ -0,0 +1,4 @@ + +set(CMAKE_DEBUG_TARGET_PROPERTIES COMPILE_FEATURES) +add_library(somelib STATIC empty.cpp) +set_property(TARGET somelib PROPERTY COMPILE_FEATURES "$<1:not_a_feature>") diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive-result.txt b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive-stderr.txt new file mode 100644 index 0000000..23c3305 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive-stderr.txt @@ -0,0 +1,11 @@ +CMake Debug Log at NotAFeature_OriginDebugTransitive.cmake:6 \(target_link_libraries\): + Used compile features for target somelib: + + \* not_a_feature + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) + + +CMake Error in CMakeLists.txt: + Specified unknown feature "not_a_feature" for target "somelib". diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive.cmake b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive.cmake new file mode 100644 index 0000000..05d0073 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebugTransitive.cmake @@ -0,0 +1,6 @@ + +set(CMAKE_DEBUG_TARGET_PROPERTIES COMPILE_FEATURES) +add_library(iface INTERFACE) +set_property(TARGET iface PROPERTY INTERFACE_COMPILE_FEATURES "not_a_feature") +add_library(somelib STATIC empty.cpp) +target_link_libraries(somelib iface) diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features-result.txt b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features-stderr.txt b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features-stderr.txt new file mode 100644 index 0000000..d819d15 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at NotAFeature_OriginDebug_target_compile_features.cmake:4 \(target_compile_features\): + target_compile_features specified unknown feature "not_a_feature" for + target "somelib". +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features.cmake b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features.cmake new file mode 100644 index 0000000..467d9a1 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/NotAFeature_OriginDebug_target_compile_features.cmake @@ -0,0 +1,4 @@ + +set(CMAKE_DEBUG_TARGET_PROPERTIES COMPILE_FEATURES) +add_library(somelib STATIC empty.cpp) +target_compile_features(somelib PRIVATE not_a_feature) diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11-result.txt b/Tests/RunCMake/CompileFeatures/RequireCXX11-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11-stderr.txt b/Tests/RunCMake/CompileFeatures/RequireCXX11-stderr.txt new file mode 100644 index 0000000..0fc9112 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + Target "foo" requires the language dialect "CXX11" , but CMake does not + know the compile flags to use to enable it. diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11.cmake b/Tests/RunCMake/CompileFeatures/RequireCXX11.cmake new file mode 100644 index 0000000..f60504f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11.cmake @@ -0,0 +1,5 @@ + +add_library(foo empty.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 11) +set_property(TARGET foo PROPERTY CXX_EXTENSIONS FALSE) +set_property(TARGET foo PROPERTY CXX_STANDARD_REQUIRED TRUE) diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11Ext-result.txt b/Tests/RunCMake/CompileFeatures/RequireCXX11Ext-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11Ext-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11Ext-stderr.txt b/Tests/RunCMake/CompileFeatures/RequireCXX11Ext-stderr.txt new file mode 100644 index 0000000..5c68a1c --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11Ext-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + Target "foo" requires the language dialect "CXX11" \(with compiler + extensions\), but CMake does not know the compile flags to use to enable it. diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11Ext.cmake b/Tests/RunCMake/CompileFeatures/RequireCXX11Ext.cmake new file mode 100644 index 0000000..10b251a --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11Ext.cmake @@ -0,0 +1,4 @@ + +add_library(foo empty.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 11) +set_property(TARGET foo PROPERTY CXX_STANDARD_REQUIRED TRUE) diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable-result.txt b/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable-stderr.txt b/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable-stderr.txt new file mode 100644 index 0000000..5c68a1c --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + Target "foo" requires the language dialect "CXX11" \(with compiler + extensions\), but CMake does not know the compile flags to use to enable it. diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable.cmake b/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable.cmake new file mode 100644 index 0000000..29703db --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11ExtVariable.cmake @@ -0,0 +1,4 @@ + +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +add_library(foo empty.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 11) diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11Variable-result.txt b/Tests/RunCMake/CompileFeatures/RequireCXX11Variable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11Variable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11Variable-stderr.txt b/Tests/RunCMake/CompileFeatures/RequireCXX11Variable-stderr.txt new file mode 100644 index 0000000..0fc9112 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11Variable-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + Target "foo" requires the language dialect "CXX11" , but CMake does not + know the compile flags to use to enable it. diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX11Variable.cmake b/Tests/RunCMake/CompileFeatures/RequireCXX11Variable.cmake new file mode 100644 index 0000000..c480997 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX11Variable.cmake @@ -0,0 +1,5 @@ + +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +add_library(foo empty.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 11) +set_property(TARGET foo PROPERTY CXX_EXTENSIONS FALSE) diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98-result.txt b/Tests/RunCMake/CompileFeatures/RequireCXX98-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98-stderr.txt b/Tests/RunCMake/CompileFeatures/RequireCXX98-stderr.txt new file mode 100644 index 0000000..47c8688 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + Target "foo" requires the language dialect "CXX98" , but CMake does not + know the compile flags to use to enable it. diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98.cmake b/Tests/RunCMake/CompileFeatures/RequireCXX98.cmake new file mode 100644 index 0000000..fd9fb60 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98.cmake @@ -0,0 +1,5 @@ + +add_library(foo empty.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 98) +set_property(TARGET foo PROPERTY CXX_STANDARD_REQUIRED TRUE) +set_property(TARGET foo PROPERTY CXX_EXTENSIONS FALSE) diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98Ext-result.txt b/Tests/RunCMake/CompileFeatures/RequireCXX98Ext-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98Ext-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98Ext-stderr.txt b/Tests/RunCMake/CompileFeatures/RequireCXX98Ext-stderr.txt new file mode 100644 index 0000000..b4fdf8a --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98Ext-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + Target "foo" requires the language dialect "CXX98" \(with compiler + extensions\), but CMake does not know the compile flags to use to enable it. diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98Ext.cmake b/Tests/RunCMake/CompileFeatures/RequireCXX98Ext.cmake new file mode 100644 index 0000000..4ea595e --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98Ext.cmake @@ -0,0 +1,4 @@ + +add_library(foo empty.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 98) +set_property(TARGET foo PROPERTY CXX_STANDARD_REQUIRED TRUE) diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable-result.txt b/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable-stderr.txt b/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable-stderr.txt new file mode 100644 index 0000000..b4fdf8a --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + Target "foo" requires the language dialect "CXX98" \(with compiler + extensions\), but CMake does not know the compile flags to use to enable it. diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable.cmake b/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable.cmake new file mode 100644 index 0000000..0e3ef8d --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98ExtVariable.cmake @@ -0,0 +1,4 @@ + +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +add_library(foo empty.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 98) diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98Variable-result.txt b/Tests/RunCMake/CompileFeatures/RequireCXX98Variable-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98Variable-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98Variable-stderr.txt b/Tests/RunCMake/CompileFeatures/RequireCXX98Variable-stderr.txt new file mode 100644 index 0000000..47c8688 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98Variable-stderr.txt @@ -0,0 +1,3 @@ +CMake Error in CMakeLists.txt: + Target "foo" requires the language dialect "CXX98" , but CMake does not + know the compile flags to use to enable it. diff --git a/Tests/RunCMake/CompileFeatures/RequireCXX98Variable.cmake b/Tests/RunCMake/CompileFeatures/RequireCXX98Variable.cmake new file mode 100644 index 0000000..7562264 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RequireCXX98Variable.cmake @@ -0,0 +1,5 @@ + +set(CMAKE_CXX_STANDARD_REQUIRED TRUE) +add_library(foo empty.cpp) +set_property(TARGET foo PROPERTY CXX_STANDARD 98) +set_property(TARGET foo PROPERTY CXX_EXTENSIONS FALSE) diff --git a/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake new file mode 100644 index 0000000..1892a5c --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/RunCMakeTest.cmake @@ -0,0 +1,54 @@ +include(RunCMake) + +run_cmake(NotAFeature) +run_cmake(NotAFeatureGenex) +run_cmake(NotAFeatureTransitive) +run_cmake(NotAFeature_OriginDebug) +run_cmake(NotAFeature_OriginDebugGenex) +run_cmake(NotAFeature_OriginDebugTransitive) +run_cmake(NotAFeature_OriginDebug_target_compile_features) + +run_cmake(generate_feature_list) +file(READ + "${RunCMake_BINARY_DIR}/generate_feature_list-build/c_features.txt" + C_FEATURES +) +file(READ + "${RunCMake_BINARY_DIR}/generate_feature_list-build/cxx_features.txt" + CXX_FEATURES +) + +if (NOT C_FEATURES) + run_cmake(NoSupportedCFeatures) + run_cmake(NoSupportedCFeaturesGenex) +endif() + +if (NOT CXX_FEATURES) + run_cmake(NoSupportedCxxFeatures) + run_cmake(NoSupportedCxxFeaturesGenex) +else() + run_cmake(LinkImplementationFeatureCycle) + run_cmake(LinkImplementationFeatureCycleSolved) + + if (";${CXX_FEATURES};" MATCHES ";cxx_final;") + set(RunCMake_TEST_OPTIONS "-DHAVE_FINAL=1") + endif() + run_cmake(NonValidTarget1) + run_cmake(NonValidTarget2) + unset(RunCMake_TEST_OPTIONS) +endif() + +foreach(standard 98 11) + file(READ + "${RunCMake_BINARY_DIR}/generate_feature_list-build/cxx${standard}_flag.txt" + CXX${standard}_FLAG + ) + if (CXX${standard}_FLAG STREQUAL NOTFOUND) + run_cmake(RequireCXX${standard}) + run_cmake(RequireCXX${standard}Variable) + endif() + if (CXX${standard}EXT_FLAG STREQUAL NOTFOUND) + run_cmake(RequireCXX${standard}Ext) + run_cmake(RequireCXX${standard}ExtVariable) + endif() +endforeach() diff --git a/Tests/RunCMake/CompileFeatures/empty.c b/Tests/RunCMake/CompileFeatures/empty.c new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/empty.c @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/CompileFeatures/empty.cpp b/Tests/RunCMake/CompileFeatures/empty.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/empty.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/CompileFeatures/generate_feature_list.cmake b/Tests/RunCMake/CompileFeatures/generate_feature_list.cmake new file mode 100644 index 0000000..09e17b1 --- /dev/null +++ b/Tests/RunCMake/CompileFeatures/generate_feature_list.cmake @@ -0,0 +1,29 @@ + +enable_language(C) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/c_features.txt" + "${CMAKE_C_COMPILE_FEATURES}" +) + +file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cxx_features.txt" + "${CMAKE_CXX_COMPILE_FEATURES}" +) + +foreach(standard 98 11) + set(CXX${standard}_FLAG NOTFOUND) + if (DEFINED CMAKE_CXX${standard}_STANDARD_COMPILE_OPTION) + set(CXX${standard}_FLAG ${CMAKE_CXX${standard}_STANDARD_COMPILE_OPTION}) + endif() + + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cxx${standard}_flag.txt" + "${CXX${standard}_FLAG}" + ) + set(CXX${standard}EXT_FLAG NOTFOUND) + if (DEFINED CMAKE_CXX${standard}_EXTENSION_COMPILE_OPTION) + set(CXX${standard}EXT_FLAG ${CMAKE_CXX${standard}_EXTENSION_COMPILE_OPTION}) + endif() + + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/cxx${standard}ext_flag.txt" + "${CXX${standard}EXT_FLAG}" + ) +endforeach() diff --git a/Tests/RunCMake/Configure/FailCopyFileABI-stdout.txt b/Tests/RunCMake/Configure/FailCopyFileABI-stdout.txt index bb87f4c..92fe233 100644 --- a/Tests/RunCMake/Configure/FailCopyFileABI-stdout.txt +++ b/Tests/RunCMake/Configure/FailCopyFileABI-stdout.txt @@ -1,4 +1,4 @@ -- Detecting C compiler ABI info --- Detecting C compiler ABI info - failed +-- Detecting C compiler ABI info - failed.* -- Configuring done -- Generating done diff --git a/Tests/RunCMake/ExternalData/Directory1-stderr.txt b/Tests/RunCMake/ExternalData/Directory1-stderr.txt index 85c250f..2bc3c60 100644 --- a/Tests/RunCMake/ExternalData/Directory1-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory1-stderr.txt @@ -7,7 +7,7 @@ CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Directory1 - that does not exist as a file \(with or without an extension\)! + that is directory instead of a file! Call Stack \(most recent call first\): .* Directory1.cmake:3 \(ExternalData_Add_Test\) diff --git a/Tests/RunCMake/ExternalData/Directory3-stderr.txt b/Tests/RunCMake/ExternalData/Directory3-stderr.txt index 56a341e..ceed2a0 100644 --- a/Tests/RunCMake/ExternalData/Directory3-stderr.txt +++ b/Tests/RunCMake/ExternalData/Directory3-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): +CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Data file referenced by argument DATA{Directory3/\*} @@ -12,3 +12,4 @@ Call Stack \(most recent call first\): .* Directory3.cmake:3 \(ExternalData_Add_Test\) CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/MissingData-stderr.txt b/Tests/RunCMake/ExternalData/MissingData-stderr.txt index e794f95..39ed2f1 100644 --- a/Tests/RunCMake/ExternalData/MissingData-stderr.txt +++ b/Tests/RunCMake/ExternalData/MissingData-stderr.txt @@ -1,4 +1,4 @@ -CMake Error at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): +CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): Data file referenced by argument DATA{MissingData.txt} @@ -10,5 +10,6 @@ CMake Error 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:2 \(ExternalData_Add_Test\) + MissingData.cmake:4 \(ExternalData_Expand_Arguments\) CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/MissingData-stdout.txt b/Tests/RunCMake/ExternalData/MissingData-stdout.txt new file mode 100644 index 0000000..addd40e --- /dev/null +++ b/Tests/RunCMake/ExternalData/MissingData-stdout.txt @@ -0,0 +1 @@ +-- Missing data reference correctly transformed! diff --git a/Tests/RunCMake/ExternalData/MissingData.cmake b/Tests/RunCMake/ExternalData/MissingData.cmake index b3c8a5c..f5fefd5 100644 --- a/Tests/RunCMake/ExternalData/MissingData.cmake +++ b/Tests/RunCMake/ExternalData/MissingData.cmake @@ -1,5 +1,10 @@ include(ExternalData) -ExternalData_Add_Test(Data - NAME Test - COMMAND ${CMAKE_COMMAND} -E echo DATA{MissingData.txt} - ) + +set(output "${CMAKE_SOURCE_DIR}/MissingData.txt") +ExternalData_Expand_Arguments(Data args DATA{MissingData.txt}) +if("x${args}" STREQUAL "x${output}") + message(STATUS "Missing data reference correctly transformed!") +else() + message(FATAL_ERROR "Missing data reference transformed to:\n ${args}\n" + "but we expected:\n ${output}") +endif() diff --git a/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt b/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt new file mode 100644 index 0000000..315af5e --- /dev/null +++ b/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stderr.txt @@ -0,0 +1,15 @@ +CMake Warning \(dev\) at .*/Modules/ExternalData.cmake:[0-9]+ \(message\): + Data file referenced by argument + + DATA{MissingData.txt,Data.txt} + + corresponds to source tree path + + MissingData.txt + + 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\) +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stdout.txt b/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stdout.txt new file mode 100644 index 0000000..addd40e --- /dev/null +++ b/Tests/RunCMake/ExternalData/MissingDataWithAssociated-stdout.txt @@ -0,0 +1 @@ +-- Missing data reference correctly transformed! diff --git a/Tests/RunCMake/ExternalData/MissingDataWithAssociated.cmake b/Tests/RunCMake/ExternalData/MissingDataWithAssociated.cmake new file mode 100644 index 0000000..a4c4638 --- /dev/null +++ b/Tests/RunCMake/ExternalData/MissingDataWithAssociated.cmake @@ -0,0 +1,10 @@ +include(ExternalData) + +set(output "${CMAKE_BINARY_DIR}/MissingData.txt") +ExternalData_Expand_Arguments(Data args DATA{MissingData.txt,Data.txt}) +if("x${args}" STREQUAL "x${output}") + message(STATUS "Missing data reference correctly transformed!") +else() + message(FATAL_ERROR "Missing data reference transformed to:\n ${args}\n" + "but we expected:\n ${output}") +endif() diff --git a/Tests/RunCMake/ExternalData/RunCMakeTest.cmake b/Tests/RunCMake/ExternalData/RunCMakeTest.cmake index 93ff08f..04e3d59 100644 --- a/Tests/RunCMake/ExternalData/RunCMakeTest.cmake +++ b/Tests/RunCMake/ExternalData/RunCMakeTest.cmake @@ -15,6 +15,7 @@ run_cmake(LinkContentMD5) run_cmake(LinkContentSHA1) run_cmake(LinkDirectory1) run_cmake(MissingData) +run_cmake(MissingDataWithAssociated) run_cmake(NoLinkInSource) run_cmake(NoURLTemplates) run_cmake(NormalData1) diff --git a/Tests/RunCMake/FeatureSummary/CMakeLists.txt b/Tests/RunCMake/FeatureSummary/CMakeLists.txt new file mode 100644 index 0000000..72abfc8 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.11) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatAll-stdout.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatAll-stdout.txt new file mode 100644 index 0000000..9a3f023 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatAll-stdout.txt @@ -0,0 +1,7 @@ +-- The following features have been enabled: + + \* Foo , Foo\. + +-- The following features have been disabled: + + \* Bar , Bar\. diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatAll.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatAll.cmake new file mode 100644 index 0000000..ec5ebcb --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatAll.cmake @@ -0,0 +1,9 @@ +include(FeatureSummary) + +set(WITH_FOO 1) +set(WITH_BAR 0) + +add_feature_info(Foo WITH_FOO "Foo.") +add_feature_info(Bar WITH_BAR "Bar.") + +feature_summary(WHAT ALL) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatList-stdout.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatList-stdout.txt new file mode 100644 index 0000000..4d8f25f --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatList-stdout.txt @@ -0,0 +1,7 @@ +-- The following features have been disabled: + + \* Bar , Bar\. + +-- The following features have been enabled: + + \* Foo , Foo\. diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatList.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatList.cmake new file mode 100644 index 0000000..d04ba88 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatList.cmake @@ -0,0 +1,9 @@ +include(FeatureSummary) + +set(WITH_FOO 1) +set(WITH_BAR 0) + +add_feature_info(Foo WITH_FOO "Foo.") +add_feature_info(Bar WITH_BAR "Bar.") + +feature_summary(WHAT DISABLED_FEATURES ENABLED_FEATURES) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll-result.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll-stderr.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll-stderr.txt new file mode 100644 index 0000000..18d9ebd --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at .*/Modules/FeatureSummary\.cmake:[0-9]+. \(message\): + The WHAT argument of FEATURE_SUMMARY\(\) contains ALL, which cannot be + combined with other values\. +Call Stack \(most recent call first\): + FeatureSummaryWhatListAll\.cmake:[0-9]+ \(feature_summary\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll.cmake new file mode 100644 index 0000000..1877ea5 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll.cmake @@ -0,0 +1,9 @@ +include(FeatureSummary) + +set(WITH_FOO 1) +set(WITH_BAR 0) + +add_feature_info(Foo WITH_FOO "Foo.") +add_feature_info(Bar WITH_BAR "Bar.") + +feature_summary(WHAT ENABLED_FEATURES ALL) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown-result.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown-stderr.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown-stderr.txt new file mode 100644 index 0000000..3ad3750 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at .*/Modules/FeatureSummary\.cmake:[0-9]+. \(message\): + The WHAT argument of FEATURE_SUMMARY\(\) contains FOO, which is not a valid + value\. +Call Stack \(most recent call first\): + FeatureSummaryWhatListUnknown\.cmake:[0-9]+ \(feature_summary\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown.cmake new file mode 100644 index 0000000..46088d4 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown.cmake @@ -0,0 +1,9 @@ +include(FeatureSummary) + +set(WITH_FOO 1) +set(WITH_BAR 0) + +add_feature_info(Foo WITH_FOO "Foo.") +add_feature_info(Bar WITH_BAR "Bar.") + +feature_summary(WHAT ENABLED_FEATURES FOO) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingle-stdout.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingle-stdout.txt new file mode 100644 index 0000000..240632d --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingle-stdout.txt @@ -0,0 +1 @@ + \* Foo , Foo\. diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingle.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingle.cmake new file mode 100644 index 0000000..593dfb6 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingle.cmake @@ -0,0 +1,9 @@ +include(FeatureSummary) + +set(WITH_FOO 1) +set(WITH_BAR 0) + +add_feature_info(Foo WITH_FOO "Foo.") +add_feature_info(Bar WITH_BAR "Bar.") + +feature_summary(WHAT ENABLED_FEATURES) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown-result.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown-stderr.txt b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown-stderr.txt new file mode 100644 index 0000000..c78853c --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at .*/Modules/FeatureSummary\.cmake:[0-9]+. \(message\): + The WHAT argument of FEATURE_SUMMARY\(\) contains FOO, which is not a valid + value\. +Call Stack \(most recent call first\): + FeatureSummaryWhatSingleUnknown\.cmake:[0-9]+ \(feature_summary\) + CMakeLists.txt:[0-9]+ \(include\) diff --git a/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown.cmake b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown.cmake new file mode 100644 index 0000000..c2d6d2e --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown.cmake @@ -0,0 +1,9 @@ +include(FeatureSummary) + +set(WITH_FOO 1) +set(WITH_BAR 0) + +add_feature_info(Foo WITH_FOO "Foo.") +add_feature_info(Bar WITH_BAR "Bar.") + +feature_summary(WHAT FOO) diff --git a/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake new file mode 100644 index 0000000..1417338 --- /dev/null +++ b/Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake @@ -0,0 +1,8 @@ +include(RunCMake) + +run_cmake(FeatureSummaryWhatAll) +run_cmake(FeatureSummaryWhatSingle) +run_cmake(FeatureSummaryWhatSingleUnknown) +run_cmake(FeatureSummaryWhatList) +run_cmake(FeatureSummaryWhatListUnknown) +run_cmake(FeatureSummaryWhatListAll) diff --git a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake index f07431c..f23fa19 100644 --- a/Tests/RunCMake/File_Generate/RunCMakeTest.cmake +++ b/Tests/RunCMake/File_Generate/RunCMakeTest.cmake @@ -8,3 +8,30 @@ run_cmake(EmptyCondition1) run_cmake(EmptyCondition2) run_cmake(BadCondition) run_cmake(DebugEvaluate) + +set(timeformat "%Y%j%H%M%S") + +file(REMOVE "${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt") +set(RunCMake_TEST_FILE "WriteIfDifferent") +set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/WriteIfDifferent-build") +run_cmake(WriteIfDifferent-prepare) +unset(RunCMake_TEST_FILE) +unset(RunCMake_TEST_BINARY_DIR) +file(TIMESTAMP "${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt" timestamp ${timeformat}) +if(NOT timestamp) + message(SEND_ERROR "Could not get timestamp for \"${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt\"") +endif() + +execute_process(COMMAND ${CMAKE_COMMAND} -E sleep 1) + +set(RunCMake_TEST_NO_CLEAN ON) +run_cmake(WriteIfDifferent) +file(TIMESTAMP "${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt" timestamp_after ${timeformat}) +if(NOT timestamp_after) + message(SEND_ERROR "Could not get timestamp for \"${RunCMake_BINARY_DIR}/WriteIfDifferent-build/output_file.txt\"") +endif() +unset(RunCMake_TEST_NO_CLEAN) + +if (NOT timestamp_after STREQUAL timestamp) + message(SEND_ERROR "WriteIfDifferent changed output file.") +endif() diff --git a/Tests/RunCMake/File_Generate/WriteIfDifferent-result.txt b/Tests/RunCMake/File_Generate/WriteIfDifferent-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/File_Generate/WriteIfDifferent-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/File_Generate/WriteIfDifferent-stderr.txt b/Tests/RunCMake/File_Generate/WriteIfDifferent-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/File_Generate/WriteIfDifferent-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake b/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake new file mode 100644 index 0000000..d1d832a --- /dev/null +++ b/Tests/RunCMake/File_Generate/WriteIfDifferent.cmake @@ -0,0 +1,5 @@ + +file(GENERATE + OUTPUT output_file.txt + CONTENT "123" +) diff --git a/Tests/RunCMake/FindPkgConfig/CMakeLists.txt b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt new file mode 100644 index 0000000..72abfc8 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.11) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake new file mode 100644 index 0000000..924976e --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_NO_PKGCONFIG_PATH.cmake @@ -0,0 +1,41 @@ +# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS +enable_language(C) + +# Prepare environment and variables +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH FALSE) +set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-foo") +if(WIN32) + set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat") + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar;X:\\this\\directory\\should\\not\\exist\\in\\the\\filesystem") + set(ENV{PKG_CONFIG_PATH} "C:\\baz") +else() + set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh") + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem") + set(ENV{PKG_CONFIG_PATH} "/baz") +endif() + + +find_package(PkgConfig) + +if(WIN32) + set(expected_path "C:\\baz") +else() + set(expected_path "/baz") +endif() + + +pkg_check_modules(FOO "${expected_path}") + +if(NOT "FOO_FOUND") + message(FATAL_ERROR "Expected PKG_CONFIG_PATH: \"${expected_path}\".") +endif() + + + +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) + +pkg_check_modules(BAR "${expected_path}" NO_CMAKE_PATH NO_CMAKE_ENVIRONMENT_PATH) + +if(NOT "BAR_FOUND") + message(FATAL_ERROR "Expected PKG_CONFIG_PATH: \"${expected_path}\".") +endif() diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake new file mode 100644 index 0000000..4a66e85 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH.cmake @@ -0,0 +1,51 @@ +# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS +enable_language(C) + +# Prepare environment and variables +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) +set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-foo") +if(WIN32) + set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat") + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar;X:\\this\\directory\\should\\not\\exist\\in\\the\\filesystem") + set(ENV{PKG_CONFIG_PATH} "C:\\baz") +else() + set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh") + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem") + set(ENV{PKG_CONFIG_PATH} "/baz") +endif() + + +find_package(PkgConfig) + + +if(NOT DEFINED CMAKE_SYSTEM_NAME + OR (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" + AND NOT CMAKE_CROSSCOMPILING)) + if(EXISTS "/etc/debian_version") # is this a debian system ? + if(CMAKE_LIBRARY_ARCHITECTURE MATCHES "^(i386-linux-gnu|x86_64-linux-gnu)$") + # Cannot create directories for all the existing architectures... + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig") + else() + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig") + endif() + else() + # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property + get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) + if(uselib64) + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig") + endif() + endif() +else() + if(WIN32) + set(expected_path "C:\\baz;${CMAKE_CURRENT_SOURCE_DIR}\\pc-foo\\lib\\pkgconfig;${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar\\lib\\pkgconfig") + else() + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig") + endif() +endif() + + +pkg_check_modules(FOO "${expected_path}") + +if(NOT "FOO_FOUND") + message(FATAL_ERROR "Expected PKG_CONFIG_PATH: \"${expected_path}\".") +endif() diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake new file mode 100644 index 0000000..0b057b8 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH.cmake @@ -0,0 +1,51 @@ +# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS +enable_language(C) + +# Prepare environment and variables +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) +set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-foo") +if(WIN32) + set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat") + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar;X:\\this\\directory\\should\\not\\exist\\in\\the\\filesystem") + set(ENV{PKG_CONFIG_PATH} "C:\\baz") +else() + set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh") + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem") + set(ENV{PKG_CONFIG_PATH} "/baz") +endif() + + +find_package(PkgConfig) + + +if(NOT DEFINED CMAKE_SYSTEM_NAME + OR (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" + AND NOT CMAKE_CROSSCOMPILING)) + if(EXISTS "/etc/debian_version") # is this a debian system ? + if(CMAKE_LIBRARY_ARCHITECTURE MATCHES "^(i386-linux-gnu|x86_64-linux-gnu)$") + # Cannot create directories for all the existing architectures... + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig") + else() + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig") + endif() + else() + # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property + get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) + if(uselib64) + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig") + endif() + endif() +else() + if(WIN32) + set(expected_path "C:\\baz;${CMAKE_CURRENT_SOURCE_DIR}\\pc-foo\\lib\\pkgconfig") + else() + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-foo/lib/pkgconfig") + endif() +endif() + + +pkg_check_modules(FOO "${expected_path}" NO_CMAKE_ENVIRONMENT_PATH) + +if(NOT "FOO_FOUND") + message(FATAL_ERROR "Expected PKG_CONFIG_PATH: \"${expected_path}\".") +endif() diff --git a/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake new file mode 100644 index 0000000..a3154f1 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH.cmake @@ -0,0 +1,51 @@ +# Needed for CMAKE_SYSTEM_NAME, CMAKE_LIBRARY_ARCHITECTURE and FIND_LIBRARY_USE_LIB64_PATHS +enable_language(C) + +# Prepare environment and variables +set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) +set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}/pc-foo") +if(WIN32) + set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}\\dummy-pkg-config.bat") + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar;X:\\this\\directory\\should\\not\\exist\\in\\the\\filesystem") + set(ENV{PKG_CONFIG_PATH} "C:\\baz") +else() + set(PKG_CONFIG_EXECUTABLE "${CMAKE_CURRENT_SOURCE_DIR}/dummy-pkg-config.sh") + set(ENV{CMAKE_PREFIX_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/pc-bar:/this/directory/should/not/exist/in/the/filesystem") + set(ENV{PKG_CONFIG_PATH} "/baz") +endif() + + +find_package(PkgConfig) + + +if(NOT DEFINED CMAKE_SYSTEM_NAME + OR (CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$" + AND NOT CMAKE_CROSSCOMPILING)) + if(EXISTS "/etc/debian_version") # is this a debian system ? + if(CMAKE_LIBRARY_ARCHITECTURE MATCHES "^(i386-linux-gnu|x86_64-linux-gnu)$") + # Cannot create directories for all the existing architectures... + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig") + else() + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig") + endif() + else() + # not debian, chech the FIND_LIBRARY_USE_LIB64_PATHS property + get_property(uselib64 GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS) + if(uselib64) + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib64/pkgconfig:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig") + endif() + endif() +else() + if(WIN32) + set(expected_path "C:\\baz;${CMAKE_CURRENT_SOURCE_DIR}\\pc-bar\\lib\\pkgconfig") + else() + set(expected_path "/baz:${CMAKE_CURRENT_SOURCE_DIR}/pc-bar/lib/pkgconfig") + endif() +endif() + + +pkg_check_modules(FOO "${expected_path}" NO_CMAKE_PATH) + +if(NOT "FOO_FOUND") + message(FATAL_ERROR "Expected PKG_CONFIG_PATH: \"${expected_path}\".") +endif() diff --git a/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake new file mode 100644 index 0000000..bca93bb --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/RunCMakeTest.cmake @@ -0,0 +1,6 @@ +include(RunCMake) + +run_cmake(FindPkgConfig_NO_PKGCONFIG_PATH) +run_cmake(FindPkgConfig_PKGCONFIG_PATH) +run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_PATH) +run_cmake(FindPkgConfig_PKGCONFIG_PATH_NO_CMAKE_ENVIRONMENT_PATH) diff --git a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat new file mode 100755 index 0000000..f2f86b0 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.bat @@ -0,0 +1,18 @@ +@ECHO OFF +IF "%1"=="" ( + EXIT /B 255 +) +IF "%1"=="--version" ( + ECHO 0.0-cmake-dummy + EXIT /B 0 +) + +IF "%1"=="--exists" ( + SHIFT + ECHO Expected: %* + ECHO Found: %PKG_CONFIG_PATH% + IF NOT "%*"=="%PKG_CONFIG_PATH%" ( + EXIT /B 1 + ) +) +EXIT /B 0 diff --git a/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh new file mode 100755 index 0000000..852e841 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/dummy-pkg-config.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +# This is a replacement for pkg-config that compares the string passed +# to the --exists argument with the PKG_CONFIG_PATH environment variable +# and returns 1 if they are different. + +case $1 in + --version) + echo "0.0-cmake-dummy" + ;; + --exists) + shift + echo "Expected: $@" + echo "Found: ${PKG_CONFIG_PATH}" + [ "$@" = "${PKG_CONFIG_PATH}" ] || exit 1 + ;; + *) + exit 255 + ;; +esac diff --git a/Tests/RunCMake/FindPkgConfig/pc-bar/lib/i386-linux-gnu/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-bar/lib/i386-linux-gnu/pkgconfig/.placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/pc-bar/lib/i386-linux-gnu/pkgconfig/.placeholder diff --git a/Tests/RunCMake/FindPkgConfig/pc-bar/lib/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-bar/lib/pkgconfig/.placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/pc-bar/lib/pkgconfig/.placeholder diff --git a/Tests/RunCMake/FindPkgConfig/pc-bar/lib/x86_64-linux-gnu/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-bar/lib/x86_64-linux-gnu/pkgconfig/.placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/pc-bar/lib/x86_64-linux-gnu/pkgconfig/.placeholder diff --git a/Tests/RunCMake/FindPkgConfig/pc-bar/lib64/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-bar/lib64/pkgconfig/.placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/pc-bar/lib64/pkgconfig/.placeholder diff --git a/Tests/RunCMake/FindPkgConfig/pc-foo/lib/i386-linux-gnu/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-foo/lib/i386-linux-gnu/pkgconfig/.placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/pc-foo/lib/i386-linux-gnu/pkgconfig/.placeholder diff --git a/Tests/RunCMake/FindPkgConfig/pc-foo/lib/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-foo/lib/pkgconfig/.placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/pc-foo/lib/pkgconfig/.placeholder diff --git a/Tests/RunCMake/FindPkgConfig/pc-foo/lib/x86_64-linux-gnu/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-foo/lib/x86_64-linux-gnu/pkgconfig/.placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/pc-foo/lib/x86_64-linux-gnu/pkgconfig/.placeholder diff --git a/Tests/RunCMake/FindPkgConfig/pc-foo/lib64/pkgconfig/.placeholder b/Tests/RunCMake/FindPkgConfig/pc-foo/lib64/pkgconfig/.placeholder new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/FindPkgConfig/pc-foo/lib64/pkgconfig/.placeholder diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID-stderr.txt new file mode 100644 index 0000000..dd7a183 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget-CXX_COMPILER_ID.cmake:4 \(add_custom_command\): + Error evaluating generator expression: + + \$<CXX_COMPILER_ID> + + \$<CXX_COMPILER_ID> may only be used with binary targets. It may not be + used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID.cmake new file mode 100644 index 0000000..7dd38da --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_ID.cmake @@ -0,0 +1,8 @@ + +enable_language(CXX) + +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<CXX_COMPILER_ID>.cpp" +) + +add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION-stderr.txt new file mode 100644 index 0000000..d4a064a --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget-CXX_COMPILER_VERSION.cmake:4 \(add_custom_command\): + Error evaluating generator expression: + + \$<CXX_COMPILER_VERSION> + + \$<CXX_COMPILER_VERSION> may only be used with binary targets. It may not + be used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION.cmake new file mode 100644 index 0000000..1afb2b5 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-CXX_COMPILER_VERSION.cmake @@ -0,0 +1,8 @@ + +enable_language(CXX) + +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<CXX_COMPILER_VERSION>.cpp" +) + +add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID-stderr.txt new file mode 100644 index 0000000..b8e53ed --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget-C_COMPILER_ID.cmake:4 \(add_custom_command\): + Error evaluating generator expression: + + \$<C_COMPILER_ID> + + \$<C_COMPILER_ID> may only be used with binary targets. It may not be used + with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID.cmake new file mode 100644 index 0000000..2d92ee3 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_ID.cmake @@ -0,0 +1,8 @@ + +enable_language(CXX) + +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<C_COMPILER_ID>.cpp" +) + +add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION-stderr.txt new file mode 100644 index 0000000..551efe9 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget-C_COMPILER_VERSION.cmake:4 \(add_custom_command\): + Error evaluating generator expression: + + \$<C_COMPILER_VERSION> + + \$<C_COMPILER_VERSION> may only be used with binary targets. It may not be + used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION.cmake new file mode 100644 index 0000000..9b8a531 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-C_COMPILER_VERSION.cmake @@ -0,0 +1,8 @@ + +enable_language(CXX) + +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<C_COMPILER_VERSION>.cpp" +) + +add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY-stderr.txt new file mode 100644 index 0000000..0e87538 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at NonValidTarget-TARGET_POLICY.cmake:4 \(add_custom_command\): + Error evaluating generator expression: + + \$<TARGET_POLICY:CMP0004> + + \$<TARGET_POLICY:prop> may only be used with binary targets. It may not be + used with add_custom_command or add_custom_target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY.cmake new file mode 100644 index 0000000..10b37b5 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_POLICY.cmake @@ -0,0 +1,8 @@ + +enable_language(CXX) + +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<TARGET_POLICY:CMP0004>.cpp" +) + +add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY-result.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY-stderr.txt b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY-stderr.txt new file mode 100644 index 0000000..08ad3c2 --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY-stderr.txt @@ -0,0 +1,11 @@ +CMake Error at NonValidTarget-TARGET_PROPERTY.cmake:4 \(add_custom_command\): + Error evaluating generator expression: + + \$<TARGET_PROPERTY:NotAProperty> + + \$<TARGET_PROPERTY:prop> may only be used with binary targets. It may not + be used with add_custom_command or add_custom_target. Specify the target + to read a property from using the \$<TARGET_PROPERTY:tgt,prop> signature + instead. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY.cmake b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY.cmake new file mode 100644 index 0000000..64abc5f --- /dev/null +++ b/Tests/RunCMake/GeneratorExpression/NonValidTarget-TARGET_PROPERTY.cmake @@ -0,0 +1,8 @@ + +enable_language(CXX) + +add_custom_command(OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp" + COMMAND "${CMAKE_COMMAND}" -E copy "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp" "${CMAKE_CURRENT_BINARY_DIR}/copied_file$<TARGET_PROPERTY:NotAProperty>.cpp" +) + +add_library(empty "${CMAKE_CURRENT_BINARY_DIR}/copied_file.cpp") diff --git a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake index f3f99ed..c8f3fdf 100644 --- a/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorExpression/RunCMakeTest.cmake @@ -10,3 +10,9 @@ run_cmake(BadTargetName) run_cmake(BadTargetTypeObject) run_cmake(BadInstallPrefix) run_cmake(CMP0044-WARN) +run_cmake(NonValidTarget-C_COMPILER_ID) +run_cmake(NonValidTarget-CXX_COMPILER_ID) +run_cmake(NonValidTarget-C_COMPILER_VERSION) +run_cmake(NonValidTarget-CXX_COMPILER_VERSION) +run_cmake(NonValidTarget-TARGET_PROPERTY) +run_cmake(NonValidTarget-TARGET_POLICY) diff --git a/Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt index bf1f190..d0d526c 100644 --- a/Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt +++ b/Tests/RunCMake/GeneratorToolset/BadToolset-stderr.txt @@ -1,4 +1,4 @@ -CMake Error: +CMake Error at CMakeLists.txt:[0-9]+ \(project\): Generator .* diff --git a/Tests/RunCMake/GeneratorToolset/BadToolset-toolchain.cmake b/Tests/RunCMake/GeneratorToolset/BadToolset-toolchain.cmake new file mode 100644 index 0000000..7bbf327 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolset-toolchain.cmake @@ -0,0 +1 @@ +set(CMAKE_GENERATOR_TOOLSET "Bad Toolset") diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-result.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-stderr.txt b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-stderr.txt new file mode 100644 index 0000000..d0d526c --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain-stderr.txt @@ -0,0 +1,10 @@ +CMake Error at CMakeLists.txt:[0-9]+ \(project\): + Generator + + .* + + does not support toolset specification, but toolset + + Bad Toolset + + was specified.$ diff --git a/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain.cmake b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain.cmake new file mode 100644 index 0000000..2fc38e5 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/BadToolsetToolchain.cmake @@ -0,0 +1 @@ +message(FATAL_ERROR "This should not be reached!") diff --git a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake index 1ccc1ad..d39f33f 100644 --- a/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake +++ b/Tests/RunCMake/GeneratorToolset/RunCMakeTest.cmake @@ -12,6 +12,17 @@ else() endif() set(RunCMake_GENERATOR_TOOLSET "") + set(RunCMake_TEST_OPTIONS -T "Extra Toolset") run_cmake(TwoToolsets) unset(RunCMake_TEST_OPTIONS) + +if("${RunCMake_GENERATOR}" MATCHES "Visual Studio 1[012]|Xcode" AND NOT XCODE_BELOW_3) + set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/TestToolset-toolchain.cmake) + run_cmake(TestToolsetToolchain) + unset(RunCMake_TEST_OPTIONS) +else() + set(RunCMake_TEST_OPTIONS -DCMAKE_TOOLCHAIN_FILE=${RunCMake_SOURCE_DIR}/BadToolset-toolchain.cmake) + run_cmake(BadToolsetToolchain) + unset(RunCMake_TEST_OPTIONS) +endif() diff --git a/Tests/RunCMake/GeneratorToolset/TestToolset-toolchain.cmake b/Tests/RunCMake/GeneratorToolset/TestToolset-toolchain.cmake new file mode 100644 index 0000000..bee2ae4 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolset-toolchain.cmake @@ -0,0 +1 @@ +set(CMAKE_GENERATOR_TOOLSET "Test Toolset") diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-result.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-stderr.txt b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-stderr.txt new file mode 100644 index 0000000..0623e90 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at TestToolsetToolchain.cmake:[0-9]+ \(message\): + CMAKE_GENERATOR_TOOLSET is "Test Toolset" as expected. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at TestToolsetToolchain.cmake:[0-9]+ \(message\): + CMAKE_(VS|XCODE)_PLATFORM_TOOLSET is "Test Toolset" as expected. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain.cmake b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain.cmake new file mode 100644 index 0000000..7c1c415 --- /dev/null +++ b/Tests/RunCMake/GeneratorToolset/TestToolsetToolchain.cmake @@ -0,0 +1,25 @@ +if("x${CMAKE_GENERATOR_TOOLSET}" STREQUAL "xTest Toolset") + message(SEND_ERROR "CMAKE_GENERATOR_TOOLSET is \"Test Toolset\" as expected.") +else() + message(FATAL_ERROR + "CMAKE_GENERATOR_TOOLSET is \"${CMAKE_GENERATOR_TOOLSET}\" " + "but should be \"Test Toolset\"!") +endif() +if(CMAKE_GENERATOR MATCHES "Visual Studio") + if("x${CMAKE_VS_PLATFORM_TOOLSET}" STREQUAL "xTest Toolset") + message(SEND_ERROR "CMAKE_VS_PLATFORM_TOOLSET is \"Test Toolset\" as expected.") + else() + message(FATAL_ERROR + "CMAKE_VS_PLATFORM_TOOLSET is \"${CMAKE_VS_PLATFORM_TOOLSET}\" " + "but should be \"Test Toolset\"!") + endif() +endif() +if(CMAKE_GENERATOR MATCHES "Xcode") + if("x${CMAKE_XCODE_PLATFORM_TOOLSET}" STREQUAL "xTest Toolset") + message(SEND_ERROR "CMAKE_XCODE_PLATFORM_TOOLSET is \"Test Toolset\" as expected.") + else() + message(FATAL_ERROR + "CMAKE_XCODE_PLATFORM_TOOLSET is \"${CMAKE_XCODE_PLATFORM_TOOLSET}\" " + "but should be \"Test Toolset\"!") + endif() +endif() diff --git a/Tests/RunCMake/ObjectLibrary/BadSourceExpression1-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadSourceExpression1-stderr.txt index a1cac36..859dc3f 100644 --- a/Tests/RunCMake/ObjectLibrary/BadSourceExpression1-stderr.txt +++ b/Tests/RunCMake/ObjectLibrary/BadSourceExpression1-stderr.txt @@ -1,6 +1,8 @@ CMake Error at BadSourceExpression1.cmake:1 \(add_library\): - Unrecognized generator expression: + Error evaluating generator expression: \$<BAD_EXPRESSION> + + Expression did not evaluate to a known generator expression Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/ObjectLibrary/BadSourceExpression2-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadSourceExpression2-stderr.txt index f1fcbe8..7060c61 100644 --- a/Tests/RunCMake/ObjectLibrary/BadSourceExpression2-stderr.txt +++ b/Tests/RunCMake/ObjectLibrary/BadSourceExpression2-stderr.txt @@ -1,4 +1,8 @@ CMake Error at BadSourceExpression2.cmake:1 \(add_library\): + Error evaluating generator expression: + + \$<TARGET_OBJECTS:DoesNotExist> + Objects of target "DoesNotExist" referenced but no such target exists. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt b/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt index ad14a35..838b3d8 100644 --- a/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt +++ b/Tests/RunCMake/ObjectLibrary/BadSourceExpression3-stderr.txt @@ -1,4 +1,8 @@ CMake Error at BadSourceExpression3.cmake:2 \(add_library\): + Error evaluating generator expression: + + \$<TARGET_OBJECTS:NotObjLib> + Objects of target "NotObjLib" referenced but is not an OBJECT library. Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake index 1d1c523..4ed2f43 100644 --- a/Tests/RunCMake/RunCMake.cmake +++ b/Tests/RunCMake/RunCMake.cmake @@ -25,7 +25,9 @@ function(run_cmake test) unset(expect_std${o}) endif() endforeach() - set(RunCMake_TEST_SOURCE_DIR "${top_src}") + if (NOT RunCMake_TEST_SOURCE_DIR) + set(RunCMake_TEST_SOURCE_DIR "${top_src}") + endif() if(NOT RunCMake_TEST_BINARY_DIR) set(RunCMake_TEST_BINARY_DIR "${top_bin}/${test}-build") endif() @@ -36,6 +38,9 @@ function(run_cmake test) if(NOT DEFINED RunCMake_TEST_OPTIONS) set(RunCMake_TEST_OPTIONS "") endif() + if (NOT RunCMake_TEST_FILE) + set(RunCMake_TEST_FILE "${test}") + endif() if(APPLE) list(APPEND RunCMake_TEST_OPTIONS -DCMAKE_POLICY_DEFAULT_CMP0025=NEW) endif() @@ -52,7 +57,8 @@ function(run_cmake test) COMMAND ${CMAKE_COMMAND} "${RunCMake_TEST_SOURCE_DIR}" -G "${RunCMake_GENERATOR}" -T "${RunCMake_GENERATOR_TOOLSET}" - -DRunCMake_TEST=${test} + -DRunCMake_TEST=${RunCMake_TEST_FILE} + --no-warn-unused-cli ${RunCMake_TEST_OPTIONS} WORKING_DIRECTORY "${RunCMake_TEST_BINARY_DIR}" OUTPUT_VARIABLE actual_stdout diff --git a/Tests/RunCMake/Syntax/AtWithVariable-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariable-stderr.txt new file mode 100644 index 0000000..5dcd4d7 --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariable-stderr.txt @@ -0,0 +1 @@ +-->wrong<-- diff --git a/Tests/RunCMake/Syntax/AtWithVariable.cmake b/Tests/RunCMake/Syntax/AtWithVariable.cmake new file mode 100644 index 0000000..2bbf61d --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariable.cmake @@ -0,0 +1,9 @@ +set(right "wrong") +set(var "\${right}") +# Expanded here. +set(ref "@var@") + +# 'right' is dereferenced because 'var' was dereferenced when +# assigning to 'ref' above. +string(CONFIGURE "${ref}" output) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/AtWithVariableAtOnly-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableAtOnly-stderr.txt new file mode 100644 index 0000000..cbd1be4 --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableAtOnly-stderr.txt @@ -0,0 +1 @@ +-->\${right}<-- diff --git a/Tests/RunCMake/Syntax/AtWithVariableAtOnly.cmake b/Tests/RunCMake/Syntax/AtWithVariableAtOnly.cmake new file mode 100644 index 0000000..e06484c --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableAtOnly.cmake @@ -0,0 +1,8 @@ +set(right "wrong") +set(var "\${right}") +# Expanded here. +set(ref "@var@") + +# No dereference done at all. +string(CONFIGURE "${ref}" output @ONLY) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile-stderr.txt new file mode 100644 index 0000000..90bffb6 --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile-stderr.txt @@ -0,0 +1,5 @@ +-->==>\${right}<== +==><== +==>\${var}<== +==>\${empty}<== +<-- diff --git a/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile.cmake b/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile.cmake new file mode 100644 index 0000000..bdd7bcd --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile.cmake @@ -0,0 +1,9 @@ +set(right "wrong") +set(var "\${right}") + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/atfile.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/atfile.txt" + @ONLY) +file(READ "${CMAKE_CURRENT_BINARY_DIR}/atfile.txt" output) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion-stderr.txt new file mode 100644 index 0000000..cbd1be4 --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion-stderr.txt @@ -0,0 +1 @@ +-->\${right}<-- diff --git a/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion.cmake b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion.cmake new file mode 100644 index 0000000..840c7f0 --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion.cmake @@ -0,0 +1,8 @@ +# Literal since 'var' is not defined. +set(ref "@var@") +set(right "wrong") +set(var "\${right}") + +# 'var' is dereferenced here. +string(CONFIGURE "${ref}" output) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly-stderr.txt new file mode 100644 index 0000000..cbd1be4 --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly-stderr.txt @@ -0,0 +1 @@ +-->\${right}<-- diff --git a/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly.cmake b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly.cmake new file mode 100644 index 0000000..b657506 --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly.cmake @@ -0,0 +1,8 @@ +# Literal since 'var' is not defined. +set(ref "@var@") +set(right "wrong") +set(var "\${right}") + +# 'var' is dereferenced, but now 'right' +string(CONFIGURE "${ref}" output @ONLY) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/AtWithVariableFile-stderr.txt b/Tests/RunCMake/Syntax/AtWithVariableFile-stderr.txt new file mode 100644 index 0000000..43f029f --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableFile-stderr.txt @@ -0,0 +1,5 @@ +-->==>\${right}<== +==><== +==>\${right}<== +==><== +<-- diff --git a/Tests/RunCMake/Syntax/AtWithVariableFile.cmake b/Tests/RunCMake/Syntax/AtWithVariableFile.cmake new file mode 100644 index 0000000..c709099 --- /dev/null +++ b/Tests/RunCMake/Syntax/AtWithVariableFile.cmake @@ -0,0 +1,8 @@ +set(right "wrong") +set(var "\${right}") + +configure_file( + "${CMAKE_CURRENT_SOURCE_DIR}/atfile.txt.in" + "${CMAKE_CURRENT_BINARY_DIR}/atfile.txt") +file(READ "${CMAKE_CURRENT_BINARY_DIR}/atfile.txt" output) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt new file mode 100644 index 0000000..e3e5332 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-At-NEW-stderr.txt @@ -0,0 +1 @@ +^-->\${right}<--$ diff --git a/Tests/RunCMake/Syntax/CMP0053-At-NEW.cmake b/Tests/RunCMake/Syntax/CMP0053-At-NEW.cmake new file mode 100644 index 0000000..40dbe46 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-At-NEW.cmake @@ -0,0 +1,9 @@ +cmake_policy(SET CMP0053 NEW) + +set(right "wrong") +set(var "\${right}") +# Not expanded here with the new policy. +set(ref "@var@") + +string(CONFIGURE "${ref}" output) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt new file mode 100644 index 0000000..acfa30a --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-At-OLD-stderr.txt @@ -0,0 +1 @@ +^-->wrong<--$ diff --git a/Tests/RunCMake/Syntax/CMP0053-At-OLD.cmake b/Tests/RunCMake/Syntax/CMP0053-At-OLD.cmake new file mode 100644 index 0000000..666f107 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-At-OLD.cmake @@ -0,0 +1,9 @@ +cmake_policy(SET CMP0053 OLD) + +set(right "wrong") +set(var "\${right}") +# Expanded here with the old policy. +set(ref "@var@") + +string(CONFIGURE "${ref}" output) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines-stderr.txt new file mode 100644 index 0000000..ec37021 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines-stderr.txt @@ -0,0 +1,27 @@ +^CMake Warning \(dev\) at CMP0053-At-WARN-newlines.cmake:4 \(set\): + Policy CMP0053 is not set: Simplify variable reference and escape sequence + evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + For input: + + ' + @var@ + ' + + the old evaluation rules produce: + + ' + \${right} + ' + + but the new evaluation rules produce: + + ' + @var@ + ' + + Using the old result for compatibility since the policy is not set. +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/Syntax/CMP0053-At-WARN-newlines.cmake b/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines.cmake new file mode 100644 index 0000000..c493505 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN-newlines.cmake @@ -0,0 +1,6 @@ +set(right "wrong") +set(var "\${right}") +# Expanded here with the old policy. +set(ref " +@var@ +") diff --git a/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt new file mode 100644 index 0000000..697b7b3 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN-stderr.txt @@ -0,0 +1,21 @@ +^CMake Warning \(dev\) at CMP0053-At-WARN.cmake:4 \(set\): + Policy CMP0053 is not set: Simplify variable reference and escape sequence + evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + For input: + + '@var@' + + the old evaluation rules produce: + + '\${right}' + + but the new evaluation rules produce: + + '@var@' + + Using the old result for compatibility since the policy is not set. +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/Syntax/CMP0053-At-WARN.cmake b/Tests/RunCMake/Syntax/CMP0053-At-WARN.cmake new file mode 100644 index 0000000..19c7f53 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-At-WARN.cmake @@ -0,0 +1,4 @@ +set(right "wrong") +set(var "\${right}") +# Expanded here with the old policy. +set(ref "@var@") diff --git a/Tests/RunCMake/Syntax/CMP0053-NUL-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NUL-stderr.txt new file mode 100644 index 0000000..09c7e7c --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NUL-stderr.txt @@ -0,0 +1,56 @@ +^CMake Warning \(dev\) at CMP0053-NUL.cmake:1 \(set\): + Policy CMP0053 is not set: Simplify variable reference and escape sequence + evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + For input: + + '\\0' + + the old evaluation rules produce: + + '' + + but the new evaluation rules produce an error: + + Syntax error in cmake code at + .*/Tests/RunCMake/Syntax/CMP0053-NUL.cmake:1 + when parsing string + \\0 + Invalid character escape '\\0'. + + Using the old result for compatibility since the policy is not set. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Warning \(dev\) at CMP0053-NUL.cmake:2 \(set\): + Policy CMP0053 is not set: Simplify variable reference and escape sequence + evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + For input: + + '\\0' + + the old evaluation rules produce: + + '' + + but the new evaluation rules produce an error: + + Syntax error in cmake code at + .*/Tests/RunCMake/Syntax/CMP0053-NUL.cmake:2 + when parsing string + \\0 + Invalid character escape '\\0'. + + Using the old result for compatibility since the policy is not set. +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/Syntax/CMP0053-NUL.cmake b/Tests/RunCMake/Syntax/CMP0053-NUL.cmake new file mode 100644 index 0000000..9ae0906 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NUL.cmake @@ -0,0 +1,6 @@ +set(qnul "\0") +set(nul \0) +message(-->${nul}<--) +message(-->${qnul}<--) +message("-->${nul}<--") +message("-->${qnul}<--") diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-stderr.txt new file mode 100644 index 0000000..9575778 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at CMP0053-NameWithCarriageReturn.cmake:2 \(message\): + message called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake new file mode 100644 index 0000000..b8a403d --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturn.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message(${var\rwith\rcarriagereturn}) diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake new file mode 100644 index 0000000..bb0d93f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithCarriageReturnQuoted.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message("${var\rwith\rcarriagereturn}") diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-stderr.txt new file mode 100644 index 0000000..df67d37 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at CMP0053-NameWithEscapedSpaces.cmake:2 \(message\): + message called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake new file mode 100644 index 0000000..805b2ca --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpaces.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message(${var\ with\ escaped\ space}) diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake new file mode 100644 index 0000000..58d8e8f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedSpacesQuoted.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message("${var\ with\ escaped\ space}") diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-stderr.txt new file mode 100644 index 0000000..059044f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at CMP0053-NameWithEscapedTabs.cmake:2 \(message\): + message called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake new file mode 100644 index 0000000..214ab5d --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabs.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message(${var\ with\ escaped\ tab}) diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake new file mode 100644 index 0000000..aa5123f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithEscapedTabsQuoted.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message("${var\ with\ escaped\ tab}") diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-stderr.txt new file mode 100644 index 0000000..41f86e6 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline-stderr.txt @@ -0,0 +1,4 @@ +^CMake Error at CMP0053-NameWithNewline.cmake:2 \(message\): + message called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake new file mode 100644 index 0000000..45b532e --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithNewline.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message(${var\nwith\nnewline}) diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake new file mode 100644 index 0000000..6fe568d --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithNewlineQuoted.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message("${var\nwith\nnewline}") diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-stderr.txt new file mode 100644 index 0000000..95e8684 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at CMP0053-NameWithSpaces.cmake:2 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake:2 + + when parsing string + + \${var + + There is an unterminated variable reference. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake new file mode 100644 index 0000000..dae7d25 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpaces.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message(${var with space}) diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-stderr.txt new file mode 100644 index 0000000..c4f3cfe --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at CMP0053-NameWithSpacesQuoted.cmake:2 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake:2 + + when parsing string + + \${var with space} + + Invalid character \(' '\) in a variable name: 'var' +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake new file mode 100644 index 0000000..e252cff --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithSpacesQuoted.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message("${var with space}") diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-stderr.txt new file mode 100644 index 0000000..b1678b3 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at CMP0053-NameWithTabs.cmake:2 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake:2 + + when parsing string + + \${var + + There is an unterminated variable reference. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake new file mode 100644 index 0000000..45e3045 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabs.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message(${var with tab}) diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-stderr.txt new file mode 100644 index 0000000..78adb5e --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at CMP0053-NameWithTabsQuoted.cmake:2 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake:2 + + when parsing string + + \${var with tab} + + Invalid character \(' '\) in a variable name: 'var' +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake new file mode 100644 index 0000000..498675f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-NameWithTabsQuoted.cmake @@ -0,0 +1,2 @@ +cmake_policy(SET CMP0053 NEW) +message("${var with tab}") diff --git a/Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt new file mode 100644 index 0000000..7020c7e --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-ParenInENV-stderr.txt @@ -0,0 +1 @@ +-->value<-- diff --git a/Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake b/Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake new file mode 100644 index 0000000..b5cdf0f --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-ParenInENV.cmake @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0053 NEW) +set("ENV{e(x)}" value) +message(-->$ENV{e\(x\)}<--) diff --git a/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt new file mode 100644 index 0000000..7020c7e --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV-stderr.txt @@ -0,0 +1 @@ +-->value<-- diff --git a/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake b/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake new file mode 100644 index 0000000..5559d4b --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-ParenInQuotedENV.cmake @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0053 NEW) +set("ENV{e(x)}" value) +message("-->$ENV{e\(x\)}<--") diff --git a/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt b/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt new file mode 100644 index 0000000..c706939 --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-WARN-stderr.txt @@ -0,0 +1,28 @@ +^CMake Warning \(dev\) at CMP0053-WARN.cmake:2 \(message\): + Policy CMP0053 is not set: Simplify variable reference and escape sequence + evaluation. Run "cmake --help-policy CMP0053" for policy details. Use the + cmake_policy command to set the policy and suppress this warning. + + For input: + + '\\' + + the old evaluation rules produce: + + '\\' + + but the new evaluation rules produce an error: + + Syntax error in cmake code at + .*/Tests/RunCMake/Syntax/CMP0053-WARN.cmake:2 + when parsing string + \\ + Invalid character escape '\\' \(at end of input\). + + Using the old result for compatibility since the policy is not set. +Call Stack \(most recent call first\): + CMP0053-WARN.cmake:5 \(escape\) + CMakeLists.txt:3 \(include\) +This warning is for project developers. Use -Wno-dev to suppress it. + +\\$ diff --git a/Tests/RunCMake/Syntax/CMP0053-WARN.cmake b/Tests/RunCMake/Syntax/CMP0053-WARN.cmake new file mode 100644 index 0000000..6e8b07b --- /dev/null +++ b/Tests/RunCMake/Syntax/CMP0053-WARN.cmake @@ -0,0 +1,5 @@ +macro (escape str) + message("${str}") +endmacro () + +escape("\\") diff --git a/Tests/RunCMake/Syntax/CMakeLists.txt b/Tests/RunCMake/Syntax/CMakeLists.txt index 618473a..4b3de84 100644 --- a/Tests/RunCMake/Syntax/CMakeLists.txt +++ b/Tests/RunCMake/Syntax/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.9) +cmake_minimum_required(VERSION 2.8.12) project(${RunCMake_TEST} NONE) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/Syntax/Escape2-result.txt b/Tests/RunCMake/Syntax/Escape2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/Escape2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/Escape2-stderr.txt b/Tests/RunCMake/Syntax/Escape2-stderr.txt new file mode 100644 index 0000000..cc3bdf0 --- /dev/null +++ b/Tests/RunCMake/Syntax/Escape2-stderr.txt @@ -0,0 +1,13 @@ +CMake Error at Escape2.cmake:4 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/Escape2.cmake:4 + + when parsing string + + \\ + + Invalid character escape '\\' \(at end of input\). +Call Stack \(most recent call first\): + Escape2.cmake:7 \(escape\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/Escape2.cmake b/Tests/RunCMake/Syntax/Escape2.cmake new file mode 100644 index 0000000..078a822 --- /dev/null +++ b/Tests/RunCMake/Syntax/Escape2.cmake @@ -0,0 +1,7 @@ +cmake_policy(SET CMP0053 NEW) + +macro (escape str) + message("${str}") +endmacro () + +escape("\\") diff --git a/Tests/RunCMake/Syntax/EscapeChar-char-result.txt b/Tests/RunCMake/Syntax/EscapeChar-char-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapeChar-char-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in b/Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in new file mode 100644 index 0000000..d1d908c --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapeChar-char-stderr.txt.in @@ -0,0 +1,12 @@ +CMake Error at EscapeChar-@char@-@testnum@.cmake:3 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/EscapeChar-@char@-@testnum@.cmake:3 + + when parsing string + + -->\\@char@<-- + + Invalid character escape '\\@char@'. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/EscapeChar-char.cmake.in b/Tests/RunCMake/Syntax/EscapeChar-char.cmake.in new file mode 100644 index 0000000..6f265e5 --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapeChar-char.cmake.in @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0053 NEW) + +message("-->\@char@<--") diff --git a/Tests/RunCMake/Syntax/EscapeCharsAllowed-stderr.txt b/Tests/RunCMake/Syntax/EscapeCharsAllowed-stderr.txt new file mode 100644 index 0000000..e658de7 --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapeCharsAllowed-stderr.txt @@ -0,0 +1,12 @@ +^-->semicolon<-- +-->dollar<-- +-->brace<-- +-->bracket<-- +-->newline<-- +-->octothorpe<-- +-->splat<-- +-->caret<-- +-->paren<-- +-->dquote<-- +-->top-levelsemicolon<-- +-->top-level;escaped;semicolon<--$ diff --git a/Tests/RunCMake/Syntax/EscapeCharsAllowed.cmake b/Tests/RunCMake/Syntax/EscapeCharsAllowed.cmake new file mode 100644 index 0000000..e9c568d --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapeCharsAllowed.cmake @@ -0,0 +1,26 @@ +cmake_policy(SET CMP0053 NEW) + +set("semicolon;in;name" semicolon) +set("dollar$in$name" dollar) +set("brace{in}name" brace) +set("bracket[in]name" bracket) +set("newline\nin\nname" newline) +set("octothorpe\#in\#name" octothorpe) +set("splat\@in\@name" splat) +set("caret\^in\^name" caret) +set("paren\(in\)name" paren) +set("dquote\"in\"name" dquote) + +message("-->${semicolon\;in\;name}<--") +message("-->${dollar\$in\$name}<--") +message("-->${brace\{in\}name}<--") +message("-->${bracket\[in\]name}<--") +message("-->${newline\nin\nname}<--") +message("-->${octothorpe\#in\#name}<--") +message("-->${splat\@in\@name}<--") +message("-->${caret\^in\^name}<--") +message("-->${paren\(in\)name}<--") +message("-->${dquote\"in\"name}<--") + +message(-->top-level;semicolon<--) +message(-->top-level\;escaped\;semicolon<--) diff --git a/Tests/RunCMake/Syntax/EscapeCharsDisallowed.cmake b/Tests/RunCMake/Syntax/EscapeCharsDisallowed.cmake new file mode 100644 index 0000000..eef01a0 --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapeCharsDisallowed.cmake @@ -0,0 +1,42 @@ +set(disallowed_chars + a b c d e f g h i j l m o p q s u v w x y z + A B C D E F G H I J L M N O P Q R S T U V W X Y Z + 0 1 2 3 4 5 6 6 7 8 9) +set(testnum 0) + +configure_file( + "${RunCMake_SOURCE_DIR}/CMakeLists.txt" + "${RunCMake_BINARY_DIR}/CMakeLists.txt" + COPYONLY) + +foreach (char IN LISTS disallowed_chars) + configure_file( + "${RunCMake_SOURCE_DIR}/EscapeChar-char.cmake.in" + "${RunCMake_BINARY_DIR}/EscapeChar-${char}-${testnum}.cmake" + @ONLY) + configure_file( + "${RunCMake_SOURCE_DIR}/EscapeChar-char-stderr.txt.in" + "${RunCMake_BINARY_DIR}/EscapeChar-${char}-${testnum}-stderr.txt" + @ONLY) + configure_file( + "${RunCMake_SOURCE_DIR}/EscapeChar-char-result.txt" + "${RunCMake_BINARY_DIR}/EscapeChar-${char}-${testnum}-result.txt" + COPYONLY) + + math(EXPR testnum "${testnum} + 1") +endforeach () + +function (run_tests) + set(GENERATED_RUNCMAKE_TESTS TRUE) + # Find the tests in the binary directory. + set(RunCMake_SOURCE_DIR "${RunCMake_BINARY_DIR}") + + set(testnum 0) + foreach (char IN LISTS disallowed_chars) + run_cmake("EscapeChar-${char}-${testnum}") + + math(EXPR testnum "${testnum} + 1") + endforeach () +endfunction () + +run_tests() diff --git a/Tests/RunCMake/Syntax/EscapeQuotes-stderr.txt b/Tests/RunCMake/Syntax/EscapeQuotes-stderr.txt new file mode 100644 index 0000000..077272d --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapeQuotes-stderr.txt @@ -0,0 +1 @@ +-->"<-- diff --git a/Tests/RunCMake/Syntax/EscapeQuotes.cmake b/Tests/RunCMake/Syntax/EscapeQuotes.cmake new file mode 100644 index 0000000..46d2b6f --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapeQuotes.cmake @@ -0,0 +1,9 @@ +set(var "\"") +set(ref "@var@") +set(rref "\${var}") + +string(CONFIGURE "${ref}" output ESCAPE_QUOTES) +message("-->${output}<--") + +string(CONFIGURE "${rref}" output ESCAPE_QUOTES) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/EscapedAt-stderr.txt b/Tests/RunCMake/Syntax/EscapedAt-stderr.txt new file mode 100644 index 0000000..a51c0d3 --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapedAt-stderr.txt @@ -0,0 +1 @@ +-->\\n<-- diff --git a/Tests/RunCMake/Syntax/EscapedAt.cmake b/Tests/RunCMake/Syntax/EscapedAt.cmake new file mode 100644 index 0000000..1ced620 --- /dev/null +++ b/Tests/RunCMake/Syntax/EscapedAt.cmake @@ -0,0 +1,5 @@ +set(var "n") +set(ref "\\@var@") + +string(CONFIGURE "${ref}" output) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/ExpandInAt-stderr.txt b/Tests/RunCMake/Syntax/ExpandInAt-stderr.txt new file mode 100644 index 0000000..5da8b60 --- /dev/null +++ b/Tests/RunCMake/Syntax/ExpandInAt-stderr.txt @@ -0,0 +1 @@ +-->@foo@<-- diff --git a/Tests/RunCMake/Syntax/ExpandInAt.cmake b/Tests/RunCMake/Syntax/ExpandInAt.cmake new file mode 100644 index 0000000..98f0277 --- /dev/null +++ b/Tests/RunCMake/Syntax/ExpandInAt.cmake @@ -0,0 +1,6 @@ +set("\${varname}" bar) +set(var foo) +set(ref "@\${var}@") + +string(CONFIGURE "${ref}" output) +message("-->${output}<--") diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithCarriageReturn-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt new file mode 100644 index 0000000..7448b59 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithCarriageReturn-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithCarriageReturn.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake:1 + + when parsing string + + \${var\\rwith\\rcarriagereturn} + + syntax error, unexpected cal_SYMBOL, expecting } \(7\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake b/Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake new file mode 100644 index 0000000..614f554 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithCarriageReturn.cmake @@ -0,0 +1 @@ +message(${var\rwith\rcarriagereturn}) diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt new file mode 100644 index 0000000..f5e03ed --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithCarriageReturnQuoted.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake:1 + + when parsing string + + \${var\\rwith\\rcarriagereturn} + + syntax error, unexpected cal_SYMBOL, expecting } \(7\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake new file mode 100644 index 0000000..bac69e4 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithCarriageReturnQuoted.cmake @@ -0,0 +1 @@ +message("${var\rwith\rcarriagereturn}") diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt new file mode 100644 index 0000000..fa16a8a --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedSpaces-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithEscapedSpaces.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake:1 + + when parsing string + + \${var\\ with\\ escaped\\ space} + + syntax error, unexpected cal_SYMBOL, expecting } \(7\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake b/Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake new file mode 100644 index 0000000..6cb8401 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedSpaces.cmake @@ -0,0 +1 @@ +message(${var\ with\ escaped\ space}) diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt new file mode 100644 index 0000000..07cbf24 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithEscapedSpacesQuoted.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake:1 + + when parsing string + + \${var\\ with\\ escaped\\ space} + + syntax error, unexpected cal_SYMBOL, expecting } \(7\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake new file mode 100644 index 0000000..2bd4bfd --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedSpacesQuoted.cmake @@ -0,0 +1 @@ +message("${var\ with\ escaped\ space}") diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt b/Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedTabs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabs-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedTabs-stderr.txt new file mode 100644 index 0000000..d7fc38a --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedTabs-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithEscapedTabs.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake:1 + + when parsing string + + \${var\\ with\\ escaped\\ tab} + + Invalid escape sequence \\.? +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake b/Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake new file mode 100644 index 0000000..c6faa7a --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedTabs.cmake @@ -0,0 +1 @@ +message(${var\ with\ escaped\ tab}) diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-stderr.txt new file mode 100644 index 0000000..915dbaa --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithEscapedTabsQuoted.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake:1 + + when parsing string + + \${var\\ with\\ escaped\\ tab} + + Invalid escape sequence \\.? +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake new file mode 100644 index 0000000..d9be763 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithEscapedTabsQuoted.cmake @@ -0,0 +1 @@ +message("${var\ with\ escaped\ tab}") diff --git a/Tests/RunCMake/Syntax/NameWithNewline-result.txt b/Tests/RunCMake/Syntax/NameWithNewline-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithNewline-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt b/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt new file mode 100644 index 0000000..5cc111b --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithNewline-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithNewline.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithNewline.cmake:1 + + when parsing string + + \${var\\nwith\\nnewline} + + syntax error, unexpected cal_SYMBOL, expecting } \(7\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithNewline.cmake b/Tests/RunCMake/Syntax/NameWithNewline.cmake new file mode 100644 index 0000000..583bcb0 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithNewline.cmake @@ -0,0 +1 @@ +message(${var\nwith\nnewline}) diff --git a/Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt new file mode 100644 index 0000000..0067c2f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithNewlineQuoted-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithNewlineQuoted.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake:1 + + when parsing string + + \${var\\nwith\\nnewline} + + syntax error, unexpected cal_SYMBOL, expecting } \(7\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake b/Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake new file mode 100644 index 0000000..da6d2cf --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithNewlineQuoted.cmake @@ -0,0 +1 @@ +message("${var\nwith\nnewline}") diff --git a/Tests/RunCMake/Syntax/NameWithSpaces-result.txt b/Tests/RunCMake/Syntax/NameWithSpaces-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithSpaces-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt b/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt new file mode 100644 index 0000000..04bc226 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithSpaces-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithSpaces.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithSpaces.cmake:1 + + when parsing string + + \${var + + syntax error, unexpected \$end, expecting } \(5\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithSpaces.cmake b/Tests/RunCMake/Syntax/NameWithSpaces.cmake new file mode 100644 index 0000000..01febe9 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithSpaces.cmake @@ -0,0 +1 @@ +message(${var with space}) diff --git a/Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt new file mode 100644 index 0000000..66cf9a2 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithSpacesQuoted-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithSpacesQuoted.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake:1 + + when parsing string + + \${var with space} + + syntax error, unexpected cal_SYMBOL, expecting } \(17\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake b/Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake new file mode 100644 index 0000000..3fba53f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithSpacesQuoted.cmake @@ -0,0 +1 @@ +message("${var with space}") diff --git a/Tests/RunCMake/Syntax/NameWithTabs-result.txt b/Tests/RunCMake/Syntax/NameWithTabs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithTabs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt b/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt new file mode 100644 index 0000000..e888096 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithTabs-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithTabs.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithTabs.cmake:1 + + when parsing string + + \${var + + syntax error, unexpected \$end, expecting } \(5\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithTabs.cmake b/Tests/RunCMake/Syntax/NameWithTabs.cmake new file mode 100644 index 0000000..c3b1bea --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithTabs.cmake @@ -0,0 +1 @@ +message(${var with tab}) diff --git a/Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt b/Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithTabsQuoted-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt b/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt new file mode 100644 index 0000000..b020074 --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithTabsQuoted-stderr.txt @@ -0,0 +1,12 @@ +^CMake Error at NameWithTabsQuoted.cmake:1 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake:1 + + when parsing string + + \${var with tab} + + syntax error, unexpected cal_SYMBOL, expecting } \(15\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\)$ diff --git a/Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake b/Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake new file mode 100644 index 0000000..8ddb85d --- /dev/null +++ b/Tests/RunCMake/Syntax/NameWithTabsQuoted.cmake @@ -0,0 +1 @@ +message("${var with tab}") diff --git a/Tests/RunCMake/Syntax/ParenInENV-result.txt b/Tests/RunCMake/Syntax/ParenInENV-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInENV-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/ParenInENV-stderr.txt b/Tests/RunCMake/Syntax/ParenInENV-stderr.txt new file mode 100644 index 0000000..7ecfe11 --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInENV-stderr.txt @@ -0,0 +1,20 @@ +CMake Warning \(dev\) at CMakeLists.txt:3 \(include\): + Syntax Warning in cmake code at + + .*/Tests/RunCMake/Syntax/ParenInENV.cmake:2:21 + + Argument not separated from preceding token by whitespace. +This warning is for project developers. Use -Wno-dev to suppress it. + +CMake Error at ParenInENV.cmake:2 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/ParenInENV.cmake:2 + + when parsing string + + -->\$ENV{e + + syntax error, unexpected \$end, expecting } \(9\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/ParenInENV.cmake b/Tests/RunCMake/Syntax/ParenInENV.cmake new file mode 100644 index 0000000..148f726 --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInENV.cmake @@ -0,0 +1,2 @@ +set("ENV{e(x)}" value) +message(-->$ENV{e(x)}<--) diff --git a/Tests/RunCMake/Syntax/ParenInQuotedENV-stderr.txt b/Tests/RunCMake/Syntax/ParenInQuotedENV-stderr.txt new file mode 100644 index 0000000..7020c7e --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInQuotedENV-stderr.txt @@ -0,0 +1 @@ +-->value<-- diff --git a/Tests/RunCMake/Syntax/ParenInQuotedENV.cmake b/Tests/RunCMake/Syntax/ParenInQuotedENV.cmake new file mode 100644 index 0000000..6333717 --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInQuotedENV.cmake @@ -0,0 +1,2 @@ +set("ENV{e(x)}" value) +message("-->$ENV{e(x)}<--") diff --git a/Tests/RunCMake/Syntax/ParenInVarName0-result.txt b/Tests/RunCMake/Syntax/ParenInVarName0-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInVarName0-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/ParenInVarName0-stderr.txt b/Tests/RunCMake/Syntax/ParenInVarName0-stderr.txt new file mode 100644 index 0000000..0a6b60f --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInVarName0-stderr.txt @@ -0,0 +1,12 @@ +CMake Error at ParenInVarName0.cmake:4 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/ParenInVarName0.cmake:4 + + when parsing string + + -->\${e\(x\)}<-- + + Invalid character \('\('\) in a variable name: 'e' +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/ParenInVarName0.cmake b/Tests/RunCMake/Syntax/ParenInVarName0.cmake new file mode 100644 index 0000000..f863d20 --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInVarName0.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0053 NEW) + +set("e(x)" value) +message("-->${e(x)}<--") diff --git a/Tests/RunCMake/Syntax/ParenInVarName1-result.txt b/Tests/RunCMake/Syntax/ParenInVarName1-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInVarName1-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt b/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt new file mode 100644 index 0000000..81b1717 --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInVarName1-stderr.txt @@ -0,0 +1,12 @@ +CMake Error at ParenInVarName1.cmake:4 \(message\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/ParenInVarName1.cmake:4 + + when parsing string + + -->\${e\(x\)}<-- + + syntax error, unexpected cal_SYMBOL, expecting } \(10\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/ParenInVarName1.cmake b/Tests/RunCMake/Syntax/ParenInVarName1.cmake new file mode 100644 index 0000000..9fdc87b --- /dev/null +++ b/Tests/RunCMake/Syntax/ParenInVarName1.cmake @@ -0,0 +1,4 @@ +cmake_policy(SET CMP0053 OLD) + +set("{e(x)}" value) +message("-->${e(x)}<--") diff --git a/Tests/RunCMake/Syntax/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake index 5f05cfc..cecd338 100644 --- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake +++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake @@ -5,6 +5,14 @@ run_cmake(BOM-UTF-16-LE) run_cmake(BOM-UTF-16-BE) run_cmake(BOM-UTF-32-LE) run_cmake(BOM-UTF-32-BE) +run_cmake(CMP0053-At-OLD) +run_cmake(CMP0053-At-NEW) +run_cmake(CMP0053-At-WARN) +run_cmake(CMP0053-At-WARN-newlines) +run_cmake(CMP0053-WARN) +run_cmake(CMP0053-NUL) +run_cmake(CMP0053-ParenInENV) +run_cmake(CMP0053-ParenInQuotedENV) run_cmake(CommandSpaces) run_cmake(CommandTabs) run_cmake(CommandNewlines) @@ -25,6 +33,7 @@ run_cmake(StringNoSpace) run_cmake(OneLetter) run_cmake(Unquoted0) run_cmake(Unquoted1) +run_cmake(Unquoted2) run_cmake(Bracket0) run_cmake(Bracket1) run_cmake(Bracket2) @@ -43,12 +52,59 @@ run_cmake(BracketNoSpace3) run_cmake(BracketNoSpace4) run_cmake(BracketNoSpace5) run_cmake(Escape1) +run_cmake(Escape2) +run_cmake(EscapeCharsAllowed) +include("${RunCMake_SOURCE_DIR}/EscapeCharsDisallowed.cmake") run_cmake(ParenNoSpace0) run_cmake(ParenNoSpace1) run_cmake(ParenNoSpace2) +run_cmake(ParenInVarName0) +run_cmake(ParenInVarName1) run_cmake(UnterminatedCall1) run_cmake(UnterminatedCall2) run_cmake(UnterminatedString) +run_cmake(UnterminatedBrace0) +run_cmake(UnterminatedBrace1) +run_cmake(UnterminatedBrace2) run_cmake(UnterminatedBracket0) run_cmake(UnterminatedBracket1) run_cmake(UnterminatedBracketComment) + +# Variable expansion tests +run_cmake(ExpandInAt) +run_cmake(EscapedAt) +run_cmake(EscapeQuotes) +run_cmake(AtWithVariable) +run_cmake(AtWithVariableEmptyExpansion) +run_cmake(AtWithVariableAtOnly) +run_cmake(AtWithVariableEmptyExpansionAtOnly) +run_cmake(AtWithVariableFile) +run_cmake(AtWithVariableAtOnlyFile) +run_cmake(ParenInENV) +run_cmake(ParenInQuotedENV) + +# Variable name tests +run_cmake(NameWithSpaces) +run_cmake(NameWithTabs) +run_cmake(NameWithNewline) +run_cmake(NameWithCarriageReturn) +run_cmake(NameWithEscapedSpaces) +run_cmake(NameWithEscapedTabs) +run_cmake(NameWithSpacesQuoted) +run_cmake(NameWithTabsQuoted) +run_cmake(NameWithNewlineQuoted) +run_cmake(NameWithCarriageReturnQuoted) +run_cmake(NameWithEscapedSpacesQuoted) +run_cmake(NameWithEscapedTabsQuoted) +run_cmake(CMP0053-NameWithSpaces) +run_cmake(CMP0053-NameWithTabs) +run_cmake(CMP0053-NameWithNewline) +run_cmake(CMP0053-NameWithCarriageReturn) +run_cmake(CMP0053-NameWithEscapedSpaces) +run_cmake(CMP0053-NameWithEscapedTabs) +run_cmake(CMP0053-NameWithSpacesQuoted) +run_cmake(CMP0053-NameWithTabsQuoted) +run_cmake(CMP0053-NameWithNewlineQuoted) +run_cmake(CMP0053-NameWithCarriageReturnQuoted) +run_cmake(CMP0053-NameWithEscapedSpacesQuoted) +run_cmake(CMP0053-NameWithEscapedTabsQuoted) diff --git a/Tests/RunCMake/Syntax/Unquoted2-stderr.txt b/Tests/RunCMake/Syntax/Unquoted2-stderr.txt new file mode 100644 index 0000000..eb8883e --- /dev/null +++ b/Tests/RunCMake/Syntax/Unquoted2-stderr.txt @@ -0,0 +1 @@ +^\[\[UnquotedBracketArgument1\]\]$ diff --git a/Tests/RunCMake/Syntax/Unquoted2.cmake b/Tests/RunCMake/Syntax/Unquoted2.cmake new file mode 100644 index 0000000..d94057d --- /dev/null +++ b/Tests/RunCMake/Syntax/Unquoted2.cmake @@ -0,0 +1,3 @@ +cmake_policy(SET CMP0053 NEW) + +message(\[[Unquoted Bracket Argument 1]]) diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt b/Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/UnterminatedBrace0-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt new file mode 100644 index 0000000..1e0ce49 --- /dev/null +++ b/Tests/RunCMake/Syntax/UnterminatedBrace0-stderr.txt @@ -0,0 +1,12 @@ +CMake Error at UnterminatedBrace0.cmake:2 \(set\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake:2 + + when parsing string + + \${ + + syntax error, unexpected \$end, expecting } \(2\) +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake new file mode 100644 index 0000000..0da1290 --- /dev/null +++ b/Tests/RunCMake/Syntax/UnterminatedBrace0.cmake @@ -0,0 +1,2 @@ +cmake_minimum_required(VERSION 3.0) +set(var "${") diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt new file mode 100644 index 0000000..4e3c2b5 --- /dev/null +++ b/Tests/RunCMake/Syntax/UnterminatedBrace1-stderr.txt @@ -0,0 +1,13 @@ +CMake Warning \(dev\) at UnterminatedBrace1.cmake:3 \(set\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake:3 + + when parsing string + + \${ + + syntax error, unexpected \$end, expecting } \(2\) +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/Syntax/UnterminatedBrace1.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake new file mode 100644 index 0000000..93fba34 --- /dev/null +++ b/Tests/RunCMake/Syntax/UnterminatedBrace1.cmake @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +cmake_policy(SET CMP0010 OLD) +set(var "${") diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2-result.txt b/Tests/RunCMake/Syntax/UnterminatedBrace2-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/Syntax/UnterminatedBrace2-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt new file mode 100644 index 0000000..b332d34 --- /dev/null +++ b/Tests/RunCMake/Syntax/UnterminatedBrace2-stderr.txt @@ -0,0 +1,12 @@ +CMake Error at UnterminatedBrace2.cmake:4 \(set\): + Syntax error in cmake code at + + .*/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake:4 + + when parsing string + + \${ + + There is an unterminated variable reference. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake new file mode 100644 index 0000000..a650e5b --- /dev/null +++ b/Tests/RunCMake/Syntax/UnterminatedBrace2.cmake @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 3.0) +cmake_policy(SET CMP0010 OLD) +cmake_policy(SET CMP0053 NEW) +set(var "${") diff --git a/Tests/RunCMake/Syntax/atfile.txt.in b/Tests/RunCMake/Syntax/atfile.txt.in new file mode 100644 index 0000000..3775919 --- /dev/null +++ b/Tests/RunCMake/Syntax/atfile.txt.in @@ -0,0 +1,4 @@ +==>@var@<== +==>@empty@<== +==>${var}<== +==>${empty}<== diff --git a/Tests/RunCMake/TargetObjects/BadContext-result.txt b/Tests/RunCMake/TargetObjects/BadContext-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/TargetObjects/BadContext-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/TargetObjects/BadContext-stderr.txt b/Tests/RunCMake/TargetObjects/BadContext-stderr.txt new file mode 100644 index 0000000..92f2c91 --- /dev/null +++ b/Tests/RunCMake/TargetObjects/BadContext-stderr.txt @@ -0,0 +1,17 @@ +CMake Error at BadContext.cmake:2 \(file\): + Error evaluating generator expression: + + \$<TARGET_OBJECTS:NoTarget> + + The evaluation of the TARGET_OBJECTS generator expression is only suitable + for consumption by CMake. It is not suitable for writing out elsewhere. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error: + Error evaluating generator expression: + + \$<TARGET_OBJECTS:NoTarget> + + The evaluation of the TARGET_OBJECTS generator expression is only suitable + for consumption by CMake. It is not suitable for writing out elsewhere. diff --git a/Tests/RunCMake/TargetObjects/BadContext.cmake b/Tests/RunCMake/TargetObjects/BadContext.cmake new file mode 100644 index 0000000..67962a4 --- /dev/null +++ b/Tests/RunCMake/TargetObjects/BadContext.cmake @@ -0,0 +1,4 @@ + +file(GENERATE OUTPUT test_output CONTENT $<TARGET_OBJECTS:NoTarget>) + +install(FILES $<TARGET_OBJECTS:NoTarget> DESTINATION objects) diff --git a/Tests/RunCMake/TargetObjects/CMakeLists.txt b/Tests/RunCMake/TargetObjects/CMakeLists.txt new file mode 100644 index 0000000..be9d403 --- /dev/null +++ b/Tests/RunCMake/TargetObjects/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.4) +project(${RunCMake_TEST}) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake b/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake new file mode 100644 index 0000000..85c76e2 --- /dev/null +++ b/Tests/RunCMake/TargetObjects/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(BadContext) diff --git a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt index f30c9a9..f4b744b 100644 --- a/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt +++ b/Tests/RunCMake/TargetPolicies/PolicyList-stderr.txt @@ -16,6 +16,7 @@ \* CMP0041 \* CMP0042 \* CMP0046 + \* CMP0052 Call Stack \(most recent call first\): CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/TargetSources/CMP0026-LOCATION-result.txt b/Tests/RunCMake/TargetSources/CMP0026-LOCATION-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/TargetSources/CMP0026-LOCATION-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/TargetSources/CMP0026-LOCATION-stderr.txt b/Tests/RunCMake/TargetSources/CMP0026-LOCATION-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/TargetSources/CMP0026-LOCATION-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/TargetSources/CMP0026-LOCATION.cmake b/Tests/RunCMake/TargetSources/CMP0026-LOCATION.cmake new file mode 100644 index 0000000..464df36 --- /dev/null +++ b/Tests/RunCMake/TargetSources/CMP0026-LOCATION.cmake @@ -0,0 +1,13 @@ + +cmake_policy(SET CMP0026 OLD) + +add_library(objlib OBJECT + empty_1.cpp +) + +add_executable(my_exe + empty_2.cpp + $<TARGET_OBJECTS:objlib> +) + +get_target_property( loc my_exe LOCATION) diff --git a/Tests/RunCMake/TargetSources/CMakeLists.txt b/Tests/RunCMake/TargetSources/CMakeLists.txt new file mode 100644 index 0000000..f452db1 --- /dev/null +++ b/Tests/RunCMake/TargetSources/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.4) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/TargetSources/ConfigNotAllowed-result.txt b/Tests/RunCMake/TargetSources/ConfigNotAllowed-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/TargetSources/ConfigNotAllowed-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/TargetSources/ConfigNotAllowed-stderr.txt b/Tests/RunCMake/TargetSources/ConfigNotAllowed-stderr.txt new file mode 100644 index 0000000..1de5dd7 --- /dev/null +++ b/Tests/RunCMake/TargetSources/ConfigNotAllowed-stderr.txt @@ -0,0 +1,14 @@ +CMake Error in CMakeLists.txt: + Target "somelib" has source files which vary by configuration. This is not + supported by the "[^"]+" generator. + + Config "Debug": + + .*/Tests/RunCMake/TargetSources/empty_1.cpp + .*/Tests/RunCMake/TargetSources/empty_2.cpp + .*/Tests/RunCMake/TargetSources/CMakeLists.txt + + Config "Release": + + .*/Tests/RunCMake/TargetSources/empty_1.cpp + .*/Tests/RunCMake/TargetSources/CMakeLists.txt diff --git a/Tests/RunCMake/TargetSources/ConfigNotAllowed.cmake b/Tests/RunCMake/TargetSources/ConfigNotAllowed.cmake new file mode 100644 index 0000000..02af379 --- /dev/null +++ b/Tests/RunCMake/TargetSources/ConfigNotAllowed.cmake @@ -0,0 +1,2 @@ + +add_library(somelib empty_1.cpp $<$<CONFIG:Debug>:empty_2.cpp>) diff --git a/Tests/RunCMake/TargetSources/OriginDebug-result.txt b/Tests/RunCMake/TargetSources/OriginDebug-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebug-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt b/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt new file mode 100644 index 0000000..11bc96c --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebug-stderr.txt @@ -0,0 +1,31 @@ +CMake Debug Log at OriginDebug.cmake:13 \(add_library\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_2.cpp + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +.* +CMake Debug Log at OriginDebug.cmake:16 \(set_property\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_3.cpp + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +.* +CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_4.cpp + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) +.* +CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_1.cpp + +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/TargetSources/OriginDebug.cmake b/Tests/RunCMake/TargetSources/OriginDebug.cmake new file mode 100644 index 0000000..5fe9ba7 --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebug.cmake @@ -0,0 +1,20 @@ + +cmake_minimum_required(VERSION 3.0) + +project(OriginDebug) + +set(CMAKE_DEBUG_TARGET_PROPERTIES SOURCES) + +add_library(iface INTERFACE) +set_property(TARGET iface PROPERTY INTERFACE_SOURCES + empty_1.cpp +) + +add_library(OriginDebug empty_2.cpp) +target_link_libraries(OriginDebug iface) + +set_property(TARGET OriginDebug APPEND PROPERTY SOURCES + empty_3.cpp +) + +target_sources(OriginDebug PRIVATE empty_4.cpp) diff --git a/Tests/RunCMake/TargetSources/OriginDebugIDE-result.txt b/Tests/RunCMake/TargetSources/OriginDebugIDE-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebugIDE-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/TargetSources/OriginDebugIDE-stderr.txt b/Tests/RunCMake/TargetSources/OriginDebugIDE-stderr.txt new file mode 100644 index 0000000..fad7073 --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebugIDE-stderr.txt @@ -0,0 +1,40 @@ +CMake Debug Log at OriginDebug.cmake:13 \(add_library\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_2.cpp + +Call Stack \(most recent call first\): + OriginDebugIDE.cmake:4 \(include\) + CMakeLists.txt:3 \(include\) ++ +CMake Debug Log at OriginDebug.cmake:16 \(set_property\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_3.cpp + +Call Stack \(most recent call first\): + OriginDebugIDE.cmake:4 \(include\) + CMakeLists.txt:3 \(include\) ++ +CMake Debug Log at OriginDebug.cmake:20 \(target_sources\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_4.cpp + +Call Stack \(most recent call first\): + OriginDebugIDE.cmake:4 \(include\) + CMakeLists.txt:3 \(include\) ++ +CMake Debug Log: + Used sources for target OriginDebug: + + * .*CMakeLists.txt ++ +CMake Debug Log at OriginDebug.cmake:14 \(target_link_libraries\): + Used sources for target OriginDebug: + + \* .*Tests/RunCMake/TargetSources/empty_1.cpp + +Call Stack \(most recent call first\): + OriginDebugIDE.cmake:4 \(include\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/TargetSources/OriginDebugIDE.cmake b/Tests/RunCMake/TargetSources/OriginDebugIDE.cmake new file mode 100644 index 0000000..a3cc3a8 --- /dev/null +++ b/Tests/RunCMake/TargetSources/OriginDebugIDE.cmake @@ -0,0 +1,4 @@ + +# Separate test for the IDEs, because they show the CMakeLists.txt file +# as a source file. +include(${CMAKE_CURRENT_LIST_DIR}/OriginDebug.cmake) diff --git a/Tests/RunCMake/TargetSources/RunCMakeTest.cmake b/Tests/RunCMake/TargetSources/RunCMakeTest.cmake new file mode 100644 index 0000000..1d2eaec --- /dev/null +++ b/Tests/RunCMake/TargetSources/RunCMakeTest.cmake @@ -0,0 +1,10 @@ +include(RunCMake) + +if(RunCMake_GENERATOR MATCHES "Visual Studio|Xcode" AND NOT XCODE_BELOW_2) + run_cmake(ConfigNotAllowed) + run_cmake(OriginDebugIDE) +else() + run_cmake(OriginDebug) +endif() + +run_cmake(CMP0026-LOCATION) diff --git a/Tests/RunCMake/TargetSources/empty_1.cpp b/Tests/RunCMake/TargetSources/empty_1.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/TargetSources/empty_1.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/TargetSources/empty_2.cpp b/Tests/RunCMake/TargetSources/empty_2.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/TargetSources/empty_2.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/TargetSources/empty_3.cpp b/Tests/RunCMake/TargetSources/empty_3.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/TargetSources/empty_3.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/TargetSources/empty_4.cpp b/Tests/RunCMake/TargetSources/empty_4.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/TargetSources/empty_4.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt new file mode 100644 index 0000000..872338d --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake NO_POLICY_SCOPE) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-stderr.txt new file mode 100644 index 0000000..62c4ff1 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + Unparsed arguments: GarbageArg +Call Stack \(most recent call first\): + ExtraArgs.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs.cmake new file mode 100644 index 0000000..c2a21af --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/ExtraArgs.cmake @@ -0,0 +1,10 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX Pref + GarbageArg + COMPILERS GNU + FEATURES cxx_final +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-stderr.txt new file mode 100644 index 0000000..3c0c076 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + write_compiler_detection_header: FILE parameter missing. +Call Stack \(most recent call first\): + FileTypo.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo.cmake new file mode 100644 index 0000000..c90eda2 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/FileTypo.cmake @@ -0,0 +1,7 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE_TYPO "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX Pref +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-stderr.txt new file mode 100644 index 0000000..b4d7e08 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs-stderr.txt @@ -0,0 +1,11 @@ +CMake Error at InvalidArgs.cmake:4 \(write_compiler_detection_header\): + write_compiler_detection_header Function invoked with incorrect arguments + for function named: write_compiler_detection_header +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) ++ +CMake Error at InvalidArgs.cmake:6 \(write_compiler_detection_header\): + write_compiler_detection_header Function invoked with incorrect arguments + for function named: write_compiler_detection_header +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs.cmake new file mode 100644 index 0000000..cfebae1 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidArgs.cmake @@ -0,0 +1,6 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header() + +write_compiler_detection_header(FILE) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature-stderr.txt new file mode 100644 index 0000000..f34c9e1 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + Unsupported feature cxx_not_a_feature. +Call Stack \(most recent call first\): + InvalidCXXFeature.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature.cmake new file mode 100644 index 0000000..da870fa --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCXXFeature.cmake @@ -0,0 +1,10 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX PREF_ + COMPILERS GNU + FEATURES cxx_not_a_feature + VERSION 3.1 +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler-stderr.txt new file mode 100644 index 0000000..f35f9f9 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + Unsupported compiler NOT_A_COMPILER. +Call Stack \(most recent call first\): + InvalidCompiler.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler.cmake new file mode 100644 index 0000000..ecd0957 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidCompiler.cmake @@ -0,0 +1,10 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX PREF_ + COMPILERS NOT_A_COMPILER + FEATURES cxx_final + VERSION 3.1 +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature-stderr.txt new file mode 100644 index 0000000..0445744 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + Unsupported feature not_a_feature. +Call Stack \(most recent call first\): + InvalidFeature.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature.cmake new file mode 100644 index 0000000..cd83968 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/InvalidFeature.cmake @@ -0,0 +1,10 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX PREF_ + COMPILERS GNU + FEATURES not_a_feature + VERSION 3.1 +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-stderr.txt new file mode 100644 index 0000000..9451348 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + Invalid arguments. write_compiler_detection_header requires at least one + compiler. +Call Stack \(most recent call first\): + NoCompiler.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler.cmake new file mode 100644 index 0000000..2dc14e9 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/NoCompiler.cmake @@ -0,0 +1,10 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX PREF_ + # COMPILERS + FEATURES cxx_final + VERSION 3.1 +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-stderr.txt new file mode 100644 index 0000000..193f297 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + Invalid arguments. write_compiler_detection_header requires at least one + feature. +Call Stack \(most recent call first\): + NoFeature.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature.cmake new file mode 100644 index 0000000..1fbc129 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/NoFeature.cmake @@ -0,0 +1,10 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX PREF_ + COMPILERS GNU + # FEATURES + VERSION 3.1 +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-stderr.txt new file mode 100644 index 0000000..8d4db34 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion-stderr.txt @@ -0,0 +1,9 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + VERSION compatibility for write_compiler_detection_header is set to 3.0, + which is too low. It must be set to at least 3.1.0. Either set the + VERSION parameter to the write_compiler_detection_header function, or + update your minimum required CMake version with the cmake_minimum_required + command. +Call Stack \(most recent call first\): + OldVersion.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion.cmake new file mode 100644 index 0000000..a6e3022 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/OldVersion.cmake @@ -0,0 +1,10 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX Pref + VERSION 3.0 + COMPILERS GNU + FEATURES cxx_final +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-result.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-stderr.txt b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-stderr.txt new file mode 100644 index 0000000..5fdcdb8 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/WriteCompilerDetectionHeader.cmake:[0-9]+ \(message\): + write_compiler_detection_header: PREFIX parameter missing. +Call Stack \(most recent call first\): + PrefixTypo.cmake:4 \(write_compiler_detection_header\) + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo.cmake new file mode 100644 index 0000000..8b6774c --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/PrefixTypo.cmake @@ -0,0 +1,7 @@ + +include(WriteCompilerDetectionHeader) + +write_compiler_detection_header( + FILE "${CMAKE_CURRENT_BINARY_DIR}/somefile" + PREFIX_TYPO Pref +) diff --git a/Tests/RunCMake/WriteCompilerDetectionHeader/RunCMakeTest.cmake b/Tests/RunCMake/WriteCompilerDetectionHeader/RunCMakeTest.cmake new file mode 100644 index 0000000..be79d41 --- /dev/null +++ b/Tests/RunCMake/WriteCompilerDetectionHeader/RunCMakeTest.cmake @@ -0,0 +1,12 @@ +include(RunCMake) + +run_cmake(InvalidArgs) +run_cmake(NoCompiler) +run_cmake(NoFeature) +run_cmake(FileTypo) +run_cmake(PrefixTypo) +run_cmake(ExtraArgs) +run_cmake(OldVersion) +run_cmake(InvalidCompiler) +run_cmake(InvalidFeature) +run_cmake(InvalidCXXFeature) diff --git a/Tests/RunCMake/XcodeProject/CMakeLists.txt b/Tests/RunCMake/XcodeProject/CMakeLists.txt new file mode 100644 index 0000000..12cd3c7 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 2.8.4) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake new file mode 100644 index 0000000..8e4026b --- /dev/null +++ b/Tests/RunCMake/XcodeProject/RunCMakeTest.cmake @@ -0,0 +1,3 @@ +include(RunCMake) + +run_cmake(XcodeFileType) diff --git a/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake b/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake new file mode 100644 index 0000000..7882d7f --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeFileType-check.cmake @@ -0,0 +1,10 @@ +set(expect-default "explicitFileType = sourcecode") +set(expect-explicit "explicitFileType = \"sourcecode.c.h\"") +set(expect-lastKnown "lastKnownFileType = \"sourcecode.c.h\"") +foreach(src default explicit lastKnown) + file(STRINGS ${RunCMake_TEST_BINARY_DIR}/XcodeFileType.xcodeproj/project.pbxproj actual-${src} + REGEX "PBXFileReference.*src-${src}") + if(NOT actual-${src} MATCHES "${expect-${src}}") + message(SEND_ERROR "src-${src} does not match '${expect-${src}}':\n ${actual-${src}}") + endif() +endforeach() diff --git a/Tests/RunCMake/XcodeProject/XcodeFileType.cmake b/Tests/RunCMake/XcodeProject/XcodeFileType.cmake new file mode 100644 index 0000000..7faa781 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/XcodeFileType.cmake @@ -0,0 +1,4 @@ +enable_language(C) +add_executable(main main.c src-default src-explicit src-lastKnown) +set_property(SOURCE src-explicit PROPERTY XCODE_EXPLICIT_FILE_TYPE sourcecode.c.h) +set_property(SOURCE src-lastKnown PROPERTY XCODE_LAST_KNOWN_FILE_TYPE sourcecode.c.h) diff --git a/Tests/RunCMake/XcodeProject/main.c b/Tests/RunCMake/XcodeProject/main.c new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/main.c diff --git a/Tests/RunCMake/XcodeProject/src-default b/Tests/RunCMake/XcodeProject/src-default new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/src-default diff --git a/Tests/RunCMake/XcodeProject/src-explicit b/Tests/RunCMake/XcodeProject/src-explicit new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/src-explicit diff --git a/Tests/RunCMake/XcodeProject/src-lastKnown b/Tests/RunCMake/XcodeProject/src-lastKnown new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/XcodeProject/src-lastKnown diff --git a/Tests/RunCMake/configure_file/CMakeLists.txt b/Tests/RunCMake/configure_file/CMakeLists.txt new file mode 100644 index 0000000..2897109 --- /dev/null +++ b/Tests/RunCMake/configure_file/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/configure_file/NO-BOM.cmake b/Tests/RunCMake/configure_file/NO-BOM.cmake new file mode 100644 index 0000000..003d526 --- /dev/null +++ b/Tests/RunCMake/configure_file/NO-BOM.cmake @@ -0,0 +1,2 @@ + +configure_file(NO-BOM.txt.in ${CMAKE_CURRENT_BINARY_DIR}/NO-BOM.txt) diff --git a/Tests/RunCMake/configure_file/NO-BOM.txt.in b/Tests/RunCMake/configure_file/NO-BOM.txt.in new file mode 100644 index 0000000..557db03 --- /dev/null +++ b/Tests/RunCMake/configure_file/NO-BOM.txt.in @@ -0,0 +1 @@ +Hello World diff --git a/Tests/RunCMake/configure_file/RunCMakeTest.cmake b/Tests/RunCMake/configure_file/RunCMakeTest.cmake new file mode 100644 index 0000000..c8bfa57 --- /dev/null +++ b/Tests/RunCMake/configure_file/RunCMakeTest.cmake @@ -0,0 +1,8 @@ +include(RunCMake) + +run_cmake(NO-BOM) +run_cmake(UTF8-BOM) +run_cmake(UTF16LE-BOM) +run_cmake(UTF16BE-BOM) +run_cmake(UTF32LE-BOM) +run_cmake(UTF32BE-BOM) diff --git a/Tests/RunCMake/configure_file/UTF16BE-BOM-result.txt b/Tests/RunCMake/configure_file/UTF16BE-BOM-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF16BE-BOM-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/configure_file/UTF16BE-BOM-stderr.txt b/Tests/RunCMake/configure_file/UTF16BE-BOM-stderr.txt new file mode 100644 index 0000000..5132c4d --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF16BE-BOM-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at UTF16BE-BOM.cmake:2 \(configure_file\): + File starts with a Byte-Order-Mark that is not UTF-8: + + .*/Tests/RunCMake/configure_file/UTF16BE-BOM.txt.in +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/configure_file/UTF16BE-BOM.cmake b/Tests/RunCMake/configure_file/UTF16BE-BOM.cmake new file mode 100644 index 0000000..c570742 --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF16BE-BOM.cmake @@ -0,0 +1,2 @@ + +configure_file(UTF16BE-BOM.txt.in ${CMAKE_CURRENT_BINARY_DIR}/UTF16BE-BOM.txt) diff --git a/Tests/RunCMake/configure_file/UTF16BE-BOM.txt.in b/Tests/RunCMake/configure_file/UTF16BE-BOM.txt.in Binary files differnew file mode 100644 index 0000000..70fd9cb --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF16BE-BOM.txt.in diff --git a/Tests/RunCMake/configure_file/UTF16LE-BOM-result.txt b/Tests/RunCMake/configure_file/UTF16LE-BOM-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF16LE-BOM-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/configure_file/UTF16LE-BOM-stderr.txt b/Tests/RunCMake/configure_file/UTF16LE-BOM-stderr.txt new file mode 100644 index 0000000..8f997bc --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF16LE-BOM-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at UTF16LE-BOM.cmake:2 \(configure_file\): + File starts with a Byte-Order-Mark that is not UTF-8: + + .*/Tests/RunCMake/configure_file/UTF16LE-BOM.txt.in +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/configure_file/UTF16LE-BOM.cmake b/Tests/RunCMake/configure_file/UTF16LE-BOM.cmake new file mode 100644 index 0000000..05c9cd7 --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF16LE-BOM.cmake @@ -0,0 +1,2 @@ + +configure_file(UTF16LE-BOM.txt.in ${CMAKE_CURRENT_BINARY_DIR}/UTF16LE-BOM.txt) diff --git a/Tests/RunCMake/configure_file/UTF16LE-BOM.txt.in b/Tests/RunCMake/configure_file/UTF16LE-BOM.txt.in Binary files differnew file mode 100644 index 0000000..036f8c5 --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF16LE-BOM.txt.in diff --git a/Tests/RunCMake/configure_file/UTF32BE-BOM-result.txt b/Tests/RunCMake/configure_file/UTF32BE-BOM-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF32BE-BOM-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/configure_file/UTF32BE-BOM-stderr.txt b/Tests/RunCMake/configure_file/UTF32BE-BOM-stderr.txt new file mode 100644 index 0000000..12811aa --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF32BE-BOM-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at UTF32BE-BOM.cmake:2 \(configure_file\): + File starts with a Byte-Order-Mark that is not UTF-8: + + .*/Tests/RunCMake/configure_file/UTF32BE-BOM.txt.in +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/configure_file/UTF32BE-BOM.cmake b/Tests/RunCMake/configure_file/UTF32BE-BOM.cmake new file mode 100644 index 0000000..0c6ea87 --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF32BE-BOM.cmake @@ -0,0 +1,2 @@ + +configure_file(UTF32BE-BOM.txt.in ${CMAKE_CURRENT_BINARY_DIR}/UTF32BE-BOM.txt) diff --git a/Tests/RunCMake/configure_file/UTF32BE-BOM.txt.in b/Tests/RunCMake/configure_file/UTF32BE-BOM.txt.in Binary files differnew file mode 100644 index 0000000..c87cfd5 --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF32BE-BOM.txt.in diff --git a/Tests/RunCMake/configure_file/UTF32LE-BOM-result.txt b/Tests/RunCMake/configure_file/UTF32LE-BOM-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF32LE-BOM-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/configure_file/UTF32LE-BOM-stderr.txt b/Tests/RunCMake/configure_file/UTF32LE-BOM-stderr.txt new file mode 100644 index 0000000..fa9e01a --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF32LE-BOM-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at UTF32LE-BOM.cmake:2 \(configure_file\): + File starts with a Byte-Order-Mark that is not UTF-8: + + .*/Tests/RunCMake/configure_file/UTF32LE-BOM.txt.in +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/configure_file/UTF32LE-BOM.cmake b/Tests/RunCMake/configure_file/UTF32LE-BOM.cmake new file mode 100644 index 0000000..b6351b0 --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF32LE-BOM.cmake @@ -0,0 +1,2 @@ + +configure_file(UTF32LE-BOM.txt.in ${CMAKE_CURRENT_BINARY_DIR}/UTF32LE-BOM.txt) diff --git a/Tests/RunCMake/configure_file/UTF32LE-BOM.txt.in b/Tests/RunCMake/configure_file/UTF32LE-BOM.txt.in Binary files differnew file mode 100644 index 0000000..27c8183 --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF32LE-BOM.txt.in diff --git a/Tests/RunCMake/configure_file/UTF8-BOM.cmake b/Tests/RunCMake/configure_file/UTF8-BOM.cmake new file mode 100644 index 0000000..af2adae --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF8-BOM.cmake @@ -0,0 +1,2 @@ + +configure_file(UTF8-BOM.txt.in ${CMAKE_CURRENT_BINARY_DIR}/UTF8-BOM.txt) diff --git a/Tests/RunCMake/configure_file/UTF8-BOM.txt.in b/Tests/RunCMake/configure_file/UTF8-BOM.txt.in new file mode 100644 index 0000000..abc0aca --- /dev/null +++ b/Tests/RunCMake/configure_file/UTF8-BOM.txt.in @@ -0,0 +1 @@ +Hello World diff --git a/Tests/RunCMake/file/CMakeLists.txt b/Tests/RunCMake/file/CMakeLists.txt new file mode 100644 index 0000000..2897109 --- /dev/null +++ b/Tests/RunCMake/file/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} NONE) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/file/FileOpenFailRead-result.txt b/Tests/RunCMake/file/FileOpenFailRead-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/FileOpenFailRead-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/FileOpenFailRead-stderr.txt b/Tests/RunCMake/file/FileOpenFailRead-stderr.txt new file mode 100644 index 0000000..23d4337 --- /dev/null +++ b/Tests/RunCMake/file/FileOpenFailRead-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at FileOpenFailRead.cmake:[0-9]+ \(file\): + file failed to open for reading \(.*\): + + .*/Tests/RunCMake/file/does_not_exist/file.txt +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/file/FileOpenFailRead.cmake b/Tests/RunCMake/file/FileOpenFailRead.cmake new file mode 100644 index 0000000..4d4c6dc --- /dev/null +++ b/Tests/RunCMake/file/FileOpenFailRead.cmake @@ -0,0 +1 @@ +file(READ "${CMAKE_CURRENT_SOURCE_DIR}/does_not_exist/file.txt" content) diff --git a/Tests/RunCMake/file/INSTALL-DIRECTORY-stdout.txt b/Tests/RunCMake/file/INSTALL-DIRECTORY-stdout.txt new file mode 100644 index 0000000..561a6b1 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-DIRECTORY-stdout.txt @@ -0,0 +1,8 @@ +-- Before Installing +-- Installing: .*/Tests/RunCMake/file/INSTALL-DIRECTORY-build/dir +-- Installing: .*/Tests/RunCMake/file/INSTALL-DIRECTORY-build/dir/empty.txt +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-DIRECTORY-build/dir +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-DIRECTORY-build/dir/empty.txt +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-DIRECTORY-build/dir +-- Up-to-date: .*/Tests/RunCMake/file/INSTALL-DIRECTORY-build/dir/empty.txt +-- After Installing diff --git a/Tests/RunCMake/file/INSTALL-DIRECTORY.cmake b/Tests/RunCMake/file/INSTALL-DIRECTORY.cmake new file mode 100644 index 0000000..0bc1d18 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-DIRECTORY.cmake @@ -0,0 +1,10 @@ +set(src ${CMAKE_CURRENT_SOURCE_DIR}/dir) +set(dst ${CMAKE_CURRENT_BINARY_DIR}/dir) +file(REMOVE RECURSE ${dst}) +message(STATUS "Before Installing") +file(INSTALL FILES ${src}/ DESTINATION ${dst} TYPE DIRECTORY) +file(INSTALL FILES ${src}/ DESTINATION ${dst} TYPE DIRECTORY) +file(INSTALL FILES ${src}/ DESTINATION ${dst} TYPE DIRECTORY MESSAGE_NEVER) +file(INSTALL FILES ${src}/ DESTINATION ${dst} TYPE DIRECTORY MESSAGE_LAZY) +file(INSTALL FILES ${src}/ DESTINATION ${dst} TYPE DIRECTORY MESSAGE_ALWAYS) +message(STATUS "After Installing") diff --git a/Tests/RunCMake/file/INSTALL-MESSAGE-bad-result.txt b/Tests/RunCMake/file/INSTALL-MESSAGE-bad-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-MESSAGE-bad-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt b/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt new file mode 100644 index 0000000..557b817 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-MESSAGE-bad-stderr.txt @@ -0,0 +1,32 @@ +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\) ++ +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\) ++ +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\) ++ +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\) ++ +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\) ++ +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\) diff --git a/Tests/RunCMake/file/INSTALL-MESSAGE-bad.cmake b/Tests/RunCMake/file/INSTALL-MESSAGE-bad.cmake new file mode 100644 index 0000000..f878c69 --- /dev/null +++ b/Tests/RunCMake/file/INSTALL-MESSAGE-bad.cmake @@ -0,0 +1,6 @@ +file(INSTALL DESTINATION dir MESSAGE_ALWAYS MESSAGE_LAZY) +file(INSTALL DESTINATION dir MESSAGE_ALWAYS MESSAGE_NEVER) +file(INSTALL DESTINATION dir MESSAGE_LAZY MESSAGE_NEVER) +file(INSTALL DESTINATION dir PATTERN *.txt MESSAGE_ALWAYS) +file(INSTALL DESTINATION dir PATTERN *.txt MESSAGE_LAZY) +file(INSTALL DESTINATION dir PATTERN *.txt MESSAGE_NEVER) diff --git a/Tests/RunCMake/file/RunCMakeTest.cmake b/Tests/RunCMake/file/RunCMakeTest.cmake new file mode 100644 index 0000000..bf14263 --- /dev/null +++ b/Tests/RunCMake/file/RunCMakeTest.cmake @@ -0,0 +1,5 @@ +include(RunCMake) + +run_cmake(INSTALL-DIRECTORY) +run_cmake(INSTALL-MESSAGE-bad) +run_cmake(FileOpenFailRead) diff --git a/Tests/RunCMake/file/dir/empty.txt b/Tests/RunCMake/file/dir/empty.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/file/dir/empty.txt diff --git a/Tests/RunCMake/find_dependency/CMakeLists.txt b/Tests/RunCMake/find_dependency/CMakeLists.txt new file mode 100644 index 0000000..04d09f2 --- /dev/null +++ b/Tests/RunCMake/find_dependency/CMakeLists.txt @@ -0,0 +1,4 @@ +cmake_minimum_required(VERSION 2.8.4) +project(${RunCMake_TEST} NONE) +set(CMAKE_PREFIX_PATH "${CMAKE_CURRENT_SOURCE_DIR}") +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/find_dependency/EXACT-no-version-result.txt b/Tests/RunCMake/find_dependency/EXACT-no-version-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/EXACT-no-version-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt b/Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt new file mode 100644 index 0000000..348f8bb --- /dev/null +++ b/Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt @@ -0,0 +1,6 @@ +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency. EXACT may only be specified if a + VERSION is specified +Call Stack \(most recent call first\): + EXACT-no-version.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/EXACT-no-version.cmake b/Tests/RunCMake/find_dependency/EXACT-no-version.cmake new file mode 100644 index 0000000..b05665b7 --- /dev/null +++ b/Tests/RunCMake/find_dependency/EXACT-no-version.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 EXACT) diff --git a/Tests/RunCMake/find_dependency/Pack1/Pack1Config.cmake b/Tests/RunCMake/find_dependency/Pack1/Pack1Config.cmake new file mode 100644 index 0000000..7d55ef6 --- /dev/null +++ b/Tests/RunCMake/find_dependency/Pack1/Pack1Config.cmake @@ -0,0 +1,2 @@ + +add_library(Pack1::Lib INTERFACE IMPORTED) diff --git a/Tests/RunCMake/find_dependency/Pack1/Pack1ConfigVersion.cmake b/Tests/RunCMake/find_dependency/Pack1/Pack1ConfigVersion.cmake new file mode 100644 index 0000000..dfb7b6c --- /dev/null +++ b/Tests/RunCMake/find_dependency/Pack1/Pack1ConfigVersion.cmake @@ -0,0 +1,11 @@ + +set(PACKAGE_VERSION "1.3") + +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() diff --git a/Tests/RunCMake/find_dependency/RunCMakeTest.cmake b/Tests/RunCMake/find_dependency/RunCMakeTest.cmake new file mode 100644 index 0000000..9403136 --- /dev/null +++ b/Tests/RunCMake/find_dependency/RunCMakeTest.cmake @@ -0,0 +1,7 @@ +include(RunCMake) + +run_cmake(EXACT-no-version) +run_cmake(empty-version) +run_cmake(empty-arg-3) +run_cmake(invalid-arg-3) +run_cmake(extra-args) diff --git a/Tests/RunCMake/find_dependency/empty-arg-3-result.txt b/Tests/RunCMake/find_dependency/empty-arg-3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt b/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt new file mode 100644 index 0000000..bf9b02b --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency +Call Stack \(most recent call first\): + empty-arg-3.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/empty-arg-3.cmake b/Tests/RunCMake/find_dependency/empty-arg-3.cmake new file mode 100644 index 0000000..b08200a --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-arg-3.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 1.2 "") diff --git a/Tests/RunCMake/find_dependency/empty-version-result.txt b/Tests/RunCMake/find_dependency/empty-version-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/empty-version-stderr.txt b/Tests/RunCMake/find_dependency/empty-version-stderr.txt new file mode 100644 index 0000000..b5e9f46 --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*/Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency. VERSION is empty +Call Stack \(most recent call first\): + empty-version.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/empty-version.cmake b/Tests/RunCMake/find_dependency/empty-version.cmake new file mode 100644 index 0000000..e6f17cd --- /dev/null +++ b/Tests/RunCMake/find_dependency/empty-version.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 "") diff --git a/Tests/RunCMake/find_dependency/extra-args-result.txt b/Tests/RunCMake/find_dependency/extra-args-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/extra-args-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/extra-args-stderr.txt b/Tests/RunCMake/find_dependency/extra-args-stderr.txt new file mode 100644 index 0000000..83a7f02 --- /dev/null +++ b/Tests/RunCMake/find_dependency/extra-args-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency +Call Stack \(most recent call first\): + extra-args.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/extra-args.cmake b/Tests/RunCMake/find_dependency/extra-args.cmake new file mode 100644 index 0000000..209645a --- /dev/null +++ b/Tests/RunCMake/find_dependency/extra-args.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 1.2 EXACT PATHS "${CMAKE_BINARY_DIR}") diff --git a/Tests/RunCMake/find_dependency/invalid-arg-3-result.txt b/Tests/RunCMake/find_dependency/invalid-arg-3-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/find_dependency/invalid-arg-3-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt b/Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt new file mode 100644 index 0000000..fee8d5d --- /dev/null +++ b/Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at .*Modules/CMakeFindDependencyMacro.cmake:[0-9]+ \(message\): + Invalid arguments to find_dependency +Call Stack \(most recent call first\): + invalid-arg-3.cmake:4 \(find_dependency\) + CMakeLists.txt:4 \(include\) diff --git a/Tests/RunCMake/find_dependency/invalid-arg-3.cmake b/Tests/RunCMake/find_dependency/invalid-arg-3.cmake new file mode 100644 index 0000000..40ede07 --- /dev/null +++ b/Tests/RunCMake/find_dependency/invalid-arg-3.cmake @@ -0,0 +1,4 @@ + +include(CMakeFindDependencyMacro) + +find_dependency(Pack1 1.2 EXACTYPO) diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt new file mode 100644 index 0000000..f0adc9f --- /dev/null +++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-NEW-stderr.txt @@ -0,0 +1,6 @@ +CMake Error in CMakeLists.txt: + Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path: + + ".*Tests/RunCMake/include_directories/prefix/BinInInstallPrefix-CMP0052-NEW-build/foo" + + which is prefixed in the build directory. diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-OLD-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt new file mode 100644 index 0000000..054bff5 --- /dev/null +++ b/Tests/RunCMake/include_directories/BinInInstallPrefix-CMP0052-WARN-stderr.txt @@ -0,0 +1,20 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0052 is not set: Reject source and build dirs in installed + INTERFACE_INCLUDE_DIRECTORIES. Run "cmake --help-policy CMP0052" for + policy details. Use the cmake_policy command to set the policy and + suppress this warning. + + Directory: + + ".*Tests/RunCMake/include_directories/prefix/BinInInstallPrefix-CMP0052-WARN-build/foo" + + in INTERFACE_INCLUDE_DIRECTORIES of target "testTarget" is a subdirectory + of the install directory: + + ".*Tests/RunCMake/include_directories/prefix" + + however it is also a subdirectory of the build tree: + + ".*Tests/RunCMake/include_directories/prefix/BinInInstallPrefix-CMP0052-WARN-build" + +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/include_directories/CMakeLists.txt b/Tests/RunCMake/include_directories/CMakeLists.txt index f452db1..3482e6b 100644 --- a/Tests/RunCMake/include_directories/CMakeLists.txt +++ b/Tests/RunCMake/include_directories/CMakeLists.txt @@ -1,3 +1,3 @@ -cmake_minimum_required(VERSION 2.8.4) +cmake_minimum_required(VERSION 3.0) project(${RunCMake_TEST} CXX) include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt b/Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include_directories/DirInInstallPrefix-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include_directories/DirInInstallPrefix-stderr.txt b/Tests/RunCMake/include_directories/DirInInstallPrefix-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/include_directories/DirInInstallPrefix-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake b/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake new file mode 100644 index 0000000..d6f08bd --- /dev/null +++ b/Tests/RunCMake/include_directories/DirInInstallPrefix.cmake @@ -0,0 +1,9 @@ + +add_library(testTarget empty.cpp) +target_include_directories(testTarget INTERFACE "${CMAKE_INSTALL_PREFIX}/dir") + +install(TARGETS testTarget EXPORT testTargets + DESTINATION lib +) + +install(EXPORT testTargets DESTINATION lib/cmake) diff --git a/Tests/RunCMake/include_directories/InstallInBinDir-result.txt b/Tests/RunCMake/include_directories/InstallInBinDir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallInBinDir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt b/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt new file mode 100644 index 0000000..254fae1 --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallInBinDir-stderr.txt @@ -0,0 +1,6 @@ +CMake Error in CMakeLists.txt: + Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path: + + ".*Tests/RunCMake/include_directories/InstallInBinDir-build/foo" + + which is prefixed in the build directory. diff --git a/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt b/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallInSrcDir-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt b/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt new file mode 100644 index 0000000..7be3044 --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallInSrcDir-stderr.txt @@ -0,0 +1,6 @@ +CMake Error in CMakeLists.txt: + Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path: + + ".*Tests/RunCMake/include_directories/copy/foo" + + which is prefixed in the source directory. diff --git a/Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt b/Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallPrefixInInterface-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include_directories/InstallPrefixInInterface-stderr.txt b/Tests/RunCMake/include_directories/InstallPrefixInInterface-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallPrefixInInterface-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake b/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake new file mode 100644 index 0000000..0f08e58 --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallPrefixInInterface.cmake @@ -0,0 +1,11 @@ + +project(InstallPrefixInInterface) + +add_library(testTarget "${CMAKE_CURRENT_SOURCE_DIR}/empty.cpp") +target_include_directories(testTarget INTERFACE "${CMAKE_INSTALL_PREFIX}/foo") + +install(TARGETS testTarget EXPORT testTargets + DESTINATION lib +) + +install(EXPORT testTargets DESTINATION lib/cmake) diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-stderr.txt b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirInSource-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-stderr.txt b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/include_directories/InstallToPrefixInSrcDirOutOfSource-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/include_directories/RunCMakeTest.cmake b/Tests/RunCMake/include_directories/RunCMakeTest.cmake index c00b924..c5b29d0 100644 --- a/Tests/RunCMake/include_directories/RunCMakeTest.cmake +++ b/Tests/RunCMake/include_directories/RunCMakeTest.cmake @@ -12,3 +12,131 @@ run_cmake(CMP0021) run_cmake(install_config) run_cmake(incomplete-genex) run_cmake(export-NOWARN) + +set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/DirInInstallPrefix/prefix") +run_cmake(DirInInstallPrefix) + +configure_file( + "${RunCMake_SOURCE_DIR}/CMakeLists.txt" + "${RunCMake_BINARY_DIR}/copy/CMakeLists.txt" + COPYONLY +) +configure_file( + "${RunCMake_SOURCE_DIR}/empty.cpp" + "${RunCMake_BINARY_DIR}/copy/empty.cpp" + COPYONLY +) +configure_file( + "${RunCMake_SOURCE_DIR}/SourceDirectoryInInterface.cmake" + "${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface.cmake" + COPYONLY +) +set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface/prefix") +set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/copy/SourceDirectoryInInterface") +set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/copy") +run_cmake(InstallInSrcDir) +unset(RunCMake_TEST_SOURCE_DIR) +unset(RunCMake_TEST_FILE) + +set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallInBinDir-build/prefix") +set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/InstallInBinDir-build") +set(RunCMake_TEST_FILE "${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface") +run_cmake(InstallInBinDir) +unset(RunCMake_TEST_BINARY_DIR) +unset(RunCMake_TEST_FILE) + +configure_file( + "${RunCMake_SOURCE_DIR}/CMakeLists.txt" + "${RunCMake_BINARY_DIR}/prefix/src/CMakeLists.txt" + COPYONLY +) +configure_file( + "${RunCMake_SOURCE_DIR}/empty.cpp" + "${RunCMake_BINARY_DIR}/prefix/src/empty.cpp" + COPYONLY +) +configure_file( + "${RunCMake_SOURCE_DIR}/SourceDirectoryInInterface.cmake" + "${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface.cmake" + COPYONLY +) + +foreach(policyStatus "" NEW OLD) + if (NOT "${policyStatus}" STREQUAL "") + set(policyOption -DCMAKE_POLICY_DEFAULT_CMP0052=${policyStatus}) + else() + unset(policyOption) + set(policyStatus WARN) + endif() + set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/prefix" ${policyOption}) + # Set the RunCMake_TEST_SOURCE_DIR here to the copy too. This is needed to run + # the test suite in-source properly. Otherwise the install directory would be + # a subdirectory or the source directory, which is allowed and tested separately + # below. + set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/prefix/src") + set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/prefix/BinInInstallPrefix-CMP0052-${policyStatus}-build") + set(RunCMake_TEST_FILE "${RunCMake_SOURCE_DIR}/BinaryDirectoryInInterface") + run_cmake(BinInInstallPrefix-CMP0052-${policyStatus}) + unset(RunCMake_TEST_BINARY_DIR) + unset(RunCMake_TEST_FILE) + + set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/prefix/src/SourceDirectoryInInterface") + run_cmake(SrcInInstallPrefix-CMP0052-${policyStatus}) + unset(RunCMake_TEST_SOURCE_DIR) + unset(RunCMake_TEST_FILE) +endforeach() + +set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/InstallPrefixInInterface-build/prefix") +run_cmake(InstallPrefixInInterface) + +configure_file( + "${RunCMake_SOURCE_DIR}/CMakeLists.txt" + "${RunCMake_BINARY_DIR}/installToSrc/CMakeLists.txt" + COPYONLY +) +configure_file( + "${RunCMake_SOURCE_DIR}/empty.cpp" + "${RunCMake_BINARY_DIR}/installToSrc/empty.cpp" + COPYONLY +) +configure_file( + "${RunCMake_SOURCE_DIR}/InstallPrefixInInterface.cmake" + "${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface.cmake" + COPYONLY +) +set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface/prefix") +set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/installToSrc/InstallPrefixInInterface") +set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/installToSrc") +run_cmake(InstallToPrefixInSrcDirOutOfSource) +unset(RunCMake_TEST_SOURCE_DIR) +unset(RunCMake_TEST_FILE) + + +file(REMOVE_RECURSE "${RunCMake_TEST_BINARY_DIR}/installToSrcInSrc") +set(RunCMake_TEST_NO_CLEAN ON) + +configure_file( + "${RunCMake_SOURCE_DIR}/CMakeLists.txt" + "${RunCMake_BINARY_DIR}/installToSrcInSrc/CMakeLists.txt" + COPYONLY +) +configure_file( + "${RunCMake_SOURCE_DIR}/empty.cpp" + "${RunCMake_BINARY_DIR}/installToSrcInSrc/empty.cpp" + COPYONLY +) +configure_file( + "${RunCMake_SOURCE_DIR}/InstallPrefixInInterface.cmake" + "${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface.cmake" + COPYONLY +) + +set(RunCMake_TEST_OPTIONS "-DCMAKE_INSTALL_PREFIX=${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface/prefix") +set(RunCMake_TEST_FILE "${RunCMake_BINARY_DIR}/installToSrcInSrc/InstallPrefixInInterface") +set(RunCMake_TEST_SOURCE_DIR "${RunCMake_BINARY_DIR}/installToSrcInSrc") +set(RunCMake_TEST_BINARY_DIR "${RunCMake_BINARY_DIR}/installToSrcInSrc") +run_cmake(InstallToPrefixInSrcDirInSource) +unset(RunCMake_TEST_SOURCE_DIR) +unset(RunCMake_TEST_BINARY_DIR) +unset(RunCMake_TEST_FILE) +unset(RunCMake_TEST_NO_CLEAN) diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt new file mode 100644 index 0000000..afa43e0 --- /dev/null +++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-NEW-stderr.txt @@ -0,0 +1,6 @@ +CMake Error in CMakeLists.txt: + Target "testTarget" INTERFACE_INCLUDE_DIRECTORIES property contains path: + + ".*Tests/RunCMake/include_directories/prefix/src/foo" + + which is prefixed in the source directory. diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-stderr.txt new file mode 100644 index 0000000..10f3293 --- /dev/null +++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-OLD-stderr.txt @@ -0,0 +1 @@ +^$ diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt new file mode 100644 index 0000000..0b13fd8 --- /dev/null +++ b/Tests/RunCMake/include_directories/SrcInInstallPrefix-CMP0052-WARN-stderr.txt @@ -0,0 +1,20 @@ +CMake Warning \(dev\) in CMakeLists.txt: + Policy CMP0052 is not set: Reject source and build dirs in installed + INTERFACE_INCLUDE_DIRECTORIES. Run "cmake --help-policy CMP0052" for + policy details. Use the cmake_policy command to set the policy and + suppress this warning. + + Directory: + + ".*Tests/RunCMake/include_directories/prefix/src/foo" + + in INTERFACE_INCLUDE_DIRECTORIES of target "testTarget" is a subdirectory + of the install directory: + + ".*Tests/RunCMake/include_directories/prefix" + + however it is also a subdirectory of the source tree: + + ".*Tests/RunCMake/include_directories/prefix/src" + +This warning is for project developers. Use -Wno-dev to suppress it. diff --git a/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER-check.cmake b/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER-check.cmake new file mode 100644 index 0000000..2c716e1 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER-check.cmake @@ -0,0 +1,13 @@ +file(REMOVE_RECURSE ${RunCMake_TEST_BINARY_DIR}/prefix) +execute_process(COMMAND ${CMAKE_COMMAND} -P ${RunCMake_TEST_BINARY_DIR}/cmake_install.cmake + OUTPUT_VARIABLE out ERROR_VARIABLE err) +if(out MATCHES "-- Installing: [^\n]*prefix/dir") + string(REGEX REPLACE "\n" "\n " out " ${out}") + set(RunCMake_TEST_FAILED + "${RunCMake_TEST_FAILED}Installation output was not quiet:\n${out}") +endif() +set(f ${RunCMake_TEST_BINARY_DIR}/prefix/dir/empty.txt) +if(NOT EXISTS "${f}") + set(RunCMake_TEST_FAILED + "${RunCMake_TEST_FAILED}File was not installed:\n ${f}\n") +endif() diff --git a/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER.cmake b/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER.cmake new file mode 100644 index 0000000..eefb837 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-MESSAGE_NEVER.cmake @@ -0,0 +1,3 @@ +set(CMAKE_INSTALL_MESSAGE "ALWAYS") +set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/prefix") +install(DIRECTORY dir/ DESTINATION dir MESSAGE_NEVER) diff --git a/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-result.txt b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt new file mode 100644 index 0000000..166ba6f --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER-stderr.txt @@ -0,0 +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\) diff --git a/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER.cmake b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER.cmake new file mode 100644 index 0000000..de844f7 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-PATTERN-MESSAGE_NEVER.cmake @@ -0,0 +1 @@ +install(DIRECTORY src DESTINATION src PATTERN *.txt MESSAGE_NEVER) diff --git a/Tests/RunCMake/install/DIRECTORY-message-check.cmake b/Tests/RunCMake/install/DIRECTORY-message-check.cmake new file mode 100644 index 0000000..857681f --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-message-check.cmake @@ -0,0 +1,28 @@ +file(REMOVE_RECURSE ${RunCMake_TEST_BINARY_DIR}/prefix) +execute_process(COMMAND ${CMAKE_COMMAND} -P ${RunCMake_TEST_BINARY_DIR}/cmake_install.cmake + OUTPUT_VARIABLE out ERROR_VARIABLE err) +set(expect " +-- Installing: [^\n]*/prefix/dir\r? +-- Installing: [^\n]*/prefix/dir/empty.txt\r? +") +if(NOT out MATCHES "${expect}") + string(REGEX REPLACE "\n" "\n " out " ${out}") + set(RunCMake_TEST_FAILED + "${RunCMake_TEST_FAILED}First install did not say 'Installing' as expected:\n${out}") +endif() +set(f ${RunCMake_TEST_BINARY_DIR}/prefix/dir/empty.txt) +if(NOT EXISTS "${f}") + set(RunCMake_TEST_FAILED + "${RunCMake_TEST_FAILED}File was not installed:\n ${f}\n") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} -P ${RunCMake_TEST_BINARY_DIR}/cmake_install.cmake + OUTPUT_VARIABLE out ERROR_VARIABLE err) +set(expect " +-- Up-to-date: [^\n]*/prefix/dir\r? +-- Up-to-date: [^\n]*/prefix/dir/empty.txt\r? +") +if(NOT out MATCHES "${expect}") + string(REGEX REPLACE "\n" "\n " out " ${out}") + set(RunCMake_TEST_FAILED + "${RunCMake_TEST_FAILED}Second install did not say 'Up-to-date' as expected:\n${out}") +endif() diff --git a/Tests/RunCMake/install/DIRECTORY-message-lazy-check.cmake b/Tests/RunCMake/install/DIRECTORY-message-lazy-check.cmake new file mode 100644 index 0000000..c7e6018 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-message-lazy-check.cmake @@ -0,0 +1,24 @@ +file(REMOVE_RECURSE ${RunCMake_TEST_BINARY_DIR}/prefix) +execute_process(COMMAND ${CMAKE_COMMAND} -P ${RunCMake_TEST_BINARY_DIR}/cmake_install.cmake + OUTPUT_VARIABLE out ERROR_VARIABLE err) +set(expect " +-- Installing: [^\n]*/prefix/dir\r? +-- Installing: [^\n]*/prefix/dir/empty.txt\r? +") +if(NOT out MATCHES "${expect}") + string(REGEX REPLACE "\n" "\n " out " ${out}") + set(RunCMake_TEST_FAILED + "${RunCMake_TEST_FAILED}First install did not say 'Installing' as expected:\n${out}") +endif() +set(f ${RunCMake_TEST_BINARY_DIR}/prefix/dir/empty.txt) +if(NOT EXISTS "${f}") + set(RunCMake_TEST_FAILED + "${RunCMake_TEST_FAILED}File was not installed:\n ${f}\n") +endif() +execute_process(COMMAND ${CMAKE_COMMAND} -P ${RunCMake_TEST_BINARY_DIR}/cmake_install.cmake + OUTPUT_VARIABLE out ERROR_VARIABLE err) +if(out MATCHES "(Installing|Up-to-date)") + string(REGEX REPLACE "\n" "\n " out " ${out}") + set(RunCMake_TEST_FAILED + "${RunCMake_TEST_FAILED}Second install was not silent as expected:\n${out}") +endif() diff --git a/Tests/RunCMake/install/DIRECTORY-message-lazy.cmake b/Tests/RunCMake/install/DIRECTORY-message-lazy.cmake new file mode 100644 index 0000000..ed43567 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-message-lazy.cmake @@ -0,0 +1,3 @@ +set(CMAKE_INSTALL_MESSAGE "LAZY") +set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/prefix") +install(DIRECTORY dir/ DESTINATION dir) diff --git a/Tests/RunCMake/install/DIRECTORY-message.cmake b/Tests/RunCMake/install/DIRECTORY-message.cmake new file mode 100644 index 0000000..913ed15 --- /dev/null +++ b/Tests/RunCMake/install/DIRECTORY-message.cmake @@ -0,0 +1,3 @@ +set(CMAKE_INSTALL_MESSAGE "ALWAYS") +set(CMAKE_INSTALL_PREFIX "${CMAKE_BINARY_DIR}/prefix") +install(DIRECTORY dir/ DESTINATION dir) diff --git a/Tests/RunCMake/install/RunCMakeTest.cmake b/Tests/RunCMake/install/RunCMakeTest.cmake index c8dc379..53b91f3 100644 --- a/Tests/RunCMake/install/RunCMakeTest.cmake +++ b/Tests/RunCMake/install/RunCMakeTest.cmake @@ -1,4 +1,8 @@ include(RunCMake) +run_cmake(DIRECTORY-MESSAGE_NEVER) +run_cmake(DIRECTORY-PATTERN-MESSAGE_NEVER) +run_cmake(DIRECTORY-message) +run_cmake(DIRECTORY-message-lazy) run_cmake(SkipInstallRulesWarning) run_cmake(SkipInstallRulesNoWarning1) run_cmake(SkipInstallRulesNoWarning2) diff --git a/Tests/RunCMake/install/dir/empty.txt b/Tests/RunCMake/install/dir/empty.txt new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/Tests/RunCMake/install/dir/empty.txt diff --git a/Tests/RunCMake/set/ParentScope-result.txt b/Tests/RunCMake/set/ParentScope-result.txt new file mode 100644 index 0000000..573541a --- /dev/null +++ b/Tests/RunCMake/set/ParentScope-result.txt @@ -0,0 +1 @@ +0 diff --git a/Tests/RunCMake/set/PARENT_SCOPE.cmake b/Tests/RunCMake/set/ParentScope.cmake index 9bd6bca..9bd6bca 100644 --- a/Tests/RunCMake/set/PARENT_SCOPE.cmake +++ b/Tests/RunCMake/set/ParentScope.cmake diff --git a/Tests/RunCMake/set/RunCMakeTest.cmake b/Tests/RunCMake/set/RunCMakeTest.cmake index 5d036e3..1b51ea2 100644 --- a/Tests/RunCMake/set/RunCMakeTest.cmake +++ b/Tests/RunCMake/set/RunCMakeTest.cmake @@ -1,3 +1,3 @@ include(RunCMake) -run_cmake(PARENT_SCOPE) +run_cmake(ParentScope) diff --git a/Tests/RunCMake/target_compile_features/CMakeLists.txt b/Tests/RunCMake/target_compile_features/CMakeLists.txt new file mode 100644 index 0000000..3482e6b --- /dev/null +++ b/Tests/RunCMake/target_compile_features/CMakeLists.txt @@ -0,0 +1,3 @@ +cmake_minimum_required(VERSION 3.0) +project(${RunCMake_TEST} CXX) +include(${RunCMake_TEST}.cmake) diff --git a/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake b/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake new file mode 100644 index 0000000..33faf2b --- /dev/null +++ b/Tests/RunCMake/target_compile_features/RunCMakeTest.cmake @@ -0,0 +1,13 @@ +include(RunCMake) + +run_cmake(not_enough_args) +run_cmake(alias_target) +run_cmake(utility_target) +run_cmake(invalid_args) +run_cmake(invalid_args_on_interface) +run_cmake(imported_target) +run_cmake(no_target) +run_cmake(not_a_cxx_feature) +run_cmake(no_matching_cxx_feature) +run_cmake(not_a_c_feature) +run_cmake(no_matching_c_feature) diff --git a/Tests/RunCMake/target_compile_features/alias_target-result.txt b/Tests/RunCMake/target_compile_features/alias_target-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/alias_target-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/target_compile_features/alias_target-stderr.txt b/Tests/RunCMake/target_compile_features/alias_target-stderr.txt new file mode 100644 index 0000000..417bf62 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/alias_target-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at alias_target.cmake:4 \(target_compile_features\): + target_compile_features can not be used on an ALIAS target. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/alias_target.cmake b/Tests/RunCMake/target_compile_features/alias_target.cmake new file mode 100644 index 0000000..d35ddba --- /dev/null +++ b/Tests/RunCMake/target_compile_features/alias_target.cmake @@ -0,0 +1,4 @@ + +add_executable(main empty.cpp) +add_executable(Alias::Main ALIAS main) +target_compile_features(Alias::Main PRIVATE cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/empty.c b/Tests/RunCMake/target_compile_features/empty.c new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/target_compile_features/empty.c @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/target_compile_features/empty.cpp b/Tests/RunCMake/target_compile_features/empty.cpp new file mode 100644 index 0000000..bfbbdde --- /dev/null +++ b/Tests/RunCMake/target_compile_features/empty.cpp @@ -0,0 +1,7 @@ +#ifdef _WIN32 +__declspec(dllexport) +#endif +int empty() +{ + return 0; +} diff --git a/Tests/RunCMake/target_compile_features/imported_target-result.txt b/Tests/RunCMake/target_compile_features/imported_target-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/imported_target-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/target_compile_features/imported_target-stderr.txt b/Tests/RunCMake/target_compile_features/imported_target-stderr.txt new file mode 100644 index 0000000..c6ff5ec --- /dev/null +++ b/Tests/RunCMake/target_compile_features/imported_target-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at imported_target.cmake:3 \(target_compile_features\): + Cannot specify compile features for imported target "main". +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/imported_target.cmake b/Tests/RunCMake/target_compile_features/imported_target.cmake new file mode 100644 index 0000000..e248c2f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/imported_target.cmake @@ -0,0 +1,3 @@ + +add_library(main INTERFACE IMPORTED) +target_compile_features(main INTERFACE cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/invalid_args-result.txt b/Tests/RunCMake/target_compile_features/invalid_args-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/invalid_args-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt b/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt new file mode 100644 index 0000000..bd5b7b9 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/invalid_args-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at invalid_args.cmake:3 \(target_compile_features\): + target_compile_features called with invalid arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/invalid_args.cmake b/Tests/RunCMake/target_compile_features/invalid_args.cmake new file mode 100644 index 0000000..1a7fb37 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/invalid_args.cmake @@ -0,0 +1,3 @@ + +add_executable(main empty.cpp) +target_compile_features(main INVALID cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/invalid_args_on_interface-result.txt b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-result.txt @@ -0,0 +1 @@ +1 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 new file mode 100644 index 0000000..c30209a --- /dev/null +++ b/Tests/RunCMake/target_compile_features/invalid_args_on_interface-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at invalid_args_on_interface.cmake:3 \(target_compile_features\): + target_compile_features may only be set INTERFACE properties on INTERFACE + targets +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/invalid_args_on_interface.cmake b/Tests/RunCMake/target_compile_features/invalid_args_on_interface.cmake new file mode 100644 index 0000000..324d0f3 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/invalid_args_on_interface.cmake @@ -0,0 +1,3 @@ + +add_library(main INTERFACE) +target_compile_features(main PRIVATE cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/no_matching_c_feature-result.txt b/Tests/RunCMake/target_compile_features/no_matching_c_feature-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_matching_c_feature-result.txt @@ -0,0 +1 @@ +1 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 new file mode 100644 index 0000000..96b959c --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_matching_c_feature-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at no_matching_c_feature.cmake:[0-9][0-9]? \((target_compile_features|message)\): + The compiler feature "gnu_c_dummy" is not known to C compiler + + "GNU" + + version 4.8.1. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/no_matching_c_feature.cmake b/Tests/RunCMake/target_compile_features/no_matching_c_feature.cmake new file mode 100644 index 0000000..a44caf2 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_matching_c_feature.cmake @@ -0,0 +1,15 @@ + +if (NOT ";${CMAKE_C_COMPILE_FEATURES};" MATCHES ";gnu_c_typeof;") + # Simulate passing the test. + message(SEND_ERROR + "The compiler feature \"gnu_c_dummy\" is not known to C compiler\n\"GNU\"\nversion 4.8.1." + ) + return() +endif() + +add_executable(main empty.c) + +target_compile_features(main + PRIVATE + gnu_c_typeof +) diff --git a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-result.txt b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-result.txt @@ -0,0 +1 @@ +1 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 new file mode 100644 index 0000000..f976dfe --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature-stderr.txt @@ -0,0 +1,8 @@ +CMake Error at no_matching_cxx_feature.cmake:[0-9][0-9]? \((target_compile_features|message)\): + The compiler feature "[^"]+" is not known to CXX compiler + + "[^"]*" + + version *[.0-9]+\. +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/no_matching_cxx_feature.cmake b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature.cmake new file mode 100644 index 0000000..ab1fd76 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_matching_cxx_feature.cmake @@ -0,0 +1,26 @@ + +if (NOT ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";gnu_cxx_typeof;" + AND NOT ";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";msvc_cxx_sealed;" ) + # Simulate passing the test. + message(SEND_ERROR + "The compiler feature \"gnu_cxx_dummy\" is not known to CXX compiler\n\"GNU\"\nversion 4.8.1." + ) + return() +endif() + +if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";gnu_cxx_typeof;") + set(feature msvc_cxx_sealed) + if (";${CMAKE_CXX_COMPILE_FEATURES};" MATCHES ";msvc_cxx_sealed;") + # If a compiler supports both extensions, remove one of them. + list(REMOVE_ITEM CMAKE_CXX_COMPILE_FEATURES msvc_cxx_sealed) + endif() +else() + set(feature gnu_cxx_typeof) +endif() + +add_executable(main empty.cpp) + +target_compile_features(main + PRIVATE + ${feature} +) diff --git a/Tests/RunCMake/target_compile_features/no_target-result.txt b/Tests/RunCMake/target_compile_features/no_target-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_target-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/target_compile_features/no_target-stderr.txt b/Tests/RunCMake/target_compile_features/no_target-stderr.txt new file mode 100644 index 0000000..323ba7a --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_target-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at no_target.cmake:2 \(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\) diff --git a/Tests/RunCMake/target_compile_features/no_target.cmake b/Tests/RunCMake/target_compile_features/no_target.cmake new file mode 100644 index 0000000..3f0afe2 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/no_target.cmake @@ -0,0 +1,2 @@ + +target_compile_features(main INTERFACE cxx_delegating_constructors) diff --git a/Tests/RunCMake/target_compile_features/not_a_c_feature-result.txt b/Tests/RunCMake/target_compile_features/not_a_c_feature-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_a_c_feature-result.txt @@ -0,0 +1 @@ +1 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 new file mode 100644 index 0000000..6dd00f3 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_a_c_feature-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at not_a_c_feature.cmake:3 \(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\) diff --git a/Tests/RunCMake/target_compile_features/not_a_c_feature.cmake b/Tests/RunCMake/target_compile_features/not_a_c_feature.cmake new file mode 100644 index 0000000..0420698 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_a_c_feature.cmake @@ -0,0 +1,6 @@ + +add_executable(main empty.c) +target_compile_features(main + PRIVATE + c_not_a_feature +) diff --git a/Tests/RunCMake/target_compile_features/not_a_cxx_feature-result.txt b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-result.txt @@ -0,0 +1 @@ +1 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 new file mode 100644 index 0000000..efa2bad --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_a_cxx_feature-stderr.txt @@ -0,0 +1,5 @@ +CMake Error at not_a_cxx_feature.cmake:3 \(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\) diff --git a/Tests/RunCMake/target_compile_features/not_a_cxx_feature.cmake b/Tests/RunCMake/target_compile_features/not_a_cxx_feature.cmake new file mode 100644 index 0000000..0207b72 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_a_cxx_feature.cmake @@ -0,0 +1,6 @@ + +add_executable(main empty.cpp) +target_compile_features(main + PRIVATE + cxx_not_a_feature +) diff --git a/Tests/RunCMake/target_compile_features/not_enough_args-result.txt b/Tests/RunCMake/target_compile_features/not_enough_args-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_enough_args-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt b/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt new file mode 100644 index 0000000..2f8d812 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_enough_args-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at not_enough_args.cmake:3 \(target_compile_features\): + target_compile_features called with incorrect number of arguments +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/not_enough_args.cmake b/Tests/RunCMake/target_compile_features/not_enough_args.cmake new file mode 100644 index 0000000..9561230 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/not_enough_args.cmake @@ -0,0 +1,3 @@ + +add_executable(main empty.cpp) +target_compile_features(main) diff --git a/Tests/RunCMake/target_compile_features/utility_target-result.txt b/Tests/RunCMake/target_compile_features/utility_target-result.txt new file mode 100644 index 0000000..d00491f --- /dev/null +++ b/Tests/RunCMake/target_compile_features/utility_target-result.txt @@ -0,0 +1 @@ +1 diff --git a/Tests/RunCMake/target_compile_features/utility_target-stderr.txt b/Tests/RunCMake/target_compile_features/utility_target-stderr.txt new file mode 100644 index 0000000..d239059 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/utility_target-stderr.txt @@ -0,0 +1,4 @@ +CMake Error at utility_target.cmake:4 \(target_compile_features\): + target_compile_features called with non-compilable target type +Call Stack \(most recent call first\): + CMakeLists.txt:3 \(include\) diff --git a/Tests/RunCMake/target_compile_features/utility_target.cmake b/Tests/RunCMake/target_compile_features/utility_target.cmake new file mode 100644 index 0000000..8919056 --- /dev/null +++ b/Tests/RunCMake/target_compile_features/utility_target.cmake @@ -0,0 +1,4 @@ + +add_custom_target(utility) + +target_compile_features(utility PRIVATE cxx_delegating_constructors) diff --git a/Tests/SourcesProperty/CMakeLists.txt b/Tests/SourcesProperty/CMakeLists.txt new file mode 100644 index 0000000..6c99e00 --- /dev/null +++ b/Tests/SourcesProperty/CMakeLists.txt @@ -0,0 +1,12 @@ + +cmake_minimum_required(VERSION 3.0) + +project(SourcesProperty) + +add_library(iface INTERFACE) +set_property(TARGET iface PROPERTY INTERFACE_SOURCES iface.cpp) + +add_executable(SourcesProperty main.cpp) +target_link_libraries(SourcesProperty iface) + +set_property(TARGET SourcesProperty APPEND PROPERTY SOURCES prop.cpp) diff --git a/Tests/SourcesProperty/iface.cpp b/Tests/SourcesProperty/iface.cpp new file mode 100644 index 0000000..e38ac37 --- /dev/null +++ b/Tests/SourcesProperty/iface.cpp @@ -0,0 +1,5 @@ + +int iface() +{ + return 0; +} diff --git a/Tests/SourcesProperty/iface.h b/Tests/SourcesProperty/iface.h new file mode 100644 index 0000000..6da80a4 --- /dev/null +++ b/Tests/SourcesProperty/iface.h @@ -0,0 +1,4 @@ + +int iface(); + +int prop(); diff --git a/Tests/SourcesProperty/main.cpp b/Tests/SourcesProperty/main.cpp new file mode 100644 index 0000000..33a97f4 --- /dev/null +++ b/Tests/SourcesProperty/main.cpp @@ -0,0 +1,7 @@ + +#include "iface.h" + +int main(int argc, char** argv) +{ + return iface() + prop(); +} diff --git a/Tests/SourcesProperty/prop.cpp b/Tests/SourcesProperty/prop.cpp new file mode 100644 index 0000000..e343431 --- /dev/null +++ b/Tests/SourcesProperty/prop.cpp @@ -0,0 +1,5 @@ + +int prop() +{ + return 0; +} diff --git a/Tests/StringFileTest/CMakeLists.txt b/Tests/StringFileTest/CMakeLists.txt index 00383ab..4fa5a86 100644 --- a/Tests/StringFileTest/CMakeLists.txt +++ b/Tests/StringFileTest/CMakeLists.txt @@ -127,12 +127,6 @@ string(LENGTH ${substringres} lengthres) file(RELATIVE_PATH relpath "/usr/local/bin" "/usr/X11R6/bin/xnest") -# Escaping test -set(var "\\ \" \ \t \n \r \# \( \) \0") -message("Output: [${var}]") -set(var \\ \" \ \t \n \r \# \( \) \0) -message("Output: [${var}]") - # Make-style unquoted argument test set(var $(VAR1)$(VAR2)/$(VAR3)) message("Output: [${var}]") @@ -141,13 +135,6 @@ if(NOT result) message(SEND_ERROR "Unquoted $(VAR) syntax is broken.") endif() -# Obscure environment variable name -set("ENV{x+(y)}" "Obscure environment variable value") -message("Output: [$ENV{x+(y)}]") -if(NOT "$ENV{x+(y)}" STREQUAL "Obscure environment variable value") - message(SEND_ERROR "Environment variable \"ENV{x+(y)}\" does not work.") -endif() - # Make directories test file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/Includes" @@ -286,3 +273,9 @@ string(MAKE_C_IDENTIFIER "1one-two$" MCI_1) if(NOT MCI_1 STREQUAL _1one_two_) message(SEND_ERROR "MAKE_C_IDENTIFIER did not create expected result.") endif() + +string(GENEX_STRIP "one;$<1:two;three>;four;$<TARGET_OBJECTS:some_target>" strip_result) + +if (NOT strip_result STREQUAL "one;four") + message(SEND_ERROR "GENEX_STRIP did not create expected result: ${strip_result}") +endif() diff --git a/Tests/SubDirSpaces/CMakeLists.txt b/Tests/SubDirSpaces/CMakeLists.txt index 69f1d68..40c265e 100644 --- a/Tests/SubDirSpaces/CMakeLists.txt +++ b/Tests/SubDirSpaces/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 2.6) project(SUBDIR) # Some systems do not seem to support rpath with spaces. -if("${CMAKE_SYSTEM}" MATCHES "IRIX|QNX") +if(CMAKE_SYSTEM_NAME MATCHES "IRIX|QNX") set(CMAKE_SKIP_BUILD_RPATH 1) endif() diff --git a/Tests/SubProject/CMakeLists.txt b/Tests/SubProject/CMakeLists.txt index b669621..b2bada9 100644 --- a/Tests/SubProject/CMakeLists.txt +++ b/Tests/SubProject/CMakeLists.txt @@ -1,6 +1,15 @@ cmake_minimum_required (VERSION 2.6) project(SubProject) -message("${CMAKE_IMPORT_LIBRARY_SUFFIX}") +file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/gen.cxx) # require generation +add_custom_command( + OUTPUT gen.cxx + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/gen.cxx.in + COMMAND ${CMAKE_COMMAND} -E copy + ${CMAKE_CURRENT_SOURCE_DIR}/gen.cxx.in gen.cxx + ) +add_custom_target(gen DEPENDS gen.cxx) add_library(bar bar.cxx) +target_include_directories(bar PRIVATE ${CMAKE_CURRENT_BINARY_DIR}) +add_dependencies(bar gen) add_executable(car car.cxx) add_subdirectory(foo) diff --git a/Tests/SubProject/bar.cxx b/Tests/SubProject/bar.cxx index c3f6a18..c8b8743 100644 --- a/Tests/SubProject/bar.cxx +++ b/Tests/SubProject/bar.cxx @@ -1,4 +1 @@ -int bar() -{ - return 10; -} +#include "gen.cxx" diff --git a/Tests/SubProject/gen.cxx.in b/Tests/SubProject/gen.cxx.in new file mode 100644 index 0000000..c3f6a18 --- /dev/null +++ b/Tests/SubProject/gen.cxx.in @@ -0,0 +1,4 @@ +int bar() +{ + return 10; +} diff --git a/Tests/SystemInformation/CMakeLists.txt b/Tests/SystemInformation/CMakeLists.txt index c33380f..db54612 100644 --- a/Tests/SystemInformation/CMakeLists.txt +++ b/Tests/SystemInformation/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required (VERSION 2.6) +cmake_minimum_required (VERSION 3.0) project(SystemInformation) include_directories("This does not exists") diff --git a/Tests/SystemInformation/SystemInformation.in b/Tests/SystemInformation/SystemInformation.in index df3bf49..f7e81e6 100644 --- a/Tests/SystemInformation/SystemInformation.in +++ b/Tests/SystemInformation/SystemInformation.in @@ -19,8 +19,26 @@ CMAKE_COMPILER_IS_GNUCC == "${CMAKE_COMPILER_IS_GNUCC}" CMAKE_COMPILER_IS_GNUCXX == "${CMAKE_COMPILER_IS_GNUCXX}" CMAKE_C_COMPILER_ID == "${CMAKE_C_COMPILER_ID}" CMAKE_C_COMPILER_VERSION == "${CMAKE_C_COMPILER_VERSION}" +CMAKE_C90_STANDARD_COMPILE_OPTION == "${CMAKE_C90_STANDARD_COMPILE_OPTION}" +CMAKE_C99_STANDARD_COMPILE_OPTION == "${CMAKE_C99_STANDARD_COMPILE_OPTION}" +CMAKE_C11_STANDARD_COMPILE_OPTION == "${CMAKE_C11_STANDARD_COMPILE_OPTION}" +CMAKE_C90_EXTENSION_COMPILE_OPTION == "${CMAKE_C90_EXTENSION_COMPILE_OPTION}" +CMAKE_C99_EXTENSION_COMPILE_OPTION == "${CMAKE_C99_EXTENSION_COMPILE_OPTION}" +CMAKE_C11_EXTENSION_COMPILE_OPTION == "${CMAKE_C11_EXTENSION_COMPILE_OPTION}" +CMAKE_C_COMPILE_FEATURES == "${CMAKE_C_COMPILE_FEATURES}" +CMAKE_C90_COMPILE_FEATURES == "${CMAKE_C90_COMPILE_FEATURES}" +CMAKE_C99_COMPILE_FEATURES == "${CMAKE_C99_COMPILE_FEATURES}" +CMAKE_C11_COMPILE_FEATURES == "${CMAKE_C11_COMPILE_FEATURES}" CMAKE_CXX_COMPILER_ID == "${CMAKE_CXX_COMPILER_ID}" CMAKE_CXX_COMPILER_VERSION == "${CMAKE_CXX_COMPILER_VERSION}" +CMAKE_CXX98_STANDARD_COMPILE_OPTION == "${CMAKE_CXX98_STANDARD_COMPILE_OPTION}" +CMAKE_CXX11_STANDARD_COMPILE_OPTION == "${CMAKE_CXX11_STANDARD_COMPILE_OPTION}" +CMAKE_CXX98_EXTENSION_COMPILE_OPTION == "${CMAKE_CXX98_EXTENSION_COMPILE_OPTION}" +CMAKE_CXX11_EXTENSION_COMPILE_OPTION == "${CMAKE_CXX11_EXTENSION_COMPILE_OPTION}" +CMAKE_CXX_COMPILE_FEATURES == "${CMAKE_CXX_COMPILE_FEATURES}" +CMAKE_CXX98_COMPILE_FEATURES == "${CMAKE_CXX98_COMPILE_FEATURES}" +CMAKE_CXX11_COMPILE_FEATURES == "${CMAKE_CXX11_COMPILE_FEATURES}" +CMAKE_CXX14_COMPILE_FEATURES == "${CMAKE_CXX14_COMPILE_FEATURES}" // C shared library flag CMAKE_SHARED_LIBRARY_C_FLAGS == "${CMAKE_SHARED_LIBRARY_C_FLAGS}" |