Commit Graph

4194 Commits

Author SHA1 Message Date
Brad King 7db9f3f294 ExternalProject: Add option to perform a shallow Git clone (#15291)
Inspired-by: Ilya Kulakov <kulakov.ilya@gmail.com>
2016-04-27 10:58:07 -04:00
Geoff Viola 1703a6d2c4 GHS: Fix handling of duplicate source filenames (#16046)
Green Hills MULTI project files must specify explicitly distinct object
file names for source files with the same name.
2016-04-25 10:46:09 -04:00
Brad King 76e793b9ad Merge topic 'autogen-updates'
84946c73 Tests: QtAutogen: Same source name in different directories test
9c6fa684 Autogen: Generate qrc_NAME.cpp files in subdirectories
488ea8c7 Autogen: Generate not included moc files in subdirectories (#12873)
66caae45 Autogen: Check added for name collisions of generated qrc_NAME.cpp files
663d093d Autogen: Check added for name collisions of generated ui_NAME.h files
8295d437 Autogen: Check added for name collisions of generated moc files
d350308a Help: Improve AUTOMOC documentation layout
2016-04-22 09:02:03 -04:00
Sebastian Holtermann 84946c735c Tests: QtAutogen: Same source name in different directories test
The test features multiple .cpp and .qrc files with the same name
in different subdirectories. This requires AUTOMOC and AUTORCC to
generate files with names that respect the path information of
the source files.
2016-04-22 08:55:44 -04:00
Roger Leigh 2c1b720e64 FindBoost: Define Boost::boost for all boost versions 2016-04-19 22:07:45 +01:00
Brad King 7c36d2067b cmListFileBacktrace: Refactor storage to provide efficient value semantics
Since commit v3.4.0-rc1~321^2~2 (Genex: Store a backtrace, not a pointer
to one, 2015-07-08) we treat cmListFileBacktrace instances as
lightweight values.  This was true at the time only because the
backtrace information was kept in the cmState snapshot hierarchy.
However, that forced us to accumulate a lot of otherwise short-lived
snapshots just to have the backtrace fields available for reference by
cmListFileBacktrace instances.  Recent refactoring made backtrace
instances independent of the snapshot hierarchy to avoid accumulating
short-lived snapshots.  This came at the cost of making backtrace values
heavy again, leading to lots of string coying and slower execution.

Fix this by refactoring cmListFileBacktrace to provide value semantics
with efficient shared storage underneath.  Teach cmMakefile to maintain
its call stack using an instance of cmListFileBacktrace.  This approach
allows the current backtrace to be efficiently saved whenever it is
needed.

Also teach cmListFileBacktrace the notion of a file-level scope.  This
is useful for messages about the whole file (e.g. during parsing) that
are not specific to any line within it.  Push the CMakeLists.txt scope
for each directory and never pop it.  This ensures that we always have
some context information and simplifies cmMakefile::IssueMessage.
Push/pop a file-level scope as each included file is processed.  This
supersedes cmParseFileScope and improves diagnostic message context
information in a few places.  Fix the corresponding test cases to expect
the improved output.
2016-04-18 09:21:19 -04:00
Brad King eae4cee0b5 Merge topic 'try_compile-config-flags'
bd581a37 try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes (#16054)
82ef90fc cmCoreTryCompile: Factor out config lookup for re-use
2016-04-13 09:58:18 -04:00
Daniel Pfeifer 5e62444cff Add options to run clang-tidy with the compiler
Create a <LANG>_CLANG_TIDY target property (initialized by a
CMAKE_<LANG>_CLANG_TIDY variable) to specify a clang-tidy command line
to be run along with the compiler.
2016-04-13 09:56:10 -04:00
Brad King bd581a3733 try_compile: Honor CMAKE_<LANG>_FLAGS_<CONFIG> changes (#16054)
In the `try_compile` source file signature we propagate the caller's
value of `CMAKE_<LANG>_FLAGS` into the test project.  Extend this to
propagate `CMAKE_<LANG>_FLAGS_<CONFIG>` too instead of always using the
default value in the test project.  This will be useful, for example, to
allow the MSVC runtime library to be changed (e.g. `-MDd` => `-MTd`).
2016-04-11 11:25:08 -04:00
Brad King 9ac11bc25d Merge topic 'test-RunCMake.BuildDepends-filesystem-workaround'
f5e79004 Tests: Work around filesystem timestamp bugs in RunCMake.BuildDepends
2016-04-11 09:39:00 -04:00
Brad King f5e79004e2 Tests: Work around filesystem timestamp bugs in RunCMake.BuildDepends
The Custom-Symbolic-and-Byproduct case fails strangely on some
filesystems used by our nightly testing.  Somehow on the first build the
`use-byproduct` output ends up with a timestamp older than
`gen-byproduct-stamp` even though the build log clearly shows them build
in the correct order (and must according to build system dependencies).
Work around this problem by adding an extra delay before building
`use-byproduct`.

Tested-by: Gerhard Grimm <gerhard.grimm@detec.com>
2016-04-08 10:51:01 -04:00
Brad King f6c5958047 Merge topic 'ninja-restat-custom-command-byproducts'
add7abc8 Ninja: Restat custom command byproducts even with a SYMBOLIC output (#16049)
ff805113 Ninja: Fix detection of custom command symbolic outputs
2016-04-08 09:03:59 -04:00
Brad King 7d5a0f5f60 Merge topic 'branch_coverage_glob'
8ea1b0df CTestCoverageCollectGCOV: Improve documentation
425d7646 CTestCoverageCollectGCOV: Honor CTEST_EXTRA_COVERAGE_GLOB
2016-04-07 08:57:41 -04:00
Zack Galbreath 425d764685 CTestCoverageCollectGCOV: Honor CTEST_EXTRA_COVERAGE_GLOB
Teach CTestCoverageCollectGCOV to honor the
CTEST_EXTRA_COVERAGE_GLOB variable.  When this variable is set,
this module will glob for matching source files that were not
covered and include them in the resulting tar file.
2016-04-07 08:53:30 -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 adea45e15a Merge topic 'fix-target-alias-in-subdir'
0e44f489 Rename local target lookup methods to clarify purpose
bc30f8b5 Fix lookup of an ALIAS target outside aliased target's directory (#16044)
2016-04-05 09:37:59 -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 e0cc8bf5d7 Merge topic 'cpack-rpm-external-symlink-handling'
eae4eef0 CPack/RPM external symlink handling
2016-04-01 10:04:32 -04:00
Domen Vrankar eae4eef0c4 CPack/RPM external symlink handling
Symbolic links that point to external
location no longer cause cmake to fail
with string out of bounds error but
are instead packaged as non relocatable
symlinks and print out a warning message.
2016-04-01 09:52:04 -04:00
Jean-Christophe Fillion-Robin fad5d59cf4 PushCheckStateTest: Update test to check CMAKE_EXTRA_INCLUDE_FILES 2016-03-31 11:11:32 -04:00
Jean-Christophe Fillion-Robin a3468b78f2 PushCheckStateTest: Test all variables managed by the module 2016-03-31 10:58:33 -04:00
Jean-Christophe Fillion-Robin 85b2bb6cb4 PushCheckStateTest: Fix syntax warning
This commit fixes the following warning originally introduced in
1325260 (Add macros cmake_push/pop_check_state() as discussed on the list.)

  Argument not separated from preceding token by whitespace.
2016-03-31 10:40:23 -04:00
Felix Geyer 49e82c15d5 Fix spelling typos in comments and documentation (#16037)
The Debian package checker tool (lintian) detected several typos in
CMake.
2016-03-29 14:31:02 -04:00
Domen Vrankar 1fe004eac3 cpack rpm setting of defattr
RPM supports setting of default user, group,
file and directory permissions that will be
applied for files in package unless specified
per file/dir with attr setting
This is related to bug report 14714
2016-03-29 00:51:18 +02:00
Brad King c41b9dc7b5 Tests: Fix GTK2Components.gtkmm test with sigc++ >= 2.5.1
FindGTK2 adds compile features to GTK2::sigc++ so that clients will
compile as C++11 or above.  However, our test case covers using just the
library list variables instead of the imported targets.  Fix this case
by propagating the compile features manually.
2016-03-25 09:19:33 -04:00
Brad King 917d49ed93 Merge topic 'cmake-depend-in-project-only'
b06e17da Help: Add notes for topic 'cmake-depend-in-project-only'
52540245 Tests: Add test for CMAKE_DEPENDS_IN_PROJECT_ONLY variable
b1e1aa1e Makefile: Optionally scan only source and build trees for dependencies
2016-03-24 08:49:43 -04:00
Brad King 5b2acf6c1c Merge topic 'vs-startup-project'
ad140c6e VS: Put ALL_BUILD in the PREDEFINED_TARGETS_FOLDER
f069be05 VS: Fix default target support for targets nested inside a folder
c05ea485 VS: Improve unit test macros
78ec0461 VS: Add option to choose the `.sln` startup project (#15578)
2016-03-24 08:49:41 -04:00
Brad King 525402450a Tests: Add test for CMAKE_DEPENDS_IN_PROJECT_ONLY variable 2016-03-23 14:03:01 -04:00
Taylor Braun-Jones f069be0548 VS: Fix default target support for targets nested inside a folder
It's not actually the first target in a `.sln` file that is treated as
the default startup project, but rather the first fully defined target.
2016-03-23 13:22:15 -04:00
Brad King 6201c1a6ce Merge topic 'timeout_after_match'
de7afd29 Help: Add notes for topic 'timeout_after_match'
993e48d0 CTest: Optionally use a secondary test timeout after matching output
2016-03-22 16:09:28 -04:00
Brad King 208524b822 Merge topic 'test-rename-VSSolution'
5c1f4da8 Tests: Rename RunCMake.{SolutionGlobalSections => VSSolution}
2016-03-22 13:04:24 -04:00
Taylor Braun-Jones c05ea48545 VS: Improve unit test macros
Change `getFirstProject` macro to more flexible version
`getProjectNames`
2016-03-22 12:41:30 -04:00
Zack Galbreath 993e48d045 CTest: Optionally use a secondary test timeout after matching output
Allow a test N seconds to complete after we detect a matching line in
its output.  Activate this behavior with a new TIMEOUT_AFTER_MATCH test
property.
2016-03-22 11:17:55 -04:00
Brad King 2f9e6551c0 Merge topic 'ninja-directory-targets'
9ead71df Help: Add notes for topic 'ninja-directory-targets'
e9bf8ec8 Ninja: Add test for `$subdir/all` targets
ca575fe9 Ninja: Add `$subdir/all` targets
2016-03-22 11:15:38 -04:00
Brad King 86eb327cda Merge topic 'fix-repeat-pkg-config'
6f4f9054 FindPkgConfig: set correctly named variables in cache (#15903)
2016-03-22 11:15:33 -04:00
Brad King e9bf8ec849 Ninja: Add test for `$subdir/all` targets 2016-03-22 08:01:14 -04:00
Davy Durham 78ec046130 VS: Add option to choose the `.sln` startup project (#15578)
Add a `VS_STARTUP_PROJECT` directory property to specify the project
that should be placed first in the `.sln` file so that it will be
selected as the default startup project.

Co-Author: Taylor Braun-Jones <taylor.braunjones@avigilon.com>
2016-03-22 07:57:00 -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 5c1f4da83d Tests: Rename RunCMake.{SolutionGlobalSections => VSSolution}
The test will be suitable for covering other `.sln` content too.
2016-03-18 13:20:42 -04:00
Brad King 9cdb37e917 Merge topic 'release-win64'
c089485d Utilities/Release: Skip spurious Qt5Autogen test for nightly binary
e903a9fc Utilities/Release: Create a Windows 64-bit binary
dd630075 Utilities/Release: Rename scripts to match target platform
2016-03-18 09:43:23 -04:00
Brad King 1bcdc4db1b Merge topic 'GenerateExportHeader-fix-name-leak'
6a6e5d89 GenerateExportHeader: Allow common NO_DEPRECATED_MACRO_NAME for multiple libs
be5a8973 GenerateExportHeader: Do not define DEFINE_NO_DEPRECATED (#16022)
2016-03-18 09:43:20 -04:00
Andreas Schuh be5a8973c3 GenerateExportHeader: Do not define DEFINE_NO_DEPRECATED (#16022)
Previously we allowed this definition to persist outside our header.
This would cause conflicts across multiple such headers because the name
was always the same.  Fix this by avoiding the definition altogether.
2016-03-17 10:40:24 -04:00
Brad King cd569b962d Merge topic 'ios-install-combined-one-arch'
e3fc2899 Fix iOS combined feature for single architecture targets
2016-03-17 09:41:37 -04:00
Brad King e903a9fc55 Utilities/Release: Create a Windows 64-bit binary
Compile with `-D_WIN32_WINNT=0x502` to use a WinXP-compatible API.
Compile with `-D_USING_V110_SDK71_` to tell the VS standard library
headers that we are building with a WinXP-compatible Windows SDK.  Link
executables with `-subsystem:console,5.02` to make them runnable on
Windows XP 64-bit.  Ideally `cmake-gui` should instead be linked with
`-subsystem:windows,5.02` but with the Ninja and Makefile generators
CMake adds `-subsystem:windows` after our `-subsystem:console,5.02` flag
and the linker seems to interpret this combination as we need.
2016-03-17 09:32:16 -04:00
Brad King dd63007544 Utilities/Release: Rename scripts to match target platform
The machine name we happen to use for the build is less informative than
its platform.
2016-03-17 09:30:30 -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 9b9396b06a Merge topic 'FindProtobuf-variable-case'
a7b09e7f FindProtobuf: Rename variables to match case of module name
2016-03-11 08:30:46 -05:00
Brad King 1ed74b9d22 Merge topic 'remove-vs6-generator'
b42866a3 Drop Visual Studio 6 generator
cd9ba3ec cmLocalVisualStudio7Generator: Fix name of helper function
2016-03-10 09:16:23 -05:00
Brad King 612a8b3bd8 Merge topic 'vs-clang-cl'
491b41dd Help: Add notes for topic 'vs-clang-cl'
ad6d27ac Tests: do not build PrecompiledHeader on Clang/C2
a0f0541f Tests: fix PDBDirectoryAndName on Clang/C2
3541af67 Tests: fix Plugin building on Clang/C2
1902c293 Tests: fix complexOneConfig building on Clang/C2
cab2ec11 Tests: fix Complex building on Clang/C2
ada3736c Tests: fix Module.GenerateExportHeader building on Clang/C2
123b7e13 Tests: fix AliasTarget building on Clang/C2
445d4d4b VS 14: Add flag map for -std= to CppLanguageStandard tag in project files
0a785eb4 Features: Clang has no cxx_decltype_incomplete_return_type in MSVC sim mode
2c2ec488 VS: in Clang/C2 toolset, setup correct compiler settings
37afe00f CMakeDetermineCompilerId: Add detection of clang.exe bundled with VS
2016-03-10 09:16:16 -05:00
Mariusz Pluciński ad6d27ac2a Tests: do not build PrecompiledHeader on Clang/C2 2016-03-10 09:11:42 -05:00
Mariusz Pluciński a0f0541f35 Tests: fix PDBDirectoryAndName on Clang/C2 2016-03-10 09:11:42 -05:00
Mariusz Pluciński 3541af67b7 Tests: fix Plugin building on Clang/C2 2016-03-10 09:11:41 -05:00
Mariusz Pluciński 1902c293ba Tests: fix complexOneConfig building on Clang/C2 2016-03-10 09:11:41 -05:00
Mariusz Pluciński cab2ec111b Tests: fix Complex building on Clang/C2 2016-03-10 09:11:41 -05:00
Mariusz Pluciński ada3736c78 Tests: fix Module.GenerateExportHeader building on Clang/C2 2016-03-10 09:11:41 -05:00
Mariusz Pluciński 123b7e1335 Tests: fix AliasTarget building on Clang/C2 2016-03-10 09:11:41 -05:00
Gregor Jasny 111cd67919 Xcode: ReRunCMake even if files disappeared (#15992) 2016-03-09 20:33:01 +01:00
Brad King b42866a34a Drop Visual Studio 6 generator
This generator has been deprecated since CMake 3.3.  Remove it.
Update documentation, modules, and tests to drop content specific
to this generator.
2016-03-09 09:42:18 -05:00
Brad King d1856e2e33 Merge topic 'add-FindLTTngUST'
a4194deb Add FindLTTngUST module to find LTTng-UST library
2016-03-09 08:50:01 -05:00
Brad King 72e0dc58d3 Diagnose recursive project/enable_language without crashing (#15999)
Calling `project()` or `enable_language()` from a toolchain file will
infinitely recurse since those commands load the toolchain file.
Diagnose and reject this case with an error message instead of crashing
when the stack eventually overflows.
2016-03-07 13:52:38 -05:00
Antonio Perez Barrero a7b09e7f43 FindProtobuf: Rename variables to match case of module name
Use recommended case for variable names. i.e. matching name of the
module as passed to `find_package`.

For backwards compatibility, the upper case versions of both input and
output variables are used and defined when appropriate.  Skip this for
the _FOUND variable because FPHSA already does it.  Skip this for the
_VERSION variable because that was recently added and never available
with the old name in a release of CMake.
2016-03-07 12:56:25 -05:00
Philippe Proulx a4194debea Add FindLTTngUST module to find LTTng-UST library
Also detect the library version number.  Provide results as variables
and as an imported target, LTTng::UST.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
2016-03-07 11:46:49 -05:00
Brad King cfb4d7736e Merge topic 'update-osx-release'
b682debd Utilities/Release: Switch to OS X 10.7 and Qt 5.5 for Mac binary
2016-03-07 10:02:42 -05:00
Fabian Otto 6122909c33 VS: Add option to set `ConfigurationType` of a .vcxproj file
Add a VS_CONFIGURATION_TYPE target property to set this value
explicitly.  This is useful to build a Windows Kernel Mode Driver,
for example.
2016-02-26 10:52:13 -05:00
Brad King 79d4b5bec9 Merge topic 'try_compile-target-type'
7f1bd9fe try_compile: Add option to control type of target
2016-02-26 10:31:28 -05:00
Brad King 6c9586f9c7 file(DOWNLOAD): Fill STATUS variable on hash mismatch (#15987)
Although we fail with an error on a hash mismatch, it is not a fatal
error so the script may continue processing.  If the download itself had
no error then report in the STATUS variable that the operation was not
successful due to the hash mismatch.

Suggested-by: Tobias Hieta <tobias@hieta.se>
2016-02-25 11:40:50 -05:00
Dimitar Yordanov 430251245e cmake_parse_arguments: Additional regression tests
Add regression tests for the arguments handling in
cmake_parse_arguments. The tests were run also against cmake 3.4.1
maint branch to verify that there are no regressions.

Signed-off-by: Dimitar Yordanov <dimitar.yordanov@sap.com>
Signed-off-by: Matthias Maennich <matthias.maennich@sap.com>
2016-02-24 10:07:30 -05:00
Brad King 8f8418c68b Merge topic 'test-XCTest-sdkroot'
d8cba536 Tests: Fix XCTest when ENV{SDKROOT} is set
2016-02-24 09:39:13 -05:00
Brad King 6f00fc58ed Merge topic 'test-FindPackageModeMakefileTest-optionally'
c05678ad Tests: Add option to disable FindPackageModeMakefileTest
2016-02-24 09:39:10 -05:00
Brad King be98577f13 Merge topic 'revert-automoc-src-per-dir'
091b649e Revert "Automoc: Fix support of files with the same name (#12873)"
2016-02-24 09:39:08 -05:00
Brad King b682debd65 Utilities/Release: Switch to OS X 10.7 and Qt 5.5 for Mac binary
Use a new build machine to produce the OS X binary targeting OS X 10.7
and using Qt 5.5.
2016-02-19 15:47:18 -05:00
Brad King 7f1bd9fe69 try_compile: Add option to control type of target
Create a `CMAKE_TRY_COMPILE_TARGET_TYPE` option to specify use
of `add_library(... STATIC ...)` for the generated test project.
This will be useful for cross-compiling toolchains that cannot
link a binary without custom flags or scripts.
2016-02-19 14:07:38 -05:00
Brad King c387325d4a Merge topic 'unix-timestamps'
6727270b CMake: Extend TIMESTAMP sub-commands with new unix time format specifier
2016-02-19 09:47:39 -05:00
Brad King d8cba5368b Tests: Fix XCTest when ENV{SDKROOT} is set
We use the host OS X version as the deployment target for this test.
This breaks if the SDKROOT environment variable specifies an
incompatible SDK version.  Explicitly specify `macosx` as the
SDK so that CMake will automatically select a version matching
the deployment target.
2016-02-19 09:28:27 -05:00
Brad King c05678ad28 Tests: Add option to disable FindPackageModeMakefileTest
This test does not work in all environments, so add an option to
disable it.
2016-02-19 09:10:44 -05:00
Brad King 091b649e19 Revert "Automoc: Fix support of files with the same name (#12873)"
This reverts commit 9beb2744d7.
Our AUTOMOC documentation states that it should be possible to
`#include "moc_foo.cpp"` in `foo.cpp`, and this will not work if
the file is placed in a different directory.  Another solution
will need to be found to the original problem.

Reported-by: Stephen Kelly <steveire@gmail.com>
2016-02-19 08:59:17 -05:00
Jose-Luis Blanco-Claraco 6727270b75 CMake: Extend TIMESTAMP sub-commands with new unix time format specifier
The new `%s` format specifier is substituted by file()/string()
`TIMESTAMP` sub-commands with the number of seconds since unix-epoch
(1970-01-01 00:00:00 UTC).

Co-Author: Nils Gladitz <nilsgladitz@gmail.com>
2016-02-18 10:30:13 -05:00
Brad King 2321e63734 Merge topic 'fix-static-private-non-target-depends'
87f44b75 Fix export of STATIC library PRIVATE non-target dependencies
2016-02-18 10:08:01 -05:00
Brad King 135a0df525 Merge topic 'automoc-src-per-dir'
9beb2744 Automoc: Fix support of files with the same name (#12873)
2016-02-18 10:07: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
Mariusz Pluciński 9beb2744d7 Automoc: Fix support of files with the same name (#12873) 2016-02-16 10:45:19 -05:00
Antonio Perez Barrero bb7a41ab9b FindProtobuf: check version
Check found libraries version to match user required version.

Protobuf compiler executable version is checked to be aligned with found
libraries, raising a warning message otherwise.
2016-02-16 10:09:39 -05:00
Brad King e0a3009cda Merge topic 'fix-cmake_parse_arguments-expansion'
c8c45a2c cmake_parse_arguments: Restore ;-list argument flattening
2016-02-16 09:52:34 -05:00
Brad King dde82df24c Merge topic 'cpack-rpm-upper-cased-components'
7c7efd1e CPack/RPM support for upper cased component variables
2016-02-16 09:52:30 -05:00
Domen Vrankar 7c7efd1ed9 CPack/RPM support for upper cased component variables
CPACK_* variables expect component name in upper case.
CPACK_RPM_* variables expected component name to be
in same case as component name.
This patch adds support for CPACK_RPM_* variables with
upper case component names to match the convention with
CPACK_* variables and also preserves same case component
names for back compatibility.
2016-02-13 02:09:32 +01:00
Ben Boeckel 326ad9949f Tests: fix GenerateExportHeader directory definitions
There's no need to stringify the values, but instead just pass in
strings. The core problem is that the path may have tokens which are
replaced by the preprocessor which causes an invalid path to be used.
2016-02-12 13:50:32 -05:00
Brad King 229a5bc903 Merge branch 'fix-cmake_parse_arguments-expansion' into release 2016-02-12 11:25:36 -05:00
Dimitar Yordanov c8c45a2c4e cmake_parse_arguments: Restore ;-list argument flattening
The re-implementation in commit v3.5.0-rc1~116^2~1 (CMakeParseArguments:
replace by native cmake_parse_arguments command, 2015-12-05) introduced
a regression when parsing the ARGN arguments with cmake_parse_arguments.
The original implementation used

    foreach(currentArg ${ARGN})

to iterate over input arguments.  This flattened ;-lists within the
arguments whether they were quoted or not.  Fix our new implementation
to preserve this behavior and add a test case to cover it.

Signed-off-by: Dimitar Yordanov <dimitar.yordanov@sap.com>
Signed-off-by: Matthias Maennich <matthias.maennich@sap.com>
2016-02-12 11:19:40 -05:00
Brad King 778fda1e92 Merge topic 'apple-isystem-gcc'
5b04aa31 Xcode: Disable test for system include dirs
2cae5128 Apple: Enable -isystem for GNU Compiler >= 4 (#15953)
2016-02-09 10:10:18 -05:00
Brad King 3b8c0fbfd7 Merge topic 'install-EXCLUDE_FROM_ALL'
586e56d0 Help: Add notes for topic 'install-EXCLUDE_FROM_ALL'
d321c196 Tests: Add cases for install() command EXCLUDE_FROM_ALL option
18ce97c4 install: Add EXCLUDE_FROM_ALL option (#14921)
2016-02-09 10:10:15 -05:00
Brad King 8aec0f955a Merge topic 'test-ctest_submit-update'
2859d9ef Tests: Extend ctest_submit host lookup failure matching (#15958)
2016-02-09 10:10:13 -05:00
Brad King e509c0e6d4 Merge topic 'fix-install-EXPORT-crash'
a1ad098d Tests: Avoid OS X 10.5 limitation warning in RunCMake.install test
47460f3e install(EXPORT): Fix crash on target in another directory
e86383e1 Tests: Use newer policy settings in RunCMake.install test
2016-02-09 10:10:09 -05:00
Brad King 656bf0da2c Merge branch 'fix-install-EXPORT-crash' into release 2016-02-08 10:46:42 -05:00
Brad King a1ad098dc8 Tests: Avoid OS X 10.5 limitation warning in RunCMake.install test
The EXPORT-OldIFace test case uses install(TARGETS) and so generates a
warning:

 CMake Warning in CMakeLists.txt:
   WARNING: Target "foo" has runtime paths which cannot be changed during
   install.  To change runtime paths, OS X version 10.6 or newer is required.
   Therefore, runtime paths will not be changed when installing.
   CMAKE_BUILD_WITH_INSTALL_RPATH may be used to work around this limitation.

Set CMAKE_BUILD_WITH_INSTALL_RPATH to avoid the warning since we do not
need to run the binaries from the build tree anyway.
2016-02-08 10:44:43 -05:00
Brad King 2a768f84e3 Merge branch 'test-ctest_submit-update' into release 2016-02-08 10:35:59 -05:00
Brad King bd15330da1 Merge topic 'test-FortranCInterface-again'
d31d7ffd Tests: Fix Fortran test to run FortranCInterface again
2016-02-08 10:33:07 -05:00
Brad King a7e2021fea Merge topic 'fix-Fortran-module-in-subdir'
c5eb21b6 Fix dependency scanning configuration in subdirectories
2016-02-08 10:33:04 -05:00
Brad King 08e5362004 Merge topic 'error-multiple-targets'
497cad7c cmake: Teach --build to reject multiple --target options
886acd80 Help: Fix reference to `cmake --build` in cmake(1) manual
2016-02-08 10:32:55 -05:00