Brad King 177b5fb61b Merge topic 'fortran-compiler-id' 6 years ago
..
Android ca97d4cb5f Android: Add support for NDK r18 7 years ago
AndroidMK c1f5a44b28 LINK_OPTIONS: Add new family of properties 7 years ago
AndroidTestUtilities 8a5cb84b0e AndroidTestUtilities: do not require ExternalData unconditionally 8 years ago
AutoExportDll d7204e649e Revise C++ coding style using clang-format-6.0 7 years ago
Autogen 5fe18eee13 Autogen: Adaptive missing Qt warning 6 years ago
BuildDepends c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
BundleUtilities 31b6825bd2 Merge branch 'master' into deployqt4-cmp0080-fix 7 years ago
Byproducts 80e2f8ee0c Ninja,Makefile: Add tests for handling of byproducts by clean operations 7 years ago
CMP0004 d05a9bd1e6 Cygwin: Avoid legacy warnings in RunCMake.* tests 12 years ago
CMP0019 4f5bbbeab9 Add deprecation warnings for policies CMP0036 and below 8 years ago
CMP0022 70c6557285 Tests: Fix RunCMake.CMP0022 tll case for Debug configuration 8 years ago
CMP0026 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
CMP0027 b1bbee3e9a Record more policies on targets when created 11 years ago
CMP0028 4f5bbbeab9 Add deprecation warnings for policies CMP0036 and below 8 years ago
CMP0037 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0038 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0039 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0040 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0041 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0042 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0043 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0045 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0046 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0049 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0050 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0051 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
CMP0053 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0054 a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
CMP0055 0c709cb2a2 Add deprecation warnings for policies CMP0063 and below 7 years ago
CMP0057 aed6239e40 if: Implement new IN_LIST operator 10 years ago
CMP0059 845cb217a7 CMP0059: Fix typo in policy description 9 years ago
CMP0060 0c709cb2a2 Add deprecation warnings for policies CMP0063 and below 7 years ago
CMP0064 6845e2559d Add deprecation warnings for policies CMP0065 and below 6 years ago
CMP0065 566086187f Fix typos. 9 years ago
CMP0068 1ba91291e3 Add policy CMP0068 separate install_name and RPATH settings on macOS 8 years ago
CMP0069 567fabe88e IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual Studio 7 years ago
CMP0081 b5915744eb LINK_DIRECTORIES target property: add policy for absolute paths check. 7 years ago
CMakeRoleGlobalProperty 264bdac185 CMAKE_ROLE: Fix value for ctest --build-and-test 6 years ago
CPack 4568d046c4 Properties: Add CMAKE_ROLE global property 6 years ago
CPackCommandLine eba7273c20 cpack: Better error message when generator doesn't exist. 7 years ago
CPackConfig ed015bde2b CPack: Restore support for 0-valued version components 7 years ago
CPackInstallProperties 69050f4d16 Tests: Use full output paths in file(GENERATE) calls 8 years ago
CPackSymlinks 5f686b8a6b Tests: Add case for CPack source package with symlinks 10 years ago
CSharpCustomCommand a56edad6d6 CSharp: Fix regression in VS project type selection for custom target 7 years ago
CSharpReferenceImport d7204e649e Revise C++ coding style using clang-format-6.0 7 years ago
CTest 70c50aa23c Revert "Remove CTestTestfile.cmake when BUILD_TESTING is OFF" 7 years ago
CTestCommandLine cae9d2a61a CTest: Teach --show-only= to reject unknown values 6 years ago
CTestTimeoutAfterMatch 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
CacheNewline c42b377c29 cmCacheManager: Test and document newline truncation behavior 7 years ago
CheckIPOSupported 567fabe88e IPO: INTERPROCEDURAL_OPTIMIZATION (LTCG) for Visual Studio 7 years ago
CheckModules a61ae3fb80 CheckIncludeFiles: Honor CMAKE_REQUIRED_LIBRARIES 7 years ago
ClangTidy 80ebc55a7c cmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zero 9 years ago
CommandLine 1f411b0cfa Merge topic 'cmake-option-parsing' 6 years ago
CommandLineTar 6c4781baa9 Tests: Consolidate, refactor and extend -E tar tests 10 years ago
CompatibleInterface d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
CompileDefinitions c1bf1a59ff CompileDefinitions: Add unit test for setting empty content. 10 years ago
CompileFeatures e556f1b909 CompileFeatures: Makes tests work with meta-feature only 8 years ago
CompilerChange 15610bb5b1 Drop use of configure_file IMMEDIATE option 12 years ago
CompilerLauncher f19c70c3d2 Fortran: Add option to run the compiler through launcher tools 8 years ago
CompilerNotFound afeb4eb243 nmake/jom: Only warn about bad VS environment if compiler not found. 10 years ago
Configure 25b6e7b710 Tolerate removed/replaced CMakeCache.txt with old CMakeFiles/ 9 years ago
Cppcheck 3b80cd77fb Fail the build if cppcheck returns a non-zero exit code 7 years ago
Cpplint bfcc20343c Update cpplint support to return 0 and mark warnings for CDash. 8 years ago
CrosscompilingEmulator f648b9be63 Tests: Check that CROSSCOMPILING_EMULATOR is not used on imported targets 9 years ago
DisallowedCommands 4f5bbbeab9 Add deprecation warnings for policies CMP0036 and below 8 years ago
ExportWithoutLanguage d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
ExternalData 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
ExternalProject 19d86e26e3 ExternalProject: add LOG_OUTPUT_ON_FAILURE option 7 years ago
FPHSA 5dc215e03b FPHSA: fix typo in comment 8 years ago
FeatureSummary 6f62c66b2c FeatureSummary: Add FeatureSummary_<TYPE>_DESCRIPTION global properties 8 years ago
FetchContent 2119c33b7e FetchContent: Give access to the terminal for download and update 6 years ago
FileAPI 4b6b2a571c fileapi: extend codemodel v2 with directory details 7 years ago
FileAPIExternalSource ea0a060168 fileapi: Add test for codemodel v2 7 years ago
File_Generate c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
FindBoost 97d2109294 Tests: Make RunCMake.FindBoost robust to Boost_ROOT in environment 6 years ago
FindGTK2 4bc2c16b5d FindGTK2: Add unit test to check variables when run twice 8 years ago
FindLua 9455512d22 FindLua: Add tests for this module 7 years ago
FindMatlab 59fb9e89b2 FindMatlab: Matlab Runtime Compiler support 7 years ago
FindOpenGL 2ea17412a9 FindOpenGL: Add policy CMP0072 to prefer GLVND for legacy GL 8 years ago
FindPkgConfig aa51bfd74f FindPkgConfig: support also > and < operators for version compares 7 years ago
Framework 58d9297eef Tests: Fix RunCMake.Framework ios arch for Xcode 9 8 years ago
GNUInstallDirs f835f189ae GNUInstallDirs: Update FreeBSD "info" destination to share/info 7 years ago
GenerateExportHeader d7204e649e Revise C++ coding style using clang-format-6.0 7 years ago
GeneratorExpression a080914274 Fortran: Add compiler ID/Version generator expressions 6 years ago
GeneratorInstance 9ffb35386f VS: Select and save a VS 2017 instance persistently 8 years ago
GeneratorPlatform 57e48f16f2 VS: Add Visual Studio 16 2019 generator 6 years ago
GeneratorToolset 57e48f16f2 VS: Add Visual Studio 16 2019 generator 6 years ago
GetPrerequisites 08be74bfd7 GetPrerequisites: Fix handling of executable scripts 7 years ago
GoogleTest d7204e649e Revise C++ coding style using clang-format-6.0 7 years ago
IfacePaths a0ec14d363 Add deprecation warnings for policies CMP0054 and below 8 years ago
IncludeWhatYouUse d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
IncompatibleQt d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
Languages 7b74213461 CUDA: Fix crash on linking to a CUDA target without CUDA enabled 7 years ago
LinkStatic 974de0e199 static library: add property STATIC_LIBRARY_OPTIONS 7 years ago
LinkWhatYouUse 96242f8022 Add options to run `ldd -u -r` as a "link-what-you-use" tool 9 years ago
Make 2d64f9f08d include_regular_expression: Fix propagation to subdirectories 7 years ago
MultiLint 992962c76d cmcmd: Restore support for running multiple lint tools 8 years ago
Ninja 6199637e95 configure_file: canonicalize input and output path in dependencies 7 years ago
ObjectLibrary bab24e782c target_link_libraries: Propagate dependencies of object libraries 7 years ago
ObsoleteQtMacros d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
PolicyScope 7c36d2067b cmListFileBacktrace: Refactor storage to provide efficient value semantics 9 years ago
PositionIndependentCode f255280fd9 PIE link options: Update strategy to fix performance regression 7 years ago
RuntimePath 6114d85a7d RPATH: Add option for using $ORIGIN in build tree 7 years ago
ScriptMode 50572d638b set_directory_properties: Restore in script mode 7 years ago
SourceProperties 0448311179 sourceFile properties: add property INCLUDE_DIRECTORIES 7 years ago
Swift 1aa29f0db6 Swift: Remove positive Swift language tests 10 years ago
Syntax 82a4822610 CMP0053: document that `$` is a valid literal variable character 7 years ago
TargetObjects 69050f4d16 Tests: Use full output paths in file(GENERATE) calls 8 years ago
TargetPolicies c4b4d8b3a6 POSITION_INDEPENDENT_CODE: Manage link flags for executables 7 years ago
TargetPropertyGeneratorExpressions 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
TargetSources 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
ToolchainFile 8a98cf6432 Honor CMAKE_*_LINKER_FLAGS[_<CONFIG>]_INIT set in toolchain files 9 years ago
UseSWIG dff28141dc UseSWIG: add management of SWIG option -module 7 years ago
VS10Project bd3685b6cf Merge topic 'vs-debug-utility-targets' 6 years ago
VS10ProjectWinCE 5b1364a2e3 cmVisualStudio10TargetGenerator: Fix .NET Compact Framework projects. 6 years ago
VSSolution 5cf9c3d0cc VS: Add SolutionGuid to generated .sln files 8 years ago
VisibilityPreset 0c709cb2a2 Add deprecation warnings for policies CMP0063 and below 7 years ago
WorkingDirectory 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
WriteBasicConfigVersionFile eb973f935f CMakePackageConfigHelpers: Add ARCH_INDEPENDENT option 7 years ago
WriteCompilerDetectionHeader f38d050231 WCDH: introduce BARE_FEATURES 7 years ago
XcodeProject 6b7f1e1db0 Xcode: Add variables and properties to configure schemes 7 years ago
add_custom_command f59c33a763 VS: Generate a custom command only in the least dependent target 7 years ago
add_custom_target 6e59491659 add_custom_{command,target}: Fix crash on empty expanded command 7 years ago
add_dependencies d9f836e956 Add a getter for manually added target dependencies 9 years ago
add_executable 4e7f67383f Defer check for sources within a target until generation. 8 years ago
add_library 7723e9a058 Do not produce legacy _LIB_DEPENDS cache entries 7 years ago
add_link_options 66ea1a3795 LINK_OPTIONS: Add support of "LINKER:" prefix 7 years ago
add_subdirectory b56f2db87a Testing: Add test for CMP0082 7 years ago
alias_targets e567d7eb63 add_library: Restore error on alias of non-global imported target 7 years ago
build_command 0c709cb2a2 Add deprecation warnings for policies CMP0063 and below 7 years ago
cmake_minimum_required 8dc97acb03 cmake_minimum_required: Tolerate unknown future arguments 7 years ago
cmake_parse_arguments 66c70cd9f1 cmake_parse_arguments: Add additional unit tests 9 years ago
configure_file 6199637e95 configure_file: canonicalize input and output path in dependencies 7 years ago
continue 7a649111cd Use string(APPEND) in Tests 9 years ago
ctest_build 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_cmake_error 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_configure 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_coverage 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_disabled_test 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_fixtures 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_labels_for_subprojects 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_memcheck 9501a6145d CTest: Remove special case for Dart version <= 1 7 years ago
ctest_skipped_test 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_start 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_submit 2bedd5fb7c ctest_submit: Remove submit method from log output 6 years ago
ctest_test 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
ctest_upload 1ca53f5ef1 Remove unnecessary CTEST_PROJECT_NAME variables 7 years ago
execute_process 8caec41e6e execute_process: Allow UTF-8 as a synonym for the UTF8 keyword 8 years ago
export b88bf6796e EXPORT_PROPERTIES: Add test for an undefined property 7 years ago
file 593d986470 Tests: Avoid cross-device links in CREATE_LINK test 6 years ago
find_dependency ab358d6a85 Improve find_dependency argument handling 8 years ago
find_file b30b32a493 Drop find_(library|file|path) prefixes from PATH on non-Windows 9 years ago
find_library 6f5aede716 find_library: Skip 'lib => lib<arch>' searches if one symlinks the other 8 years ago
find_package b773e58099 find_package: add test coverage for CMAKE_FIND_PACKAGE_RESOLVE_SYMLINKS 6 years ago
find_path 188baef00c find_path: Fix location of <dir/header.h> in a framework on OS X 9 years ago
find_program c76c1ea208 find_program: Consider CWD only for paths with separator 7 years ago
foreach fb114a40aa Tests: Add test for bad foreach inside a function 8 years ago
get_filename_component 31f73eb12d get_filename_component: Revise PROGRAM/PROGRAM_ARGS split semantics 8 years ago
get_property 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
if edac95b955 cmIfCommand: Reject duplicate else() and misplaced elseif() 8 years ago
include d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
include_directories a4bd30104f include_directories: Fix regression in BEFORE option (#15693) 10 years ago
include_external_msproject 57e48f16f2 VS: Add Visual Studio 16 2019 generator 6 years ago
include_guard 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
install 170fcebf2e Merge topic 'install-code-script-genex' 7 years ago
interface_library 81868e6bad CUDA: Add cu as default source file extension 8 years ago
list 121a036f73 cmListCommand: handle empty lists for list(REMOVE_AT) 7 years ago
math 406f397e8b math: Restore toleration of unexpected characters in an expression 7 years ago
message 777e87ae00 Fix trivial typos in text 8 years ago
no_install_prefix 1c3918ff02 RunCMake: Remove unneeded files. 10 years ago
option f8a7cf85ad option: No CMP077 warnings when both cache and local variable exists 7 years ago
project b27247c8df project(): Add tests verifying variables set by second project() call 7 years ago
project_injected 6646771b0f project: Do not issue CMP0048 warnings on injected call 7 years ago
return d124c41168 return: Add test for returning inside a foreach loop 11 years ago
separate_arguments 2a207aaca1 separgs: Add a NATIVE_COMMAND mode 8 years ago
set d1b62185d6 Merge branch 'parent-scope-tests' into variable-pull-failure 11 years ago
set_property 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
string 514f0b572e Testing: Update hard-coded line numbers to [0-9]+ in some tests 7 years ago
target_compile_definitions 4babc9058a cmTargetPropCommandBase: check keywords after parsing 7 years ago
target_compile_features 4babc9058a cmTargetPropCommandBase: check keywords after parsing 7 years ago
target_compile_options 4babc9058a cmTargetPropCommandBase: check keywords after parsing 7 years ago
target_include_directories 4babc9058a cmTargetPropCommandBase: check keywords after parsing 7 years ago
target_link_directories 4babc9058a cmTargetPropCommandBase: check keywords after parsing 7 years ago
target_link_libraries 4201a11c2b Tests: add tests for empty-value keyword arguments in target_* 7 years ago
target_link_options 4babc9058a cmTargetPropCommandBase: check keywords after parsing 7 years ago
target_sources 4babc9058a cmTargetPropCommandBase: check keywords after parsing 7 years ago
test_include_dirs c267ea1c3e GENERATOR_IS_MULTI_CONFIG: Use for multi-config checks in Tests 8 years ago
try_compile 29f9db5c63 try_compile/try_run: Add support for LINK_OPTIONS option. 7 years ago
try_run 29f9db5c63 try_compile/try_run: Add support for LINK_OPTIONS option. 7 years ago
variable_watch 65198cfd0f variable_watch: trigger on variables set via PARENT_SCOPE 7 years ago
while 1afbe7d2cc Make error message of standalone endwhile command consistent 9 years ago
CMakeLists.txt 4568d046c4 Properties: Add CMAKE_ROLE global property 6 years ago
FileAPIDummyFile.cmake 42f0125ceb fileapi: Add test for cmakeFiles v1 7 years ago
README.rst b6eafd5781 Tests: Add RunCMake_TEST_FILTER environment variable 7 years ago
RunCMake.cmake b6eafd5781 Tests: Add RunCMake_TEST_FILTER environment variable 7 years ago
RunCTest.cmake d9195ab081 Tests: Teach run_ctest to handle removal of CTestConfig.cmake 7 years ago
exit_code.c d6051ca39e execute_process: Add option to get results of every child 8 years ago
print_stdin.c 86e8315482 CTest: Restore inheritance of stdin by test processes 7 years ago
pseudo_cppcheck.c 3b80cd77fb Fail the build if cppcheck returns a non-zero exit code 7 years ago
pseudo_cpplint.c 0618ddf6b1 Add properties to run the cpplint style checker with the compiler 8 years ago
pseudo_emulator.c d9fd2f5402 Revise C++ coding style using clang-format 9 years ago
pseudo_emulator_custom_command.c e7480d670b Fix custom command target substitution with CROSSCOMPILING_EMULATOR 9 years ago
pseudo_iwyu.c 44de615781 cmake: Comment why we ignore the include-what-you-use return code 9 years ago
pseudo_tidy.c 80ebc55a7c cmake: Report if the <LANG>_CLANG_TIDY tool exits with non-zero 9 years ago

README.rst

This directory contains tests that run CMake to configure a project
but do not actually build anything. To add a test:

1. Add a subdirectory named for the test, say ``/``.

2. In ``./CMakeLists.txt`` call ``add_RunCMake_test`` and pass the
test directory name ````.

3. Create script ``/RunCMakeTest.cmake`` in the directory containing::

include(RunCMake)
run_cmake(SubTest1)
...
run_cmake(SubTestN)

where ``SubTest1`` through ``SubTestN`` are sub-test names each
corresponding to an independent CMake run and project configuration.

One may also add calls of the form::

run_cmake_command(SubTestI ${CMAKE_COMMAND} ...)

to fully customize the test case command-line.

Alternatively, if the test is to cover running ``ctest -S`` then use::

include(RunCTest)
run_ctest(SubTest1)
...
run_ctest(SubTestN)

and create ``test.cmake.in``, ``CTestConfig.cmake.in``, and
``CMakeLists.txt.in`` files to be configured for each case.

4. Create file ``/CMakeLists.txt`` in the directory containing::

cmake_minimum_required(...)
project(${RunCMake_TEST} NONE) # or languages needed
include(${RunCMake_TEST}.cmake)

where ``${RunCMake_TEST}`` is literal. A value for ``RunCMake_TEST``
will be passed to CMake by the ``run_cmake`` macro when running each
sub-test.

5. Create a ``/.cmake`` file for each sub-test named
above containing the actual test code. Optionally create files
containing expected test results:

``-result.txt``
Regex matching expected process result, if not ``0``
``-stdout.txt``
Regex matching expected stdout content
``-stderr.txt``
Regex matching expected stderr content, if not ``^$``
``-check.cmake``
Custom result check.

Note that trailing newlines will be stripped from actual and expected
test output before matching against the stdout and stderr expressions.
The code in ``-check.cmake`` may use variables

``RunCMake_TEST_SOURCE_DIR``
Top of test source tree
``RunCMake_TEST_BINARY_DIR``
Top of test binary tree

and an failure must store a message in ``RunCMake_TEST_FAILED``.

To speed up local testing, you can choose to run only a subset of
``run_cmake()`` tests in a ``RunCMakeTest.cmake`` script by using the
``RunCMake_TEST_FILTER`` environment variable. If this variable is set,
it is treated as a regular expression, and any tests whose names don't
match the regular expression are not run. For example::

$ RunCMake_TEST_FILTER="^example" ctest -R '^RunCMake\.Example$'

This will only run subtests in ``RunCMake.Example`` that start with
``example``.