Commit Graph

30929 Commits

Author SHA1 Message Date
Kolan Sh 96f7238ccc Merge remote-tracking branch 'origin/maint' 2016-04-18 00:36:26 +03:00
Brad King 80bcbe2d85 CMake 3.5.2 2016-04-15 08:48:23 -04:00
Brad King 9729dfb765 Merge branch 'ninja-restat-custom-command-byproducts' into release 2016-04-05 16:27:08 -04:00
Brad King add7abc835 Ninja: Restat custom command byproducts even with a SYMBOLIC output (#16049)
The change in commit v3.5.0-rc1~198^2 (Ninja: Always re-run custom
commands that have symbolic dependencies, 2015-11-19) broke the
byproducts feature added by commit v3.2.0-rc1~340^2~2 (Add an option for
explicit BYPRODUCTS of custom commands, 2014-11-13) when SYMBOLIC
outputs also appear.  This case occurs with AUTORCC-generated custom
targets because the output is SYMBOLIC (to always run) and the generated
file is a byproduct (for restat so dependents do not run unnecessarily).

The two use cases conflict because Ninja does not support per-output
restat.  Favor restat whenever byproducts are present because it is
required for byproducts to work correctly.  In use cases where we want
an always-run chain we simply will not be able to also use byproducts.
2016-04-05 16:20:28 -04:00
Brad King ff805113c7 Ninja: Fix detection of custom command symbolic outputs
Fix logic introduced by commit v3.5.0-rc1~198^2 (Ninja: Always re-run
custom commands that have symbolic dependencies, 2015-11-19) to not
consider only the last output.  We need to know if any output is
SYMBOLIC, so stop checking as soon as one is found.
2016-04-05 16:19:52 -04:00
Brad King 4ffd85cfb5 Merge branch 'fortran-line-directives-no-dirs' into release 2016-04-05 12:59:57 -04:00
Brad King f831d752ae cmFortranParser: Skip #line directives that do not name files
Since commit v3.5.0-rc1~241^2~1 (cmFortranParser: Parse #line
directives, 2015-11-02) our Fortran dependency scanner parses `#line`
directives to extract the named files.  However, some compilers produce
`#line` directives that name directories instead of files.  Work around
such cases by verifying that the extracted path names a file and not a
directory.
2016-04-05 12:59:45 -04:00
Brad King dff812cfcd Merge branch 'FindGSL-doc-typo' into release 2016-04-05 09:52:55 -04:00
Pierrick Koch 2308764b47 FindGSL: Fix typo in documentation
s/GSL_CLBAS_LIBRARY/GSL_CBLAS_LIBRARY/
2016-04-05 09:52:43 -04:00
Brad King 58a57105d0 Merge branch 'fix-target-alias-in-subdir' into release 2016-04-01 15:47:03 -04:00
Brad King 0e44f4894f Rename local target lookup methods to clarify purpose
Rename methods:

* `cmMakefile::Find{ => LocalNonAlias}Target`
* `cmLocalGenerator::Find{ => LocalNonAlias}GeneratorTarget`

These names clarify that they are for directory-local target names
and do not consider alias targets.
2016-04-01 15:44:16 -04:00
Brad King bc30f8b5e6 Fix lookup of an ALIAS target outside aliased target's directory (#16044)
Refactoring in commit v3.5.0-rc1~272^2~11 (cmTarget: Implement ALIAS in
terms of name mapping, 2015-10-25) accidentally introduced logic that
assumes ALIAS targets always reference targets in their own directory.
Fix this and add a test case.

The configure-step fix is that `cmMakefile::FindTarget` should not consider
aliases.  The purpose of this method is just to look up targets local to
a directory.  Since ALIAS and normal targets share a namespace we know a
locally defined target will never collide with an ALIAS target anyway.
The method has 3 call sites, and this change is safe for all of them:

* `cmInstallCommand::HandleTargetsMode`: Rejects aliases before the call.
* `cmFLTKWrapUICommand::FinalPass`: Should never have considered aliases.
* `cmMakefile::FindTargetToUse`: Falls back to a global lookup anyway.

The generate-step fix is that `cmLocalGenerator::FindGeneratorTarget`
should not consider aliases.  This method is the generate-step
equivalent to the above.  The method has 2 call sites, and this change
is safe for both of them:

* `cmInstallTargetGenerator::Compute`: Never uses an alias target name.
* `cmLocalGenerator::FindGeneratorTargetToUse`: Falls back to global lookup.

Reported-by: Matteo Settenvini <matteo@member.fsf.org>
2016-04-01 15:44:16 -04:00
Brad King 8f8a0bfbf5 Merge branch 'backport-asm-includes' into release 2016-03-31 13:23:16 -04:00
Gregor Jasny 677c091b81 ASM: Add missing <INCLUDES> placeholder for "compile" rules
This placeholder was added to the compilation rules for other languages
by commit v3.4.0-rc1~342^2 (Factor an <INCLUDES> placeholder out of
<FLAGS> in rule variables, 2015-07-13) but ASM was incorrectly left out.

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2016-03-31 13:22:46 -04:00
Brad King 8fdb2c5a5d Merge branch 'xcode73-xctest-location' into release 2016-03-28 09:24:18 -04:00
Gregor Jasny a364d2513a Xcode: Fixup XCTest bundle location for Xcode 7.3
Prior to Xcode 7.3 a XCTest bundle was built like an ordinary
bundle. But starting with Xcode 7.3 it is implicitely built as
a plugin for the test host. It looks like in that case the
'Build Products Path' is ignored.

This patch simply sets the CMake target output path to the value
Xcode expects internally to get a matching view of both.

The command:

  xcodebuild -showBuildSettings -target CocoaExampleTests -configuration Debug

Output with Xcode 7.2:

  TARGET_BUILD_DIR = .../Tests/XCTest/Debug

Output with Xcode 7.3

  TARGET_BUILD_DIR = .../Tests/XCTest/Debug/CocoaExample.app/Contents/PlugIns

Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
2016-03-28 09:23:35 -04:00
Kolan Sh 153fe7367c Merge remote-tracking branch 'origin/maint' 2016-03-25 01:51:24 +03:00
Brad King 64130a7e79 CMake 3.5.1 2016-03-24 09:56:42 -04:00
Brad King 277b7567f7 Merge branch 'fix-variable_watch-reallocation' into release 2016-03-23 16:18:08 -04:00
Yves Frederix c610402825 Avoid occasional use-after-free when a variable watch is executed
Re-lookup a variable value when an associated VariableWatch is executed
in cmMakefile::GetDefinition.

This fixes a problem with 'def' sometimes becoming invalid due to memory
reallocation inside an std::vector. In this case, the problem was that
if the call to VariableAccessed actually executed a callback function,
the internal state of the makefile has changed due to the associated
function scope being pushed. This in turn implies that a new
cmDefinitions instance was pushed in cmMakefile::VarTree. As
cmLinkedTree is based on an std::vector, this push can have triggered
reallocation of its internal memory buffer. However, as the value of
'def', which was computed on method entry, actually points to a property
of one of the cmDefinitions instances in cmMakefile::VarTree,
reallocation can invalidate the value of 'def' so that it cannot simply
be returned at the end of the function. The solution implemented here is
to simply lookup the value of 'def' again.
2016-03-23 16:17:36 -04:00
Brad King f77ad2c736 Merge branch 'FindCUDA-verbatim' into release 2016-03-22 11:36:45 -04:00
Brad King 72a97b7a76 FindCUDA: Fix regression in separate compilation (#16027)
Since commit v3.5.0-rc1~47^2 (FindCUDA: Support special characters in
path, 2016-01-15) our add_custom_command calls use VERBATIM so that
CMake will automatically quote special characters correctly.  Fix the
separate compilation code path to not add its own quoting when the
VERBATIM option will be used.
2016-03-22 11:05:02 -04:00
Brad King 2c3b8a1cd8 Merge branch 'fix-repeat-pkg-config' into release 2016-03-21 09:08:25 -04:00
Ben Boeckel 6f4f905483 FindPkgConfig: set correctly named variables in cache (#15903)
The fix in commit v3.5.0-rc1~27^2 (FindPkgConfig: set standard variables
in the cache, 2016-01-20) added the wrong variable name to the cache.
The test was only testing that the cache variable existed, not that it
also had the correct value.  Update the test to ensure that the cache
value matches the local variable value.

Reported-by: Bernd Lörwald
2016-03-21 08:58:12 -04:00
Brad King d9857c8457 Merge branch 'cpack-osx-optional-CoreServices' into release 2016-03-18 11:15:15 -04:00
Brad King d84ba668d7 CPack: Avoid using OS X CoreServices if compiler fails on header (#16021)
Some compilers on OS X report errors in the CoreServices framework headers.
Check for support of the header ahead of time and compile the relevant code
only when the header is available.
2016-03-18 11:12:51 -04:00
Brad King 1b034123e7 Merge branch 'cmake-gui-osx-identifier' into release 2016-03-17 16:30:00 -04:00
Brad King 7b990e82c5 cmake-gui: Populate CFBundleIdentifier in our Info.plist file (#16023) 2016-03-17 16:07:39 -04:00
Brad King 15a5653ea6 Merge branch 'cpack-osx-no-carbon' into release 2016-03-17 14:49:35 -04:00
Sean McBride c718070c08 CPack: Avoid requiring Carbon framework on OS X (#16021)
In commit v3.5.0-rc1~232^2 (CPackDMG: Add support for multilingual SLAs,
2015-10-19) we added use of the Carbon framework in order to get access
to its APIs to convert Script Manager RegionCode values.  This is not
necessary.  Instead we can use CoreServices.

While at it, replace individual CoreFoundation includes with including
the entire framework, which is the correct way.
2016-03-17 13:53:51 -04:00
Brad King 4ea249a387 Merge branch 'ios-install-combined-one-arch' into release 2016-03-15 10:11:27 -04:00
Ruslan Baratov e3fc2899c8 Fix iOS combined feature for single architecture targets
If list of valid target architectures is empty for given SDK then there will
be no VALID_ARCHS build setting returned by Xcode. Return "" (empty string)
explicitly in this case. This may happens if CMAKE_IOS_INSTALL_COMBINED is ON
but only one architecture used in target.
2016-03-15 10:09:50 -04:00
Brad King 44bbd2a65c Merge branch 'FindBoost-optional-indirect-depends' into release 2016-03-15 10:00:26 -04:00
Roger Leigh e2f387fabb FindBoost: Tolerate missing indirect dependencies (#16013)
Depending upon the configuration, certain components may or may not
be installed, for example Boost.Regex, but other components may
still have header dependencies upon these components which will
obviously fail to work.  Since we can't make a sensible
determination with the hardcoded dependency information, we
choose to interpret these dependencies less strictly.
2016-03-15 09:54:58 -04:00
Kolan Sh d64b37b168 Merge remote-tracking branch 'origin/maint' 2016-03-12 02:00:13 +03:00
Brad King b369959eb5 CMake 3.5.0 2016-03-08 08:44:49 -05:00
Brad King 0e02c69170 Merge branch 'doc-find-python-call-order' into release 2016-03-07 11:03:50 -05:00
Brad King 743f2a8031 FindPython{Interp,Libs}: Clarify recommended call order
Improve wording in our advice about how to call both of these modules.
2016-03-07 10:56:31 -05:00
Brad King 15a4afe47a Merge branch 'vs14-debug-enum-older-toolsets' into release 2016-03-07 10:09:33 -05:00
Brad King 3aa6fea69c VS: Fix VS 2015 .vcxproj debug setting for older toolsets (#15986)
Since commit v3.4.2~2^2 (VS: Fix VS 2015 .vcxproj file value for
GenerateDebugInformation, 2016-01-08) we generate invalid project
files for the v110 and v120 toolsets.  VS complains:

    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(639,9):
    error MSB4030: "Debug" is an invalid value for the "GenerateDebugInformation" parameter of
    the "Link" task. The "GenerateDebugInformation" parameter is of type "System.Boolean".

This reveals that our VS flag map selection should be based on the
toolset instead of the version of VS.  However, that will be a
non-trivial change so for now fix this particular use case by
hard-coding a correction to the flag map.

Reported-by: Gregor Jasny <gjasny@googlemail.com>
2016-03-07 10:09:09 -05:00
Brad King 6e6f4d8f80 Merge branch 'doc-typos' into release 2016-02-24 10:13:45 -05:00
Ashley Whetter 33507e2aa7 Help: Fix typos in cmake-packages.7 manual 2016-02-24 10:05:24 -05:00
Brad King c8d5db90b6 Merge branch 'doc-cmake-E-details' into release 2016-02-19 13:06:38 -05:00
Bartosz Kosiorek b347503028 Help: Clarify `cmake -E` command behavior with respect to file existence 2016-02-19 13:03:09 -05:00
Brad King d203761520 CMake 3.5.0-rc3 2016-02-18 10:41:26 -05:00
Brad King 3dd420bd90 Merge branch 'FindCUDA-verbatim' into release 2016-02-17 15:25:44 -05:00
Brad King 1911cda03e FindCUDA: Fix regression under Visual Studio generators
Since commit v3.5.0-rc1~47^2 (FindCUDA: Support special characters in
path, 2016-01-15) our add_custom_command calls use VERBATIM so that
CMake will automatically quote special characters correctly.  However,
this breaks the special `$(VCInstallDir)` placeholder used with Visual
Studio generators.  Since we do not support preservation of such
placeholders with VERBATIM (see issue #15001) we must fall back to not
using VERBATIM when the placeholder is used.

A better fix would be to stop using `$(VCInstallDir)` and use the value
of `CMAKE_${CUDA_C_OR_CXX}_COMPILER` instead, but that will require
additional semantic and documentation changes.  For now simply fix the
regression with the above approach.

Reported-by: Stephen Sorley <Stephen.Sorley@jhuapl.edu>
2016-02-17 15:20:56 -05:00
Brad King ef10f5259a Merge branch 'fix-static-private-non-target-depends' into release 2016-02-17 14:03:11 -05:00
Brad King 87f44b7525 Fix export of STATIC library PRIVATE non-target dependencies
In commit v3.5.0-rc1~43^2 (Fix export of STATIC library PRIVATE
dependencies with CMP0022 NEW, 2016-01-15) we taught
target_link_libraries to generate `$<LINK_ONLY:$<TARGET_NAME:dep>>` in
INTERFACE_LINK_LIBRARIES instead of `$<LINK_ONLY:dep>` so that `dep` can
be recognized as a target name and updated during export.  However, this
approach does not work when `dep` is just a plain library name and not a
target because `$<TARGET_NAME:...>` requires the name of a reachable
target.

Since we do not know during target_link_libraries whether the name will
correspond to a reachable target or not, we cannot inject the
`$<TARGET_NAME:...>` expression.  Revert this change and solve the
original problem instead by teaching the export logic to recognize and
update target names directly in `$<LINK_ONLY:...>` expressions.

Reported-by: Ben Boeckel <ben.boeckel@kitware.com>
2016-02-17 14:01:11 -05:00
Brad King a13a6ee108 Merge branch 'backport-doc-install-component-association' into release 2016-02-17 10:16:14 -05:00