CMake/Tests
Brad King f500a784d0 Fix crash on $<TARGET_PROPERTY:...,LOCATION> genex (#16134)
Policy CMP0026 deprecated the LOCATION property, and we have long
provided a $<TARGET_FILE:...> generator expression.  However, if
a project tries to use $<TARGET_PROPERTY:...,LOCATION> we should
at least not crash.

The compatibility implementation of the LOCATION property uses
cmGlobalGenerator::CreateGenerationObjects to create the structures
needed to evaluate the property before generation starts.  The
implementation assumed that accessing the property could only be done
during configuration (via the typical get_property command use case).
The $<TARGET_PROPERTY:...,LOCATION> genex causes the LOCATION property
to be accessed during generation.  Calling CreateGenerationObjects
during generation blows away all the objects currently being used for
generation and is not safe.  Add a condition to call it only when
configuration is not finished.
2016-06-02 10:58:38 -04:00
..
AliasTarget Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Architecture Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
ArgumentExpansion Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
Assembler Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
BuildDepends Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
BundleGeneratorTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
BundleTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
BundleUtilities Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CFBundleTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CMakeCommands Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CMakeLib Merge topic 'remove-needless-copies' 2016-05-27 09:08:21 -04:00
CMakeOnly Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CMakeTestAllGenerators Ensure libgmp-10.dll is in the PATH for CMakeTestAllGenerators 2011-07-29 11:13:33 -04:00
CMakeTestMultipleConfigures Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CMakeTests PushCheckStateTest: Update test to check CMAKE_EXTRA_INCLUDE_FILES 2016-03-31 11:11:32 -04:00
COnly Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CPackComponents Replace http://www.cmake.org URLs with https://cmake.org 2015-09-25 15:47:39 -04:00
CPackComponentsDEB Merge topic 'cpack-deb-different-package-names' 2016-05-24 13:54:03 -04:00
CPackComponentsForAll CPack/Deb possibility to change package name 2016-05-23 19:55:46 +02:00
CPackComponentsPrefix CPack: Enable DEB and RPM tests more reliably 2015-05-12 08:56:34 -04:00
CPackTestAllGenerators Tests: Use the right path to CPack value for running CPack tests 2012-11-29 15:49:36 -05:00
CPackWiXGenerator Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestBuildCommandProjectInSubdir Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 2014-03-03 15:26:49 -05:00
CTestConfig Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestCoverageCollectGCOV Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestLimitDashJ Add CTestLimitDashJ test (#12904) 2013-01-03 13:37:50 -05:00
CTestScriptMode Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CTestTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTest2 Tests: In CTestTest2 skip the kwsys.testProcess-10 test that leaks 2015-07-31 09:27:08 -04:00
CTestTestBadExe Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
CTestTestBadGenerator Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
CTestTestChecksum Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
CTestTestCostSerial Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestCrash Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestCycle Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
CTestTestDepends Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
CTestTestEmptyBinaryDirectory Tests: added test for ctest_empty_binary_directory() 2013-11-01 21:32:16 +01:00
CTestTestFailure Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestFdSetSize Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestLabelRegExp CTest: Fix combined inclusive/exclusive label regular expressions 2014-06-06 10:28:18 +02:00
CTestTestLaunchers Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
CTestTestMissingDependsExe CTest: fix regressions introduced by the ctest-fix-run-serial topic 2013-12-23 15:31:15 +01:00
CTestTestParallel Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestResourceLock Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestRunScript Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CTestTestScheduler Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestSerialInDepends CTest: fix dashboard issues associated with the ctest-fix-run-serial topic 2013-10-25 21:39:58 +02:00
CTestTestSerialOrder CTest: fix regressions introduced by the ctest-fix-run-serial topic 2013-12-23 15:31:15 +01:00
CTestTestSkipReturnCode Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
CTestTestStopTime Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestSubdir Tests: Add generator platform support 2014-09-10 11:21:50 -04:00
CTestTestTimeout Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestUpload Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CTestTestVerboseOutput CTest: Output test-specific env vars in verbose mode (#15446) 2015-03-17 10:11:33 -04:00
CTestTestZeroTimeout Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CheckCompilerRelatedVariables VS14: Add Visual Studio 14 generator (#14982) 2014-06-25 14:51:19 -04:00
CoberturaCoverage CTest: Generalize Cobertura coverage format handling 2014-06-04 14:26:19 +00:00
CommandLineTest Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
CompatibleInterface Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CompileCommandOutput Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CompileDefinitions Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CompileFeatures Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CompileOptions Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Complex Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
ComplexOneConfig Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
ConfigSources cmTarget: Don't allow relative paths in INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00
Contracts Replace http://www.cmake.org URLs with https://cmake.org 2015-09-25 15:47:39 -04:00
CrossCompile Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CustComDepend Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CustomCommand Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CustomCommandByproducts Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CustomCommandWorkingDirectory Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
CxxDialect Features: Enable compiler extensions by default. 2014-05-31 12:16:12 +02:00
CxxOnly Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
CxxSubdirC Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
DelphiCoverage Tests: Fix DelphiCoverage test file selection 2015-10-20 11:13:25 -04:00
Dependency Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
DoubleProject Fix the case where cmake --build failed with two project cmds in one file. 2011-12-20 14:16:25 -05:00
EmptyDepends Watcom: Avoid prompt from wmake about dll with no exports... 2012-11-28 12:11:52 -05:00
EmptyLibrary Add test that CMake errors with empty libs 2010-09-30 11:01:35 -04:00
EmptyProperty Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Environment Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
ExportImport Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
ExternalOBJ Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
ExternalProject ExternalProject: Add option to perform a shallow Git clone (#15291) 2016-04-27 10:58:07 -04:00
ExternalProjectLocal Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
ExternalProjectSubdir Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
ExternalProjectUpdate ExternalProject: Always run update step with non-empty UPDATE_COMMAND 2016-05-18 14:54:25 -04:00
FindBoost Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindGSL Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindGTK2 Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindGTest Tests: Add tests for FindGTest 2015-12-10 23:09:16 +00:00
FindJsonCpp FindJsonCpp: Drop new module due to upstream jsoncpp providing package 2015-02-20 08:22:02 -05:00
FindLTTngUST Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindMatlab Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindModulesExecuteAll Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindOpenSSL Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindPNG Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindPackageModeMakefileTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindPackageTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindTIFF Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FindThreads FindThreads: officially announce it works with only C++ enabled 2015-09-25 10:08:35 -04:00
FindXalanC Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindXercesC FindXercesC: Add imported targets and unit test 2015-11-23 14:28:05 -05:00
ForceInclude Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Fortran Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FortranC Tests: Fix CMAKE_MAKE_PROGRAM selection in FortranC.Flags test 2015-08-11 10:18:05 -04:00
FortranOnly CheckFortranCompilerFlag: Add test case 2015-02-05 11:18:13 -05:00
Framework Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
FunctionTest Tests: Fix CMP0054 warnings 2014-09-16 09:06:29 -04:00
GeneratorExpression Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
GhsMulti Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
GhsMultiDuplicateSourceFilenames GHS: Use shorter object file names on collision 2016-05-18 09:27:19 -04:00
IPO Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
IncludeDirectories Add a variable to specify language-wide system include directories 2016-05-25 09:30:31 -04:00
InterfaceLibrary Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
InterfaceLinkLibraries Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
JCTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
JacocoCoverage CTest: Fix Jacoco Coverage 2015-03-06 11:18:19 -05:00
Java UseJava: Teach add_jar to support file syntax for sources 2015-08-04 11:19:43 -04:00
JavaJavah Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
JavascriptCoverage CTest: Add Javascript coverage parser 2014-10-29 11:27:11 -04:00
Jump Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
LibName Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
LinkDirectory Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
LinkFlags Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
LinkLanguage Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
LinkLine Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
LinkLineOrder Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
LinkStatic Avoid if() quoted auto-dereference 2014-10-20 11:49:16 -04:00
LoadCommand Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
LoadCommandOneConfig Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
MFC Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
MSManifest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
MacRuntimePath Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
MacroTest Tests: Fix CMP0054 warnings 2014-09-16 09:06:29 -04:00
MakeClean Tests: Don't read the LOCATION property from build targets. 2013-11-19 18:07:27 +01:00
MathTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
MissingInstall Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
MissingSourceFile Test that missing source mentions directory (#11677) 2011-01-15 08:16:50 -05:00
Module Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
ModuleDefinition Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
MumpsCoverage CTEST: Fix MUMPS file parser and update test 2014-08-15 10:50:36 -04:00
NewlineArgs Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
ObjC++ Convert CMake-language commands to lower case 2012-08-13 14:19:16 -04:00
ObjectLibrary Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
OutDir Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
OutOfBinary Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
OutOfSource Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
PDBDirectoryAndName Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
PerConfig Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Plugin Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Policy0002 Test support for OLD behavior of policy CMP0002 2009-09-28 17:34:34 -04:00
PolicyScope Remove CMake-language block-end command arguments 2012-08-13 14:19:16 -04:00
PositionIndependentTargets Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
PreOrder Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
PrecompiledHeader Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Preprocess Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Properties Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
PythonCoverage Adding support for the Python coverage.py tool. 2013-10-08 09:20:30 -04:00
Qt4And5Automoc FindQt4: Make AUTOMOC work regardless which order Qt 4/5 is found. 2014-01-29 17:02:43 +01:00
Qt4Deploy Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Qt4Targets Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
QtAutoUicInterface Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
QtAutogen Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
QtAutomocNoQt Automoc: Don't create automoc targets if Qt is not used (#13999) 2013-03-12 17:42:02 -04:00
ReturnTest Fix spelling and typos (affecting binary data / module messages) 2013-05-07 08:39:19 -04:00
RunCMake Fix crash on $<TARGET_PROPERTY:...,LOCATION> genex (#16134) 2016-06-02 10:58:38 -04:00
RuntimePath Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SBCS Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SameName Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SetLang Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Simple Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SimpleCOnly Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SimpleExclude Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SimpleInstall Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SimpleInstallS2 Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SourceFileProperty test: test source file properties with case-insensitivity 2014-12-02 10:56:36 -05:00
SourceGroups Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SourcesProperty cmTarget: Don't allow relative paths in INTERFACE_SOURCES 2014-11-29 12:24:59 +01:00
StagingPrefix Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
StringFileTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SubDir Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SubDirSpaces Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SubProject Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SwiftMix Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SwiftOnly Swift: Use dump instead of println 2015-09-01 20:32:38 +02:00
SwigTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
SystemInformation Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
TargetName Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
TestDriver Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Testing Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
TestsWorkingDirectory Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
TryCompile Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Tutorial Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Unset unset: Add PARENT_SCOPE option 2013-10-08 08:37:50 -04:00
VSExcludeFromDefaultBuild VS: Add option to put INSTALL target in .sln default build 2015-05-06 10:31:39 -04:00
VSExternalInclude Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VSGNUFortran Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VSMASM Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VSMidl Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VSNsightTegra Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VSProjectInSubdir VS: Add test for building MSBuild project in subdir 2013-04-12 11:35:36 -04:00
VSResource Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VSWinStorePhone Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VSWindowsFormsResx Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VSXaml Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
VariableUnusedViaSet Add test for unused detection via setting it 2010-09-16 13:52:54 -04:00
VariableUnusedViaUnset Fix typo in VariableUnusedViaUnset test 2010-09-17 10:04:18 -04:00
VariableUsage Add tests for unused command line variables 2010-09-02 11:33:57 -04:00
Visibility Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
WarnUnusedCliUnused Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
Wrapping Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
X11 Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
XCTest Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
iOSNavApp Revise C++ coding style using clang-format 2016-05-16 16:05:19 -04:00
.NoDartCoverage
BootstrapTest.cmake
CMakeBuildTest.cmake.in Tests: Use -A option to pass generator platform selection 2014-09-15 10:26:59 -04:00
CMakeCopyright.cmake
CMakeInstall.cmake
CMakeLists.txt GHS: Fix handling of duplicate source filenames (#16046) 2016-04-25 10:46:09 -04:00
CTestUpdateBZR.cmake.in
CTestUpdateCVS.cmake.in ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610) 2015-06-11 11:00:48 -04:00
CTestUpdateCommon.cmake ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610) 2015-06-11 11:00:48 -04:00
CTestUpdateGIT.cmake.in Tests: Simplify CTest.UpdateGIT repo path construction 2015-12-10 13:54:54 -05:00
CTestUpdateGIT.sh.in
CTestUpdateHG.cmake.in ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610) 2015-06-11 11:00:48 -04:00
CTestUpdateP4.cmake.in
CTestUpdateSVN.cmake.in ctest_update: Fix RETURN_VALUE on VCS tool failure (#15610) 2015-06-11 11:00:48 -04:00
CheckFortran.cmake
EnforceConfig.cmake.in
README
bootstrap.bat.in
test_clean.cmake.in

README

If you think about adding a new testcase then here is a small checklist you
can run through to find a proper place for it. Go through the list from the
beginning and stop once you find something that matches your tests needs,
i.e. if you will test a module and only need the configure mode use the
instructions from section 2, not 3.

1. Your testcase can run in CMake script mode, i.e. "cmake -P something"

Put your test in Tests/CMakeTests/ directory as a .cmake.in file. It will be
put into the test binary directory by configure_file(... @ONLY) and run from
there. Use the AddCMakeTest() macro in Tests/CMakeTests/CMakeLists.txt to add
your test to the test runs.

2. Your test needs CMake to run in configure mode, but will not build anything

This includes tests that will build something using try_compile() and friends,
but nothing that expects add_executable(), add_library(), or add_test() to run.

If the test configures the project only once and it must succeed then put it
into the Tests/CMakeOnly/ directory.  Create a subdirectory named like your
test and write the CMakeLists.txt you need into that subdirectory. Use the
add_CMakeOnly_test() macro from Tests/CMakeOnly/CMakeLists.txt to add your
test to the test runs.

If the test configures the project with multiple variations and verifies
success or failure each time then put it into the Tests/RunCMake/ directory.
Read the instructions in Tests/RunCMake/CMakeLists.txt to add a test.

3. If you are testing something from the Modules directory

Put your test in the Tests/Modules/ directory. Create a subdirectory there
named after your test. Use the ADD_TEST_MACRO macro from Tests/CMakeLists.txt
to add your test to the test run. If you have put your stuff in
Tests/Modules/Foo then you call it using ADD_TEST_MACRO(Module.Foo Foo).

4. You are doing other stuff.

Find a good place ;) In doubt mail to cmake-developers@cmake.org and ask for
advise.