8ea7611b find_program: Optionally consider all names in each directory
fc1990c9 cmFindProgramCommand: Re-implement search using more flexible approach
fdbfc9f6 Tests: Add explicit testing for find_program
907a919b cmSystemTools: Drop unused StringEndsWith method
ed4de3c9 cmFindProgramCommand: Use Names member instead of passing it
bf32b95e cmFindLibraryCommand: Avoid repeating search for the same name
The test case added to RunCMake.set_property by commit 675ef165 (Allow
LINK_SEARCH_{START,END}_STATIC props to have default values, 2015-08-07)
is not a test of the set_property command and so belongs in its own test
case. Create a new RunCMake.LinkStatic test to cover cases related to
static linking.
While at it, simplify the LINK_SEARCH_STATIC test case to enable only C.
Previously this command was tested only implicitly as part of larger
tests. Add a RunCMake.find_program test to cover find_program cases
specifically and independently.
CPackConfig.cmake file generation from CMake test suite.
Currently it contains only a simple test without special
characters in variable value.
Test is not part of RunCMake/CPack as those tests are
expected to be run for a specified generator.
Refactoring in commit v3.3.0-rc1~76^2 (cmMakefile: Handle CMP0014 before
configuring the generator, 2015-05-14) accidentally left the file name
"/CMakeLists.txt" in the error message. Remove it and add a test case.
if(TEST TestNameThatExists) will return true if a test with the name
TestNameThatExists has been added with add_test. The syntax is similar
to if(TARGET TargetName). Since use of "TEST" as an argument to if()
could previously be interpreted as a non-keyword argument, add policy
CMP0064 to treat it as a keyword as NEW behavior.
Move failure cases from the CMake.{If,List,While,GetProperty} tests over
to the RunCMake.{if,list,while,get_property} tests to use the more
modern infrastructure. This also avoids using REGEX_ESCAPE_STRING to
try to regex-match full paths.
We use a special dedicated structure to store the LINK_LIBRARIES target
property. Do not try to construct a string from a NULL value. Instead
leave the property structure empty when no value is given.
Reported-by: Ghyslain Leclerc <ghleclerc@gmail.com>
Allow the `Swift` language to be enabled with the Xcode generator for
Xcode >= 6.1. Reject it on other generators and with older Xcode
versions. Since Apple is the only vendor implementing the language
right now, the compiler id can be just `Apple`.
Create target property WINDOWS_EXPORT_ALL_SYMBOLS to automatically
generate a module definition file from MS-compatible .obj files and give
it to the linker in order to export all symbols from the .dll part of a
SHARED library.
8bcec4d2 Help: Add notes for topic 'GNUInstallDirs-special-prefixes'
c8bd37ec GNUInstallDirs: Add special cases for certain prefixes
5f30f175 GNUInstallDirs: Add test cases
Add a RunCMake.GNUInstallDirs test with cases covering various install
prefixes. Hard-code the architecture information. Tolerate all
platform-specific LIBDIR values.
Currently the root prefix is not handled well, but verify the current
behavior in the test anyway. This can be addressed with a future
change.
Inspired-by: Alex Turbov <i.zaufi@gmail.com>
Move PARTIALLY_RELOCATABLE_WARNING test to the new common CPack test
script structure to have all tests in one place as well as additional
benefit of having some more checks done during test execution.
Create a <LANG>_COMPILER_LAUNCHER target property (initialized by a
CMAKE_<LANG>_COMPILER_LAUNCHER variable) to specify a compiler launcher
tool. This will supersede the CMAKE_<LANG>_COMPILER_ARG1 approach to
using such tools. The old approach set CMAKE_<LANG>_COMPILER to the
launcher tool while the new approach leaves this variable set to the
actual compiler.
Implement this property for Makefile and Ninja generators. It cannot be
implemented for VS or Xcode generators as the IDE build tools offer no
such hooks.
Enable languages only in the individual test case. Enable the test
everywhere except Visual Studio generators (which do not implement the
properties) and just set fake flags as needed to activate relevant code
paths. Drop unneeded CMAKE_SUPPRESS_REGENERATION which seems to have
been copied from an unrelated test when this test was created.
Create a <LANG>_INCLUDE_WHAT_YOU_USE target property (initialized by a
CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE variable) to specify an IWYU command
line to be run along with the compiler.
Use the KWSys Process "MergeOutput" option to give the child process
the same pipe (or file) for both stdout and stderr. This allows
natural merging of stdout and stderr together instead of merging
on arbitrary buffered read boundaries as before.
This reverts commit 242c3966 (add_custom_command: Diagnose
MAIN_DEPENDENCY limitation, 2015-03-09) and the follow up commit
b372a99a (UseSWIG: Do not use MAIN_DEPENDENCY on custom commands,
2015-03-26).
I misdiagnosed the underlying issue that prompted creation of policy CMP0057.
The actual issue surfaces when a single custom command's MAIN_DEPENDENCY
is listed in more than one target; this issue will have to be addressed
independently.
882f48e5 Link libraries by full path even in implicit directories
318cd370 Help: Add link target for Find Modules section of cmake-developer.7
1535dcd8 Tests: Teach RunCMake to optionally merge command output to stdout
When CMP0003 was first introduced we wanted to link all libraries by
full path. However, some projects had problems on platforms where
find_library would find /usr/lib/libfoo.so when the project really
wanted to link to /usr/lib/<arch>/libfoo.so and had been working by
accident because pre-CMP0003 behavior used -lfoo to link.
We first tried to address that in commit v2.6.0~440 (Teach find_library
to avoid returning library paths in system directories, 2008-01-23) by
returning just "foo" for libraries in implicit link directories. This
caused problems for projects expecting find_library to always return a
full path. We ended up using the solution in commit v2.6.0~366 (...
switch library paths found in implicit link directories to use -l,
2008-01-31). However, the special case for libraries in implicit link
directories has also proven problematic and confusing.
Introduce policy CMP0060 to switch to linking all libraries by full path
even if they are in implicit link directories. Explain in the policy
documentation the factors that led to the original approach and now to
this approach.
Add CROSSCOMPILING_EMULATOR target property for executables. This is used by
subsequent patches to run exectuables created for the target system when
crosscompiling. The property is initialized by the
CMAKE_CROSSCOMPILING_EMULATOR variable when defined.
Add policy CMP0059 to cover this change. The property has been
deprecated since CMake 2.4 anyway.
This will help clean up cmMakefile -- the DefineFlagsOrig member should
not need to exist.
bd9c7f9b Ninja: Add policy to require explicit custom command byproducts
ed8e30b0 cmGlobalNinjaGenerator: Optimize handling of known build outputs
ad094f43 cmGlobalNinjaGenerator: Fix spelling of "unknown"
82a37d3c cmGlobalNinjaGenerator: Drop unused member
Add policy CMP0058 to avoid generating 'phony' ninja rules for unknown
custom command dependencies. This requires projects to specify their
custom command byproducts explicitly. With this requirement we no
longer have to assume that unknown custom command dependencies are
generated and can instead simply assume they are source files expected
to exist when the build starts. This is particularly important in
in-source builds. It is also helpful for out-of-source builds to allow
Ninja to diagnose missing files before running custom command rules that
depend on them.
Implement a brand new FindMatlab module:
- Add support for versions and components.
- Find Matlab and its version in a more precise and multiplatform way.
- Add API to create a new mex extension with documentation.
- Add API to add matlab unit tests (with or without the unit test framework).
- Find as much as possible based on a single Matlab_ROOT_DIR cache entry
and allow the user to change it to re-find everything.
e2b9e7f7 Tests: Drop unnecessary stderr matching from RunCMake.ctest_memcheck
7ce9f6e2 Tests: Teach RunCMake to tolerate 'Error kstat returned' lines in test output
69de0f7e Tests: Teach RunCMake to tolerate Guard Malloc lines in test output
57f2aa7c Tests: Teach RunCMake to tolerate BullseyeCoverage lines in test output
b04c8ec3 Tests: Match curl error in RunCMake.ctest_submit FailDrop-* cases
1d82105e Tests: Rename RunCMake.{CTestMemcheck => ctest_memcheck}
d7662141 Tests: Rename RunCMake.{CTestSubmit => ctest_submit}
9b50388b Tests: Split RunCTest helper out of RunCMake.CTest(Submit|Memcheck)
76e7c22b Tests: Rename RunCMake.CTestMemcheck internals to match CTestSubmit