https://github.com/Kitware/CMake
Revision 3b4838b57fc70bd64b29044ccbdf582f14a0574d authored by Ryan Thornton on 16 March 2020, 20:16:38 UTC, committed by Ryan Thornton on 27 March 2020, 14:40:40 UTC
PRE_TEST makes it possible to properly distinguish between test cases
that exist only in certain configurations.

In the new test scenario, debug tests are disabled in release builds,
and release tests are disabled in debug builds
when a multi config generator is used.

Note, this is a bit of a hack and *only* works for PRE_TEST mode.

POST_BUILD makes no attempt to get this right. It preserves the status quo
and you obtain the tests that were last discovered.

See further discussion in !4078

Ideally, the POST_BUILD behavior could be fixed
by using generator expressions in OUTPUT and BYPRODUCT expressions.

Then you could do something like:

    set(ctest_include_file "${ctest_file_base}_include-$<CONFIG>.cmake")
    set(ctest_tests_file "${ctest_file_base}_tests-$<CONFIG>.cmake")

Once #12877 lands, maybe this can be revisited.

Co-authored-by: Ryan Thornton <ThorntonRyan@JohnDeere.com>
Co-authored-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
1 parent 1ba4cb5
History
Tip revision: 3b4838b57fc70bd64b29044ccbdf582f14a0574d authored by Ryan Thornton on 16 March 2020, 20:16:38 UTC
GoogleTest: Add tests for MultiConfig discovery in PRE_TEST mode
Tip revision: 3b4838b
File Mode Size
AliasTarget
Architecture
ArgumentExpansion
Assembler
BuildDepends
BundleGeneratorTest
BundleTest
BundleUtilities
CFBundleTest
CMakeCommands
CMakeLib
CMakeOnly
CMakeServerLib
CMakeTestAllGenerators
CMakeTestMultipleConfigures
CMakeTests
COnly
CPackComponents
CPackComponentsDEB
CPackComponentsForAll
CPackComponentsPrefix
CPackNSISGenerator
CPackTestAllGenerators
CPackUseDefaultVersion
CPackUseProjectVersion
CPackUseShortProjectVersion
CPackWiXGenerator
CSharpLinkFromCxx
CSharpLinkToCxx
CSharpOnly
CTestBuildCommandProjectInSubdir
CTestConfig
CTestCoverageCollectGCOV
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
CommandLength
CommandLineTest
CompatibleInterface
CompileCommandOutput
CompileDefinitions
CompileFeatures
CompileOptions
Complex
ComplexOneConfig
ConfigSources
Contracts
CrossCompile
Cuda
CudaOnly
CustComDepend
CustomCommand
CustomCommandByproducts
CustomCommandWorkingDirectory
CxxDialect
CxxOnly
CxxSubdirC
DelphiCoverage
Dependency
DoubleProject
EmptyDepends
EmptyLibrary
EmptyProperty
Environment
ExportImport
ExternalOBJ
ExternalProject
ExternalProjectLocal
ExternalProjectSourceSubdir
ExternalProjectSourceSubdirNotCMake
ExternalProjectSubdir
ExternalProjectUpdate
FindALSA
FindBZip2
FindBoost
FindCURL
FindCups
FindDoxygen
FindEXPAT
FindEnvModules
FindFontconfig
FindFreetype
FindGDAL
FindGIF
FindGLEW
FindGSL
FindGTK2
FindGTest
FindGit
FindGnuTLS
FindICU
FindIconv
FindJPEG
FindJsonCpp
FindLTTngUST
FindLibArchive
FindLibLZMA
FindLibRHash
FindLibUV
FindLibXml2
FindLibinput
FindMPI
FindMatlab
FindModulesExecuteAll
FindODBC
FindOpenACC
FindOpenCL
FindOpenGL
FindOpenMP
FindOpenSSL
FindPNG
FindPackageModeMakefileTest
FindPackageTest
FindPatch
FindPostgreSQL
FindProtobuf
FindPython
FindRuby
FindSQLite3
FindTIFF
FindThreads
FindVulkan
FindX11
FindXalanC
FindXercesC
ForceInclude
Fortran
FortranC
FortranModules
FortranOnly
Framework
FunctionTest
GeneratorExpression
GhsMulti
GoogleTest
ImportedSameName
IncludeDirectories
IncludeDirectoriesCPATH
InterfaceLibrary
InterfaceLinkLibraries
JCTest
JacocoCoverage
Java
JavaExportImport
JavaJavah
JavaNativeHeaders
JavascriptCoverage
Jump
LibName
LinkDirectory
LinkFlags
LinkLanguage
LinkLine
LinkLineOrder
LinkStatic
LoadCommand
LoadCommandOneConfig
MFC
MSManifest
MSVCRuntimeLibrary
MacRuntimePath
MacroTest
MakeClean
MathTest
MissingInstall
MissingSourceFile
Module
ModuleDefinition
MumpsCoverage
NewlineArgs
ObjC
ObjCXX
ObjectLibrary
OutDir
OutName
OutOfBinary
OutOfSource
PDBDirectoryAndName
PerConfig
Plugin
Policy0002
PolicyScope
PositionIndependentTargets
PreOrder
PrecompiledHeader
Preprocess
Properties
PythonCoverage
Qt4And5Automoc
Qt4Autogen
Qt4Deploy
Qt4Targets
Qt5Autogen
QtAutogen
QtAutomocNoQt
ReturnTest
RunCMake
RuntimePath
SBCS
Server
SetLang
Simple
SimpleCOnly
SourceFileIncludeDirProperty
SourceFileProperty
SourceGroups
SourcesProperty
StagingPrefix
StringFileTest
SubDir
SubDirSpaces
SubProject
SwiftMix
SwiftOnly
SystemInformation
TargetName
TestDriver
Testing
TestsWorkingDirectory
TryCompile
Unset
UseSWIG
VSExcludeFromDefaultBuild
VSExternalInclude
VSGNUFortran
VSMASM
VSMidl
VSNASM
VSNsightTegra
VSProjectInSubdir
VSResource
VSResourceNinjaForceRSP
VSWinStorePhone
VSWindowsFormsResx
VSXaml
VariableUnusedViaSet
VariableUnusedViaUnset
VariableUsage
Visibility
WarnUnusedCliUnused
Wrapping
X11
XCTest
iOSNavApp
.NoDartCoverage -rw-r--r-- 39 bytes
BootstrapTest.cmake -rw-r--r-- 406 bytes
CMakeBuildTest.cmake.in -rw-r--r-- 2.0 KB
CMakeCopyright.cmake -rw-r--r-- 959 bytes
CMakeInstall.cmake -rw-r--r-- 1.7 KB
CMakeLists.txt -rw-r--r-- 139.9 KB
CTestUpdateBZR.cmake.in -rw-r--r-- 4.6 KB
CTestUpdateCVS.cmake.in -rw-r--r-- 5.7 KB
CTestUpdateCommon.cmake -rw-r--r-- 10.3 KB
CTestUpdateGIT.cmake.in -rw-r--r-- 10.7 KB
CTestUpdateGIT.sh.in -rwxr-xr-x 135 bytes
CTestUpdateHG.cmake.in -rw-r--r-- 5.4 KB
CTestUpdateP4.cmake.in -rw-r--r-- 7.6 KB
CTestUpdateSVN.cmake.in -rw-r--r-- 5.3 KB
CheckFortran.cmake -rw-r--r-- 2.4 KB
CheckSwift.cmake -rw-r--r-- 2.2 KB
EnforceConfig.cmake.in -rw-r--r-- 1.4 KB
README.rst -rw-r--r-- 979 bytes
bootstrap.bat.in -rw-r--r-- 47 bytes
test_clean.cmake.in -rw-r--r-- 81 bytes

README.rst

back to top