summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-03-17 13:31:21 (GMT)
committerBrad King <brad.king@kitware.com>2014-03-17 13:31:21 (GMT)
commit6e466c6f2ee5160202aaa76a9d643d34bd7d908a (patch)
tree1117fe63347f333a4e20d1698cb791c6c3506e6a /Tests
parentc903b5319bfcf383964c625bb84d7bc958aba2e9 (diff)
parent6313be44aa465ea883e3578b3a0424ae0c217d5c (diff)
downloadCMake-6e466c6f2ee5160202aaa76a9d643d34bd7d908a.zip
CMake-6e466c6f2ee5160202aaa76a9d643d34bd7d908a.tar.gz
CMake-6e466c6f2ee5160202aaa76a9d643d34bd7d908a.tar.bz2
Merge branch 'master' into CONFIG-LOCATION-CMP0026
Diffstat (limited to 'Tests')
-rw-r--r--Tests/BuildDepends/CMakeLists.txt30
-rw-r--r--Tests/BuildDepends/Project/CMakeLists.txt12
-rw-r--r--Tests/BuildDepends/Project/External/CMakeLists.txt14
-rw-r--r--Tests/CMakeBuildTest.cmake.in4
-rw-r--r--Tests/CMakeLib/run_compile_commands.cxx8
-rw-r--r--Tests/CMakeLists.txt197
-rw-r--r--Tests/CMakeOnly/Test.cmake.in4
-rw-r--r--Tests/CPackWiXGenerator/CMakeLists.txt14
-rw-r--r--Tests/CPackWiXGenerator/RunCPackVerifyResult.cmake5
-rw-r--r--Tests/CTestBuildCommandProjectInSubdir/CTestBuildCommandProjectInSubdir.cmake.in2
-rw-r--r--Tests/CTestConfig/dashboard.cmake.in4
-rw-r--r--Tests/CTestConfig/script.cmake.in4
-rw-r--r--Tests/CTestTestBadExe/test.cmake.in4
-rw-r--r--Tests/CTestTestChecksum/test.cmake.in4
-rw-r--r--Tests/CTestTestConfigFileInBuildDir/test1.cmake.in4
-rw-r--r--Tests/CTestTestConfigFileInBuildDir/test2.cmake.in4
-rw-r--r--Tests/CTestTestCostSerial/test.cmake.in4
-rw-r--r--Tests/CTestTestCrash/test.cmake.in4
-rw-r--r--Tests/CTestTestCycle/test.cmake.in4
-rw-r--r--Tests/CTestTestDepends/test.cmake.in4
-rw-r--r--Tests/CTestTestFailure/testNoBuild.cmake.in4
-rw-r--r--Tests/CTestTestFailure/testNoExe.cmake.in4
-rw-r--r--Tests/CTestTestFdSetSize/test.cmake.in4
-rw-r--r--Tests/CTestTestMemcheck/test.cmake.in4
-rw-r--r--Tests/CTestTestParallel/test.cmake.in4
-rw-r--r--Tests/CTestTestResourceLock/test.cmake.in4
-rw-r--r--Tests/CTestTestScheduler/test.cmake.in4
-rw-r--r--Tests/CTestTestSkipReturnCode/test.cmake.in4
-rw-r--r--Tests/CTestTestStopTime/test.cmake.in4
-rw-r--r--Tests/CTestTestSubdir/test.cmake.in4
-rw-r--r--Tests/CTestTestTimeout/test.cmake.in4
-rw-r--r--Tests/CTestTestUpload/test.cmake.in4
-rw-r--r--Tests/CTestTestZeroTimeout/test.cmake.in4
-rw-r--r--Tests/ExportImport/CMakeLists.txt4
-rw-r--r--Tests/ExportImport/InitialCache.cmake.in2
-rw-r--r--Tests/ExternalProjectUpdate/ExternalProjectUpdateTest.cmake2
-rw-r--r--Tests/FindPackageTest/FindLotsOfComponents.cmake2
-rw-r--r--Tests/FindPackageTest/FindSomePackage.cmake2
-rw-r--r--Tests/FindPackageTest/FindUpperCasePackage.cmake2
-rw-r--r--Tests/Fortran/CMakeLists.txt6
-rw-r--r--Tests/FortranC/Flags.cmake.in4
-rw-r--r--Tests/MacRuntimePath/CMakeLists.txt4
-rw-r--r--Tests/MacRuntimePath/InitialCache.cmake.in2
-rw-r--r--Tests/Module/FindDependency/CMakeLists.txt11
-rw-r--r--Tests/Module/FindDependency/main.cpp29
-rw-r--r--Tests/Module/FindDependency/packages/Pack1/Pack1Config.cmake9
-rw-r--r--Tests/Module/FindDependency/packages/Pack1/Pack1ConfigVersion.cmake11
-rw-r--r--Tests/Module/FindDependency/packages/Pack2/Pack2Config.cmake5
-rw-r--r--Tests/Module/FindDependency/packages/Pack2/Pack2ConfigVersion.cmake11
-rw-r--r--Tests/Module/FindDependency/packages/Pack3/Pack3Config.cmake5
-rw-r--r--Tests/Module/FindDependency/packages/Pack3/Pack3ConfigVersion.cmake11
-rw-r--r--Tests/Module/FindDependency/packages/Pack4/Pack4Config.cmake9
-rw-r--r--Tests/Module/FindDependency/packages/Pack4/Pack4ConfigVersion.cmake11
-rw-r--r--Tests/Module/FindDependency/packages/Pack5/Pack5Config.cmake3
-rw-r--r--Tests/Module/FindDependency/packages/Pack5/Pack5ConfigVersion.cmake11
-rw-r--r--Tests/Module/FindDependency/packages/Pack6/Pack6Config.cmake3
-rw-r--r--Tests/Module/FindDependency/packages/Pack6/Pack6ConfigVersion.cmake11
-rw-r--r--Tests/PDBDirectoryAndName/CMakeLists.txt30
-rw-r--r--Tests/RunCMake/CMakeLists.txt10
-rw-r--r--Tests/RunCMake/CompatibleInterface/DebugProperties-stderr.txt14
-rw-r--r--Tests/RunCMake/FeatureSummary/CMakeLists.txt3
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatAll-stdout.txt7
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatAll.cmake9
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatList-stdout.txt7
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatList.cmake9
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll-result.txt1
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll-stderr.txt6
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListAll.cmake9
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown-result.txt1
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown-stderr.txt6
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatListUnknown.cmake9
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingle-stdout.txt1
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingle.cmake9
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown-result.txt1
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown-stderr.txt6
-rw-r--r--Tests/RunCMake/FeatureSummary/FeatureSummaryWhatSingleUnknown.cmake9
-rw-r--r--Tests/RunCMake/FeatureSummary/RunCMakeTest.cmake8
-rw-r--r--Tests/RunCMake/RunCMake.cmake1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariable-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariable.cmake9
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableAtOnly-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableAtOnly.cmake8
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile-stderr.txt5
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableAtOnlyFile.cmake9
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableEmptyExpansion.cmake8
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableEmptyExpansionAtOnly.cmake8
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableFile-stderr.txt5
-rw-r--r--Tests/RunCMake/Syntax/AtWithVariableFile.cmake8
-rw-r--r--Tests/RunCMake/Syntax/EscapeQuotes-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/EscapeQuotes.cmake9
-rw-r--r--Tests/RunCMake/Syntax/EscapedAt-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/EscapedAt.cmake5
-rw-r--r--Tests/RunCMake/Syntax/ExpandInAt-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/ExpandInAt.cmake6
-rw-r--r--Tests/RunCMake/Syntax/ParenInENV-result.txt1
-rw-r--r--Tests/RunCMake/Syntax/ParenInENV-stderr.txt20
-rw-r--r--Tests/RunCMake/Syntax/ParenInENV.cmake2
-rw-r--r--Tests/RunCMake/Syntax/ParenInQuotedENV-stderr.txt1
-rw-r--r--Tests/RunCMake/Syntax/ParenInQuotedENV.cmake2
-rw-r--r--Tests/RunCMake/Syntax/RunCMakeTest.cmake13
-rw-r--r--Tests/RunCMake/Syntax/atfile.txt.in4
-rw-r--r--Tests/RunCMake/find_dependency/CMakeLists.txt4
-rw-r--r--Tests/RunCMake/find_dependency/EXACT-no-version-result.txt1
-rw-r--r--Tests/RunCMake/find_dependency/EXACT-no-version-stderr.txt6
-rw-r--r--Tests/RunCMake/find_dependency/EXACT-no-version.cmake4
-rw-r--r--Tests/RunCMake/find_dependency/Pack1/Pack1Config.cmake2
-rw-r--r--Tests/RunCMake/find_dependency/Pack1/Pack1ConfigVersion.cmake11
-rw-r--r--Tests/RunCMake/find_dependency/RunCMakeTest.cmake7
-rw-r--r--Tests/RunCMake/find_dependency/empty-arg-3-result.txt1
-rw-r--r--Tests/RunCMake/find_dependency/empty-arg-3-stderr.txt5
-rw-r--r--Tests/RunCMake/find_dependency/empty-arg-3.cmake4
-rw-r--r--Tests/RunCMake/find_dependency/empty-version-result.txt1
-rw-r--r--Tests/RunCMake/find_dependency/empty-version-stderr.txt5
-rw-r--r--Tests/RunCMake/find_dependency/empty-version.cmake4
-rw-r--r--Tests/RunCMake/find_dependency/extra-args-result.txt1
-rw-r--r--Tests/RunCMake/find_dependency/extra-args-stderr.txt5
-rw-r--r--Tests/RunCMake/find_dependency/extra-args.cmake4
-rw-r--r--Tests/RunCMake/find_dependency/invalid-arg-3-result.txt1
-rw-r--r--Tests/RunCMake/find_dependency/invalid-arg-3-stderr.txt5
-rw-r--r--Tests/RunCMake/find_dependency/invalid-arg-3.cmake4
122 files changed, 726 insertions, 187 deletions
diff --git a/Tests/BuildDepends/CMakeLists.txt b/Tests/BuildDepends/CMakeLists.txt
index 9727930..a875f07 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,6 +168,19 @@ 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)
@@ -191,6 +206,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 +311,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/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/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/CMakeLists.txt b/Tests/CMakeLists.txt
index 8074a01..726e790 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)
@@ -199,8 +204,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 +254,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 +267,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)
@@ -276,7 +283,7 @@ if(BUILD_TESTING)
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 +322,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 +388,7 @@ 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)
if (APPLE OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
include(CheckCXXCompilerFlag)
@@ -465,7 +473,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 +485,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 +500,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 +514,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 +525,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 +544,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 +575,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)
@@ -821,6 +829,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 +838,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()
@@ -995,7 +1005,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 +1020,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 +1028,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 +1245,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 +1417,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 +1464,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 +1510,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 +1544,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 +1568,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 +1641,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 +1673,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 +1685,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 +1703,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 +1749,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")
@@ -1803,7 +1802,7 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
FAIL_REGULAR_EXPRESSION "CMake Warning .*VariableUnusedViaUnset.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 +1875,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)
@@ -2219,7 +2218,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()
@@ -2498,7 +2497,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}
@@ -2535,7 +2534,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")
@@ -2580,7 +2579,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")
@@ -2607,7 +2606,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"
@@ -2631,7 +2630,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)
@@ -2784,5 +2783,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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/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/test.cmake.in b/Tests/CTestTestTimeout/test.cmake.in
index d3d0888..4178849 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}")
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/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/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/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/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/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 adc4308..bf6d629 100644
--- a/Tests/Fortran/CMakeLists.txt
+++ b/Tests/Fortran/CMakeLists.txt
@@ -1,7 +1,7 @@
cmake_minimum_required (VERSION 2.6)
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/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/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/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/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 9bb097b..499d12b 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}
@@ -35,19 +35,21 @@ add_RunCMake_test(CMP0046)
add_RunCMake_test(CMP0049)
add_RunCMake_test(CMP0050)
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(find_dependency)
if(NOT WIN32)
add_RunCMake_test(PositionIndependentCode)
set(SKIP_VISIBILITY 0)
@@ -105,7 +107,7 @@ if (QT4_FOUND)
add_RunCMake_test(ObsoleteQtMacros)
endif()
-if("${CMAKE_TEST_GENERATOR}" MATCHES "Visual Studio [^6]")
+if("${CMAKE_GENERATOR}" MATCHES "Visual Studio [^6]")
add_RunCMake_test(include_external_msproject)
add_RunCMake_test(SolutionGlobalSections)
endif()
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/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/RunCMake.cmake b/Tests/RunCMake/RunCMake.cmake
index 1d1c523..ed3afc5 100644
--- a/Tests/RunCMake/RunCMake.cmake
+++ b/Tests/RunCMake/RunCMake.cmake
@@ -53,6 +53,7 @@ function(run_cmake test)
-G "${RunCMake_GENERATOR}"
-T "${RunCMake_GENERATOR_TOOLSET}"
-DRunCMake_TEST=${test}
+ --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/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/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/RunCMakeTest.cmake b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
index 5f05cfc..dcabd8a 100644
--- a/Tests/RunCMake/Syntax/RunCMakeTest.cmake
+++ b/Tests/RunCMake/Syntax/RunCMakeTest.cmake
@@ -52,3 +52,16 @@ run_cmake(UnterminatedString)
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)
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/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)