CMake/Tests
David Cole 8ef15df700 Merge topic 'HandleTargetsInCMakeRequiredLibraries'
35c48e1 Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES
61cb4ea bootstrap: move while() and endwhile() into the bootstrap build
c9f2886 -don't pull in CheckTypeSize.cmake from the cmake which is being built
628f365 -remove trailing whitespace
2012-02-21 15:58:27 -05:00
..
Architecture
ArgumentExpansion
Assembler
BuildDepends
BundleGeneratorTest
BundleTest
BundleUtilities Fix BundleUtilities test failure with space in build path. 2012-01-20 22:02:01 -07:00
CFBundleTest
CMakeCommands GenerateExportHeader test: add newlines before end of file 2012-01-18 00:01:08 +01:00
CMakeLib complex: Move cmSystemTools::UpperCase test to CMakeLibTests 2011-12-23 16:16:54 -05:00
CMakeOnly Merge topic 'expect-more-versions' 2012-02-21 15:56:43 -05:00
CMakeTestAllGenerators
CMakeTestBadCommandLines
CMakeTestMultipleConfigures
CMakeTests fix uninitialized var in if(NOT foo bar STREQUAL "foo bar") 2012-01-22 12:15:57 +01:00
COnly Fix CXX/Fortran MODULE flags when enabled before C (#12929) 2012-02-03 15:45:13 -05:00
CPackComponents
CPackComponentsForAll
CPackTestAllGenerators
CTestConfig
CTestScriptMode
CTestTest
CTestTest2
CTestTestBadExe
CTestTestChecksum
CTestTestConfigFileInBuildDir
CTestTestCostSerial
CTestTestCrash
CTestTestCycle
CTestTestDepends
CTestTestFailedSubmits
CTestTestFailure
CTestTestParallel
CTestTestResourceLock
CTestTestRunScript
CTestTestScheduler
CTestTestStopTime
CTestTestSubdir
CTestTestTimeout
CTestTestUpload
CTestTestZeroTimeout
CheckCompilerRelatedVariables
CommandLineTest
CompileCommandOutput
Complex Find_library(): allow searching for versioned shared objects 2012-02-18 16:19:29 +01:00
ComplexOneConfig complex: Remove unused option to test CMakeLib 2011-12-23 16:16:57 -05:00
Contracts Tests: Update drop site value for the Trilinos contract test 2012-02-03 11:52:54 -05:00
CrossCompile
CustComDepend
CustomCommand
CustomCommandWorkingDirectory
CxxOnly Fix CXX/Fortran MODULE flags when enabled before C (#12929) 2012-02-03 15:45:13 -05:00
Dependency
DocTest
DoubleProject
EmptyLibrary
Environment
ExportImport Check*.cmake: Expand imported targets in CMAKE_REQUIRED_LIBRARIES 2012-02-21 15:38:15 -05:00
ExternalOBJ
ExternalProject
FindModulesExecuteAll
FindPackageModeMakefileTest
FindPackageTest
ForceInclude
Fortran
FortranC
FortranOnly
Framework
FunctionTest
IPO
IncludeDirectories
JCTest
Java
Jump
KDE4StableBranchTest
LibName
LinkDirectory
LinkFlags
LinkLanguage
LinkLine
LinkLineOrder
LinkStatic
LoadCommand LoadCommand test: cleanup 2012-01-20 18:31:32 +01:00
LoadCommandOneConfig
MFC
MacroTest
MakeClean
MathTest
MissingSourceFile
Module CheckCXXCompilerFlag test: make it a CMakeOnly test 2012-01-30 19:42:51 +01:00
ModuleDefinition
NewlineArgs
ObjC++
OutDir
OutOfBinary
OutOfSource
PerConfig
Plugin
Policy0002
PolicyScope
PreOrder
PrecompiledHeader
Preprocess
Properties
QtAutomoc
ReturnTest
RuntimePath
SameName
SetLang
Simple
SimpleCOnly
SimpleExclude
SimpleInstall
SimpleInstallS2
SourceGroups
StringFileTest
SubDir
SubDirSpaces
SubProject
SwigTest
SystemInformation
TarTest
TargetName
TestDriver
Testing
TestsWorkingDirectory
TryCompile
Tutorial
Unset
VSExternalInclude
VSGNUFortran CMakeAddFortranSubdirectory: Add NO_EXTERNAL_INSTALL option 2012-02-09 08:38:56 -05:00
VSMidl
VSResource
VariableUnusedViaSet
VariableUnusedViaUnset
VariableUsage
Wrapping
X11
iOSNavApp
.NoDartCoverage
CMakeBuildTest.cmake.in
CMakeInstall.cmake
CMakeLists.txt Do not build RPM if path of the build tree contains space 2012-02-19 20:50:27 +01:00
CMakeWizardTest.cmake
CTestUpdateBZR.cmake.in
CTestUpdateCVS.cmake.in
CTestUpdateCommon.cmake
CTestUpdateGIT.cmake.in
CTestUpdateGIT.sh.in
CTestUpdateHG.cmake.in
CTestUpdateSVN.cmake.in
CheckFortran.cmake
EnforceConfig.cmake.in
README Tests: document where to put tests 2012-02-17 21:02:08 +01:00
TestInstall.sh.in
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 this matches your test you should 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.

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.