summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
Commit message (Collapse)AuthorAgeFilesLines
* Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548)Brad King2013-11-181-2/+2
| | | | | | | | | | | | | Historically these were both added for the Makefile and Visual Studio generators, respectively. Later the VS generators started using the CMAKE_MAKE_PROGRAM cache entry to find the IDE build tool, and the CMAKE_BUILD_TOOL was simply set as an alias. Fix the documentation to explain that CMAKE_MAKE_PROGRAM is the modern variable and that CMAKE_BUILD_TOOL is the compatibility alias, not the other way around. Replace uses of CMAKE_BUILD_TOOL with CMAKE_MAKE_PROGRAM in CMake-provided modules. Nothing needs to lookup CMAKE_BUILD_TOOL in the cache, so simply set it as a normal variable.
* build_command: Return a "cmake --build" command-lineBrad King2013-11-154-10/+12
| | | | | | | | | | | | | | Re-implement the build_command() command to use "cmake --build" instead of generating a native build tool invocation directly. This command will internally invoke the proper native build tool. This avoids requiring cmGlobalGenerator::GenerateBuildCommand to produce a string so that it can be later refactored to produce a vector with no quoting or escaping. It will also allow us to later teach CMake to delay the decision about which build tool to invoke until after the project build system is generated to disk. For example, on Visual Studio 10 and above the preferred command-line tool is MSBuild, but we need to fall back to devenv if the .sln has Intel Fortran .vfproj files.
* Merge topic 'set_emptyvar_PARENT_SCOPE'Brad King2013-11-145-0/+41
|\ | | | | | | | | | | | | bf755c7 set: Add unit tests for set/unset PARENT_SCOPE bc280f1 set: Fix handling of empty value with PARENT_SCOPE 20afbd5 set: Handle value-less PARENT_SCOPE explicitly
| * set: Add unit tests for set/unset PARENT_SCOPEDaniele E. Domenichelli2013-11-135-0/+41
| | | | | | | | | | Create a RunCMake.set test to cover set() command cases, starting with PARENT_SCOPE.
* | Merge topic 'configure_file-drop-IMMEDIATE'Brad King2013-11-141-2/+2
|\ \ | | | | | | | | | | | | 15610bb Drop use of configure_file IMMEDIATE option
| * | Drop use of configure_file IMMEDIATE optionDaniele E. Domenichelli2013-11-131-2/+2
| |/ | | | | | | | | | | Since commit 7d47c693 (Drop compatibility with CMake < 2.4, 2013-10-08) we no longer need to use the configure_file IMMEDIATE option to support compatibility modes less than 2.0.
* | ExternalData: Allow local stores without any URL templatesBrad King2013-11-133-1/+5
| | | | | | | | | | | | | | | | | | Allow ExternalData_URL_TEMPLATES to be empty if a value for ExternalData_OBJECT_STORES is provided. Assume in this use case that the object stores will already contain all needed objects. Extend the Module.ExternalData test to cover this case (all objects in stores). Extend the RunCMake.ExternalData test to cover the non-failure message case when stores are provided without URL templates.
* | Merge topic 'policy-summary-periods'Brad King2013-11-132-2/+2
|\ \ | | | | | | | | | | | | | | | 49cbca6 CMP0038: Add missing '.' to policy summary line 7390002 CMP0039: Add missing '.' to policy summary line
| * | CMP0039: Add missing '.' to policy summary lineDaniele E. Domenichelli2013-11-122-2/+2
| | |
* | | Merge topic 'fix-INTERFACE-with-no-SHARED-libs'Brad King2013-11-133-0/+7
|\ \ \ | |_|/ |/| | | | | | | | 64f73b0 add_library: Fix INTERFACE on platforms with no shared libs (#14561)
| * | add_library: Fix INTERFACE on platforms with no shared libs (#14561)Stephen Kelly2013-11-123-0/+7
| |/
* | Merge topic 'test-RunCMake.CMP0037-everywhere'Brad King2013-11-1219-92/+99
|\ \ | |/ |/| | | | | 8c6c1f1 Enable RunCMake.CMP0037 test everywhere
| * Enable RunCMake.CMP0037 test everywhereBrad King2013-11-1119-92/+99
| | | | | | | | | | | | | | | | | | | | | | 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.
* | Merge topic 'test-LINK_ONLY-expression'Brad King2013-11-084-5/+17
|\ \ | |/ |/| | | | | 53b10fd Genex: Add a test for the LINK_ONLY expression.
| * Genex: Add a test for the LINK_ONLY expression.Stephen Kelly2013-11-064-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 239b0c6b (Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES., 2013-10-20) extended a test which excercised the logic of the LINK_ONLY generator expression. Commit ef10b87c (CMP0022: Plain target_link_libraries must populate link interface, 2013-11-02) removed the instance of LINK_ONLY which was excercised by that test. Add a new test which excercises the other instance of LINK_ONLY by setting the CMP0022 policy to NEW and consuming the contents of the INTERFACE_LINK_LIBRARIES target property.
* | Disallow linking to utility targets (#13902).Stephen Kelly2013-11-0712-0/+51
| |
* | Disallow link-to-self (#13947).Stephen Kelly2013-11-0713-0/+44
| |
* | Disallow invalid target names (#13140)Stephen Kelly2013-11-0713-0/+121
|/ | | | | Exclude Borland and NMake from the CMP0037 test. They do not accept the colon in a target name.
* Merge branch 'policy-CMP0022-fixes' into policy-CMP0022-fixes-for-masterBrad King2013-11-0313-12/+50
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolve conflict in Source/cmTarget.cxx by integrating the changes to the internal copy constructor from both sides. Also resolve a logical conflict by dropping the special case for INTERFACE_LIBRARY targets. Since cmTarget::SetMakefile already forces CMP0022 to NEW for such targets we need no special handling. Resolve conflict in Source/cmTargetLinkLibrariesCommand.h by dropping the documentation change. We will make the same change in the new location of the same documentation in a separate commit. Resolve conflicts in Tests/RunCMake/CMP0022/CMP0022-WARN-empty-old-stderr.txt Tests/RunCMake/CMP0022/RunCMakeTest.cmake by taking the side from the 'policy-CMP0022-fixes' branch.
| * CMP0022: Warn about a given target at most onceBrad King2013-11-036-1/+16
| | | | | | | | | | | | | | | | | | | | | | Since cmTarget::ComputeLinkInterface is called separately for each "head" target that links a target, the warning we produce when CMP0022 is not set could be repeated. Add explicit logic to allow the warning to appear at most once. Multiple copies of the warning for the same target are almost always identical and therefore redundant. In the rare case that two copies of the warning are different, the second can appear in a future run after the first is fixed.
| * Do not export INTERFACE_LINK_LIBRARIES from non-linkable targetsBrad King2013-11-023-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When cmExportFileGenerator::SetImportLinkInterface exports the old LINK_INTERFACE_LIBRARIES property values it skips doing so for non-linkable targets because target->GetLinkInterface returns NULL for such targets. Since cmExportFileGenerator::PopulateInterfaceLinkLibrariesProperty looks at the INTERFACE_LINK_LIBRARIES property directly instead of using the computed link interface, teach it to skip exporting the property if target->IsLinkable returns false. Extend the RunCMake.CMP0022 test with a case covering this. Simply export an executable target that links to a library that is not exported.
| * CMP0022: Plain target_link_libraries must populate link interfaceBrad King2013-11-027-11/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CMP0022 NEW behavior is that the INTERFACE_LINK_LIBRARIES property exactly defines the link interface. The plain target_link_libraries signature says linking is transitive by default, so it should populate the property. Teach the target_link_libraries plain signature to populate the INTERFACE_LINK_LIBRARIES regardless of the CMP0022 setting. Refactor the cmTarget::ComputeLinkInterface checks that warn when the policy is not set to compare the new property to either the explicitly set old link interface properties or the link implementation fallback for all linkable target types, not just static libraries. This fixes a regression in 2.8.12.0 that caused target_link_libraries to not implement transitive linking in the plain signature once the policy CMP0022 is set to NEW.
| * CMP0022: Add unit test for null pointer check and message.Stephen Kelly2013-11-024-0/+29
| |
| * Merge branch 'output-CMP0022-entries' into policy-CMP0022-fixesBrad King2013-11-021-0/+9
| |\
* | \ Merge topic 'object-library-no-TARGET_FILE'Brad King2013-11-025-0/+35
|\ \ \ | | | | | | | | | | | | | | | | d960589 Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)
| * | | Genex: Reject $<TARGET_FILE:...> for object libraries (#14532)Brad King2013-11-015-0/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the cmGeneratorExpressionEvaluator filesystem artifact logic to reject OBJECT_LIBRARY targets since they have no main artifact. Without the explicit rejection evaluation falls through to an internal CMake error message in cmTarget::GetOutputInfo. Extend the RunCMake.GeneratorExpression test to cover these cases.
* | | | Merge topic 'object-library-missing-source'Brad King2013-11-024-0/+12
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | 5a2fc3d Check for OBJECT_LIBRARY source files at start of generation
| * | | | Check for OBJECT_LIBRARY source files at start of generationBrad King2013-11-014-0/+12
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | Teach cmGlobalGenerator::CheckTargets to include OBJECT_LIBRARY targets in the check for source file existence. Extend the RunCMake.ObjectLibrary test to cover this case.
* | | | Merge topic 'add-CMAKE_FIND_NO_INSTALL_PREFIX'Brad King2013-11-0110-0/+46
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | fe057ab Allow disabling adding the install prefix to the prefix search path.
| * | | | Allow disabling adding the install prefix to the prefix search path.Stephen Kelly2013-10-3110-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Test foreach/function/macro handling of bracket argumentsBrad King2013-10-307-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bracket arguments recorded in command invocations inside foreach, function, and macro blocks should not have any replacements done when the arguments are replayed later. Teach the RunCMake.Syntax test to cover these cases.
* | | | | Add to RunCMake.Syntax test \-escape casesBrad King2013-10-293-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an Escape1 test case covering \-escape cases inside bracket, quoted, and unquoted arguments. Also cover comments immediately after quoted and unquoted arguments on lines containing \# escapes.
* | | | | Add to RunCMake.Syntax test comments not separated by spacesBrad King2013-10-291-0/+5
|/ / / / | | | | | | | | | | | | | | | | Extend the BracketComment5 test case to cover both bracket comments and line comments starting immediately after a bracket comment closes.
* | | | Merge topic 'enable-language-require-compiler'Brad King2013-10-2824-4/+124
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2824-4/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | Merge topic 'handle-CMP0024-in-tests'Brad King2013-10-263-17/+0
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 310aef9 Make ExportLanguages a subtest of the ObjectLibrary test 30ff6cf Refactor the Plugin test.
| * | | | | Make ExportLanguages a subtest of the ObjectLibrary testStephen Kelly2013-10-243-17/+0
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | It was a subtest of the RunCMake.ObjectLibrary test. However, we need to test a build with ExternalProject after running CMake, which RunCMake tests do not do.
* | | | | Merge topic 'remove-pre-2.4-compatibility'Brad King2013-10-2611-0/+32
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 7d47c69 Drop compatibility with CMake < 2.4 c7c44fc CTestTest*: Update minimum required CMake to 2.4
| * | | | | Drop compatibility with CMake < 2.4Brad King2013-10-2311-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | Merge topic 'fix-tll-static-private'Brad King2013-10-261-1/+5
|\ \ \ \ \ \ | | |_|_|/ / | |/| | | | | | | | | | | | | | | | 239b0c6 Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.
| * | | | | Don't add invalid content to static lib INTERFACE_LINK_LIBRARIES.Stephen Kelly2013-10-261-1/+5
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only valid target names or generator expressions may appear in the target field of a LINK_ONLY expression. Other content like link flags should still be added to that property (wrapped in config-specific generator expressions), but not wrapped in LINK_ONLY. Otherwise undue warnings would be issued for the policy CMP0022. The LINK_ONLY expression only has an effect for actual target names anyway, so there is no logical deficit.
* | | | | Merge topic 'remove-old-commands-by-policy'Brad King2013-10-261-1/+1
|\ \ \ \ \ | |_|_|/ / |/| | | | | | | | | | | | | | 4ea27bc Cygwin: Avoid legacy warnings in RunCMake.DisallowedCommands test
| * | | | Cygwin: Avoid legacy warnings in RunCMake.DisallowedCommands testBrad King2013-10-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set the minimum required version of CMake high enough to avoid the warning for CMAKE_LEGACY_CYGWIN_WIN32. The warning appears on stderr and breaks the expected output matching.
* | | | | Add \-continuation to CMake language quoted argumentsBrad King2013-10-2310-0/+26
| |_|/ / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Teach the CMake language lexer to treat the \-LF pair terminating a line ending in an odd number of backslashes inside a quoted argument as a continuation. Drop the pair from the returned quoted argument token text. This will allow long lines inside quoted argument strings to be divided across multiple lines in the source file. It will also allow quoted argument text to start on the line after the opening quote. For example, the code: set(x "\ ...") sets variable "x" to the value "..." with no opening newline. Previously an odd number of backslashes at the end of a line inside a quoted argument would put a \-LF pair (or a \-CR pair) literally in the argument. Then the command-argument evaluator would complain that the \-escape sequence is invalid. Therefore this syntax is available to use without changing behavior of valid existing code. Teach the RunCMake.Syntax test to cover cases of quoted arguments with lines ending in \, \\, and \\\. Odd counts are continuations.
* | | | Merge topic 'output-CMP0022-entries'Brad King2013-10-231-0/+9
|\ \ \ \ | | |_|/ | |/| | | | | | | | | | 0b3b336 CMP0022: Output link interface mismatch for static library warning
| * | | CMP0022: Output link interface mismatch for static library warningStephen Kelly2013-10-231-0/+9
| | |/ | |/| | | | | | | | | | | | | Other warnings for the same policy already have similar output since commit 81d2793e (Add differing target property content to policy CMP0022 warning, 2013-09-11).
* | | Merge topic 'remove-old-commands-by-policy'Brad King2013-10-2373-0/+234
|\ \ \ | | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6c91944 Add policy CMP0036 to disallow build_name 3969bb2 Add policy CMP0035 to disallow variable_requires 178b9af Add policy CMP0034 to disallow utility_source 248d1dc Add policy CMP0033 to disallow export_library_dependencies 6865c8f Add policy CMP0032 to disallow output_required_files aa76518 Add policy CMP0031 to disallow load_command 97268cf Add policy CMP0030 to disallow use_mangled_mesa 9f64fbf Add policy CMP0029 to disallow subdir_depends 882c0f0 Add infrastructure for policies that disallow commands
| * | Add policy CMP0036 to disallow build_nameBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0035 to disallow variable_requiresBrad King2013-10-2210-0/+29
| | |
| * | Add policy CMP0034 to disallow utility_sourceBrad King2013-10-2210-0/+29
| | |