summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'FindPkgConfig_Extend-PKG_CONFIG_PATH'Brad King2014-03-171-0/+5
|\ | | | | | | | | 3df51470 FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926)
| * FindPkgConfig: Extend PKG_CONFIG_PATH using CMake variables (#12926)Daniele E. Domenichelli2014-03-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH cache and environment variables to extend PKG_CONFIG_PATH before calling pkg-config. In each of the path in these variables it searches for lib/pkgconfig. Then, depending on the system, it searches for lib/${CMAKE_LIBRARY_ARCHITECTURE}/pkgconfig (debian) or for lib64/pkgconfig (other 64 bit unixes). If any of these path is found, it is appended to the PKG_CONFIG_PATH enviromnent variable. Add two new arguments to the pkg_check_module and pkg_search_module macro, NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH. The new signature are therefore: pkg_check_modules(<PREFIX> [REQUIRED] [QUIET] [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH] <MODULE> [<MODULE>]*) pkg_search_module(<PREFIX> [REQUIRED] [QUIET] [NO_CMAKE_PATH] [NO_CMAKE_ENVIRONMENT_PATH] <MODULE> [<MODULE>]*) By default, if CMAKE_MINIMUM_REQUIRED_VERSION is 3.1 or later (in order to keep compatibility with the previous behavior), or if PKG_CONFIG_USE_CMAKE_PREFIX_PATH is set, the CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, and CMAKE_APPBUNDLE_PATH cache and environment variables will be added to pkgconfig search path. The NO_CMAKE_PATH and NO_CMAKE_ENVIRONMENT_PATH arguments disable this behavior for the cache variables and the environment variables, respectively, similarly to the find_package() command.
* | Test error cases in find_dependency.Stephen Kelly2014-03-111-0/+1
|/
* Merge topic 'test-external-cmake'Brad King2014-03-051-4/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | 9608ef6f Tests: Optionally configure tests exclusively, with an external CMake 9f5bd180 Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variables 76477267 Tests: Drop CMAKE_TEST_MAKEPROGRAM variable a8a9fb7e Tests: Rename CMAKE_TEST_MAKEPROGRAM uses for explicit make program 40475573 Tests: Rename CMAKE_TEST_MAKEPROGRAM uses for nested test projects f99734b2 Tests: Rename CMAKE_TEST_DEVENV -> CMake_TEST_DEVENV 3c01ee5a Tests: Drop CMAKE_TEST_MSVC and test MSVC directly daf0a5fe Tests: Drop CMAKE_TEST_GENERATOR and CMAKE_TEST_MAKEPROGRAM options e5096312 Tests: Drop kwsys test
| * Tests: Drop CMAKE_TEST_GENERATOR(|_TOOLSET) variablesBrad King2014-03-031-4/+4
| | | | | | | | s/CMAKE_TEST_GENERATOR/CMAKE_GENERATOR/g
* | FeatureSummary: Add unit testsDaniele E. Domenichelli2014-03-031-0/+1
|/
* add_custom_command: Disallow use of SOURCE signatures.Stephen Kelly2014-02-121-0/+1
| | | | Add CMP0050 to control this behavior.
* Add policy CMP0049 to avoid variable expansion in source listsStephen Kelly2014-02-121-0/+1
|
* project: Add optional LANGUAGES keywordBrad King2014-01-291-0/+1
| | | | | | | Teach the project() command to recognize an optional "LANGUAGES" keyword after the project name and prior to the list of languages. Do not allow multiple copies of the keyword. If the keyword is specified and no languages are listed, imply NONE.
* cmake: Improve '-E create_symlink' edge case handling (#14713)Brad King2014-01-201-0/+1
| | | | | | | | | | | | The logic added by commit ffc0b5e4 (Overwrite the symlink if it already exists, 2007-02-15) does not recognize and remove existing broken links before replacing them. Improve the logic to remove any existing destination file or link (but not directory). On failure, report an error message explaining why the existing path could not be removed or the new one could not be created. Add a RunCMake.CommandLine test to cover 'cmake -E' cases. Start with test cases covering 'cmake -E create_symlink' behavior on UNIX platforms.
* Tests/RunCMake: Move documentation to a README.rstBrad King2014-01-201-36/+1
|
* AddDependencies: new policy requires dependencies to existNils Gladitz2014-01-121-0/+1
| | | | | Added new policy CMP0046 which requires dependencies added by add_dependencies() to actually exist.
* Merge topic 'policies'Brad King2014-01-091-0/+2
|\ | | | | | | | | | | | | | | | | 73e9340 get_target_property: Error on non-existent target. ab9f58f FindQt4: Ensure target exists before calling get_target_property. 37ebeb9 FindQt4: Fix use of get_target_property to use actual target name. 6aabb6a Genex: Use case-sensitive comparison for COMPILER_ID. 5bb53f6 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
| * get_target_property: Error on non-existent target.Stephen Kelly2014-01-081-0/+1
| | | | | | | | Introduce policy CMP0045 to control this behavior.
| * cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.Stephen Kelly2014-01-081-0/+1
| |
* | Merge topic 'optional-install'Brad King2014-01-091-0/+2
|\ \ | |/ |/| | | | | be0458c InstallRules: added new variable to disable generation of install rules
| * InstallRules: added new variable to disable generation of install rulesNils Gladitz2014-01-081-0/+2
| | | | | | | | | | | | The boolean variable CMAKE_SKIP_INSTALL_RULES allows disabling generation of install rules for projects which don't want them.
* | OS X: Add CMP0042 to enable MACOSX_RPATH by defaultClinton Stimpson2014-01-021-0/+3
|/ | | | | Also adding documentation for CMAKE_MACOSX_RPATH, and improving documentation for MACOSX_RPATH.
* cmTarget: Require a compatible INTERFACE_AUTOUIC_OPTIONS from dependencies.Stephen Kelly2013-12-081-0/+3
| | | | | | | | | Revert the origin-tracking infrastructure from commit 98093c45 (QtAutoUic: Add INTERFACE_AUTOUIC_OPTIONS target property., 2013-11-20). Use the compatibility-tracking for compatible strings instead. If two different dependencies require different AUTOUIC_OPTIONS, cmake will now appropriately issue an error.
* Merge topic 'fix-export-segfault'Brad King2013-12-041-0/+1
|\ | | | | | | | | 1cd1430 export(): Check targets exist at configure-time (#14608)
| * export(): Check targets exist at configure-time (#14608)Stephen Kelly2013-12-041-0/+1
| | | | | | | | | | | | | | | | | | Commit 66b290e7 (export(): Process the export() command at generate time., 2012-10-06 ) refactored export() so that it could evaluate strings at generate-time. This was intended for evaluating target properties, but that commit also removed a check for target existence at configure-time. Restore that check and add a test for this case.
* | Export: Report error on relative include with genex.Stephen Kelly2013-11-261-0/+1
|/ | | | | | | | | | | | Diagnostics which check the sanity of exported include paths previously skipped over any path containing a generator expression. Introduce a policy to issue an error message in such cases. The export files created in the OLD behavior are not usable, because they contain relative paths or paths to the source or build location which are not suitable for use on installation. CMake will report an error on import.
* Add policy CMP0040 to disallow custom commands on missing targetsNils Gladitz2013-11-211-0/+1
|
* set: Add unit tests for set/unset PARENT_SCOPEDaniele E. Domenichelli2013-11-131-0/+1
| | | | | Create a RunCMake.set test to cover set() command cases, starting with PARENT_SCOPE.
* Enable RunCMake.CMP0037 test everywhereBrad King2013-11-111-3/+1
| | | | | | | | | | | Split the test cases covering spaces and colons into separate units. Run the space cases everywhere. Disable the colon cases where they are known to fail. This approach increases platform coverage for the test and makes the known-failure logic as local as possible. No Makefile generator on Windows can generate targets with ':' in their name because the CMakeFiles/<target>.dir directory cannot be created. Skip this part of the test on all Windows Make tools.
* Disallow linking to utility targets (#13902).Stephen Kelly2013-11-071-0/+1
|
* Disallow link-to-self (#13947).Stephen Kelly2013-11-071-0/+1
|
* Disallow invalid target names (#13140)Stephen Kelly2013-11-071-0/+3
| | | | | Exclude Borland and NMake from the CMP0037 test. They do not accept the colon in a target name.
* Allow disabling adding the install prefix to the prefix search path.Stephen Kelly2013-10-311-0/+1
| | | | | | | In certain scenarios, it is preferable to keep a 'dirty' install prefix than to clear it, and to expect that content will not be found there. Add a CMAKE_FIND_NO_INSTALL_PREFIX variable that can be set to disable searching the install prefix.
* Merge topic 'enable-language-require-compiler'Brad King2013-10-281-0/+1
|\ | | | | | | | | | | | | 3e04946 Require CMAKE_<LANG>_COMPILER to be found as a full path 6007f7c CMakeDetermineCompilerId: Always use compiler detected from IDE 332771c CMakeDetermine*Compiler: Remove temporary cache entry
| * Require CMAKE_<LANG>_COMPILER to be found as a full pathBrad King2013-10-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | All generators now support detection of the full path to the compiler, so require it to be so. This will allow CMake<LANG>Information.cmake and other logic to assume the full path to the compiler tool is available. The Makefile generators already rejected CMAKE_<LANG>_COMPILER values that did not name an existing compiler. Extend this error message to all generators, make it occur as early as possible, and improve the message with advice about how to set the compiler. If the full path to the compiler is not known, finish enabling languages with a fatal error so configuration does not continue. For now, allow the RC language compiler to not be a full path. Later we will need to detect the full path to "rc" under the VS IDE. Add a RunCMake.CompilerNotFound test to cover failure cases. Fix the RunCMake.CompilerChange test EmptyCompiler case to work when configuration does not continue past enable_language.
* | Drop compatibility with CMake < 2.4Brad King2013-10-231-0/+1
|/ | | | | | | | | | | | Drop all behavior activated by setting CMAKE_BACKWARDS_COMPATIBILITY to a value lower than 2.4, and generate an error when projects or the user attempt to do so. In the error suggest using a CMake 2.8.x release. Teach cmake_minimum_required to warn about projects that do not require at least CMake 2.4. They are not supported by CMake >= 3.0. Replace the documentation of CMAKE_BACKWARDS_COMPATIBILITY with a reference to policy CMP0001.
* Add infrastructure for policies that disallow commandsBrad King2013-10-221-0/+1
| | | | | | | | Add cmCommand::Disallowed helper to check the setting of a policy that disallows the command. Add a RunCMake.DisallowedCommands test placeholder. Add a Help/policy/DISALLOWED_COMMAND.txt file for inclusion by each policy document to avoid duplication of the common text.
* Merge topic 'string-CONCAT-command'Brad King2013-10-221-0/+1
|\ | | | | | | | | 4e184a2 string: Add CONCAT sub-command
| * string: Add CONCAT sub-commandBrad King2013-10-211-0/+1
| | | | | | | | | | | | Add a string(CONCAT) command to simply concatenate input arguments together. This will be useful for combining strings from different quoting syntaxes. Add a RunCMake.string test covering these cases.
* | Consider targets with double colons to be IMPORTED or ALIAS targets.Stephen Kelly2013-10-211-0/+1
|/ | | | | | | | Introduce a policy to control the behavior. The AliasTargets unit test already tests that using a double-semicolon in the name is not an error. Change the ExportImport test to use a namespace with a double-semicolon too.
* Handle genexes when evaluating INTERFACE_INCLUDE_DIRECTORIES errors.Stephen Kelly2013-10-181-0/+1
|
* cmTarget: Deprecate the LOCATION target property with a policy.Stephen Kelly2013-10-111-0/+1
| | | | | | | | | | | | The final location and name of a build-target is not determined until generate-time. However, reading the LOCATION property from a target is currently allowed at configure time. Apart from creating possibly-erroneous results, this has an impact on the implementation of cmake itself, and prevents some major cleanups from being made. Disallow reading LOCATION from build-targets with a policy. Port some existing uses of it in CMake itself to use the TARGET_FILE generator expression.
* message: Add a DEPRECATION modeStephen Kelly2013-10-081-0/+1
| | | | | | By default, the message is not issued. If CMAKE_ERROR_DEPRECATED is on, the message is fatal. If CMAKE_WARN_DEPRECATED is on, the message is a warning.
* Merge topic 'INTERFACE_LIBRARY-target-type'Brad King2013-10-081-0/+1
|\ | | | | | | | | | | | | ce0c303 install: Teach EXPORT option to handle INTERFACE_LIBRARY targets 435c912 export: Add support for INTERFACE_LIBRARY targets fe73226 Add the INTERFACE_LIBRARY target type.
| * Add the INTERFACE_LIBRARY target type.Stephen Kelly2013-10-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This target type only contains INTERFACE_* properties, so it can be used as a structural node. The target-specific commands enforce that they may only be used with the INTERFACE keyword when used with INTERFACE_LIBRARY targets. The old-style target properties matching LINK_INTERFACE_LIBRARIES_<CONFIG> are always ignored for this target type. The name of the INTERFACE_LIBRARY must match a validity generator expression. The validity is similar to that of an ALIAS target, but with the additional restriction that it may not contain double colons. Double colons will carry the meaning of IMPORTED or ALIAS targets in CMake 2.8.13. An ALIAS target may be created for an INTERFACE library. At this point it can not be exported and does not appear in the buildsystem and project files are not created for them. That may be added as a feature in a later commit. The generators need some changes to handle the INTERFACE_LIBRARY targets returned by cmComputeLinkInterface::GetItems. The Ninja generator does not use that API, so it doesn't require changes related to that.
* | CheckStructHasMember: Add support for C++Daniele E. Domenichelli2013-10-081-0/+1
|/ | | | | | | | | | | | | | Previously if headers required to check if a struct has a member can be compiled with C++ compiler only, the check would fail because the C compiler fails. As a consequence, the result variable would be set to false, even if the struct has that particular member. Teach CHECK_STRUCT_HAS_MEMBER to accept a new optional argument LANGUAGE that allows one to explicitly set the compiler to use. The new signature is therefore: CHECK_STRUCT_HAS_MEMBER (<struct> <member> <header> <variable> [LANGUAGE <language>])
* Add RunCMake.Syntax test to cover argument parsingBrad King2013-08-081-0/+1
| | | | | | | Test basic unquoted and quoted argument parsing cases including failure on an unterminated string and an unterminated command invocation. Also cover arguments not separated by any spaces, which is accidentally allowed by the current parser.
* Add the ALIAS target concept for libraries and executables.Stephen Kelly2013-08-021-0/+1
| | | | | | | | | | | | | | | | | * The ALIAS name must match a validity regex. * Executables and libraries may be aliased. * An ALIAS acts immutable. It can not be used as the lhs of target_link_libraries or other commands. * An ALIAS can be used with add_custom_command, add_custom_target, and add_test in the same way regular targets can. * The target of an ALIAS can be retrieved with the ALIASED_TARGET target property. * An ALIAS does not appear in the generated buildsystem. It is kept separate from cmMakefile::Targets for that reason. * A target may have multiple aliases. * An ALIAS target may not itself have an alias. * An IMPORTED target may not have an alias. * An ALIAS may not be exported or imported.
* Merge topic 'dev/export-target-without-language'Brad King2013-07-251-0/+1
|\ | | | | | | | | 5837f19 export: Error when exporting a target without a language
| * export: Error when exporting a target without a languageBen Boeckel2013-07-251-0/+1
| | | | | | | | | | | | | | | | First, it prevents a NULL dereference and second it reiterates that targets without languages are not supported by CMake. Add a RunCMake.ExportWithoutLanguage test exporting a library without a languages.
* | Merge topic 'doc-RunCMake-strips-expected'Brad King2013-07-251-1/+1
|\ \ | |/ |/| | | | | c80a4f9 Tests/RunCMake: Document stripping of expected output
| * Tests/RunCMake: Document stripping of expected outputBen Boeckel2013-07-251-1/+1
| | | | | | | | | | Document that trailing newlines are stripped from the -stdout.txt and -stderr.txt content before using as a regular expression.
* | target_link_libraries: Add PUBLIC/PRIVATE/INTERFACE keyword signatureStephen Kelly2013-07-241-0/+1
|/ | | | | | | Add a new signature to help populate INTERFACE_LINK_LIBRARIES and LINK_LIBRARIES cleanly in a single call. Add policy CMP0023 to control whether the keyword signatures can be mixed with uses of the plain signatures on the same target.
* Merge topic 'obsolete-qt4-macros'Brad King2013-07-161-0/+4
|\ | | | | | | | | cb7f32f Mark qt4_use_modules and qt4_automoc as obsolete.