CMake/Tests
Brad King 062593273f Tests: Wrap long comment lines in VSXaml test
Manually wrap the lines and remove literal tab characters.  This avoids
problems with incremental formatting by clang-format.
2016-05-11 15:16:04 -04:00
..
AliasTarget Merge topic 'fix-target-alias-in-subdir' 2016-04-05 09:37:59 -04:00
Architecture
ArgumentExpansion
Assembler
BuildDepends Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
BundleGeneratorTest
BundleTest Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
BundleUtilities Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
CFBundleTest FindBoost: Define Boost::boost for all boost versions 2016-04-19 22:07:45 +01:00
CMakeCommands Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
CMakeLib Remove `//------...` horizontal separator comments 2016-05-09 09:41:43 -04:00
CMakeOnly Merge topic 'FindProtobuf-variable-case' 2016-03-11 08:30:46 -05:00
CMakeTestAllGenerators
CMakeTestMultipleConfigures
CMakeTests PushCheckStateTest: Update test to check CMAKE_EXTRA_INCLUDE_FILES 2016-03-31 11:11:32 -04:00
COnly
CPackComponents
CPackComponentsDEB
CPackComponentsForAll CPack/RPM external symlink handling 2016-04-01 09:52:04 -04:00
CPackComponentsPrefix
CPackTestAllGenerators
CPackWiXGenerator
CTestBuildCommandProjectInSubdir
CTestConfig
CTestCoverageCollectGCOV CTestCoverageCollectGCOV: Honor CTEST_EXTRA_COVERAGE_GLOB 2016-04-07 08:53:30 -04:00
CTestLimitDashJ
CTestScriptMode
CTestTest
CTestTest2
CTestTestBadExe
CTestTestBadGenerator
CTestTestChecksum
CTestTestCostSerial
CTestTestCrash
CTestTestCycle
CTestTestDepends
CTestTestEmptyBinaryDirectory
CTestTestFailure
CTestTestFdSetSize
CTestTestLabelRegExp
CTestTestLaunchers
CTestTestMissingDependsExe
CTestTestParallel
CTestTestResourceLock
CTestTestRunScript
CTestTestScheduler
CTestTestSerialInDepends
CTestTestSerialOrder
CTestTestSkipReturnCode
CTestTestStopTime
CTestTestSubdir
CTestTestTimeout
CTestTestUpload
CTestTestVerboseOutput
CTestTestZeroTimeout
CheckCompilerRelatedVariables
CoberturaCoverage
CommandLineTest
CompatibleInterface
CompileCommandOutput
CompileDefinitions Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
CompileFeatures Tests: Protect unicode literals from clang-format Cpp03 formatting 2016-05-11 10:37:45 -04:00
CompileOptions
Complex Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
ComplexOneConfig Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
ConfigSources
Contracts
CrossCompile
CustComDepend
CustomCommand Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
CustomCommandByproducts
CustomCommandWorkingDirectory
CxxDialect
CxxOnly
CxxSubdirC
DelphiCoverage
Dependency
DoubleProject
EmptyDepends
EmptyLibrary
EmptyProperty
Environment
ExportImport Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
ExternalOBJ
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 Fix spelling typos in comments and documentation (#16037) 2016-03-29 14:31:02 -04:00
FindBoost FindBoost: Define Boost::boost for all boost versions 2016-04-19 22:07:45 +01:00
FindGSL Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindGTK2 Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindGTest
FindJsonCpp
FindLTTngUST Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindMatlab
FindModulesExecuteAll
FindOpenSSL
FindPNG Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindPackageModeMakefileTest Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindPackageTest
FindTIFF
FindThreads
FindXalanC Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
FindXercesC
ForceInclude
Fortran Merge topic 'test-FortranCInterface-again' 2016-02-08 10:33:07 -05:00
FortranC
FortranOnly
Framework
FunctionTest
GeneratorExpression
GhsMulti
GhsMultiDuplicateSourceFilenames GHS: Fix handling of duplicate source filenames (#16046) 2016-04-25 10:46:09 -04:00
IPO
IncludeDirectories Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
InterfaceLibrary
InterfaceLinkLibraries
JCTest
JacocoCoverage
Java
JavaJavah
JavascriptCoverage
Jump
LibName
LinkDirectory
LinkFlags
LinkLanguage
LinkLine
LinkLineOrder
LinkStatic
LoadCommand Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
LoadCommandOneConfig Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
MFC Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
MSManifest
MacRuntimePath
MacroTest
MakeClean
MathTest
MissingInstall
MissingSourceFile
Module WCDH: Add Intel to list of supported compilers 2016-04-28 09:16:36 -04:00
ModuleDefinition
MumpsCoverage
NewlineArgs
ObjC++
ObjectLibrary Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
OutDir
OutOfBinary
OutOfSource Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
PDBDirectoryAndName Merge topic 'remove-vs6-generator' 2016-03-10 09:16:23 -05:00
PerConfig
Plugin Tests: Fix Plugin test include order 2016-05-03 10:08:41 -04:00
Policy0002
PolicyScope
PositionIndependentTargets
PreOrder
PrecompiledHeader Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
Preprocess Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
Properties
PythonCoverage
Qt4And5Automoc
Qt4Deploy Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
Qt4Targets
QtAutoUicInterface
QtAutogen Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
QtAutomocNoQt
ReturnTest
RunCMake Drop find_(library|file|path) prefixes from PATH on non-Windows 2016-05-09 12:58:08 -04:00
RuntimePath
SBCS
SameName
SetLang
Simple
SimpleCOnly
SimpleExclude
SimpleInstall
SimpleInstallS2
SourceFileProperty
SourceGroups
SourcesProperty
StagingPrefix Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
StringFileTest Tests: Stabilize include order in StringFileTest 2016-04-29 10:56:58 -04:00
SubDir
SubDirSpaces
SubProject
SwiftMix
SwiftOnly
SwigTest
SystemInformation
TargetName
TestDriver
Testing
TestsWorkingDirectory Tests: Sort includes of sys/types.h as clang-format would 2016-05-03 10:08:41 -04:00
TryCompile Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
Tutorial Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
Unset
VSExcludeFromDefaultBuild
VSExternalInclude Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
VSGNUFortran
VSMASM
VSMidl Drop Visual Studio 6 generator 2016-03-09 09:42:18 -05:00
VSNsightTegra
VSProjectInSubdir
VSResource Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
VSWinStorePhone Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
VSWindowsFormsResx
VSXaml Tests: Wrap long comment lines in VSXaml test 2016-05-11 15:16:04 -04:00
VariableUnusedViaSet
VariableUnusedViaUnset
VariableUsage
Visibility
WarnUnusedCliUnused
Wrapping Merge topic 'test-watcom-workaround' 2016-05-02 09:24:23 -04:00
X11 Format include directive blocks and ordering with clang-format 2016-04-29 13:58:54 -04:00
XCTest
iOSNavApp
.NoDartCoverage
BootstrapTest.cmake
CMakeBuildTest.cmake.in
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
CTestUpdateCommon.cmake
CTestUpdateGIT.cmake.in
CTestUpdateGIT.sh.in
CTestUpdateHG.cmake.in
CTestUpdateP4.cmake.in
CTestUpdateSVN.cmake.in
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.