Commit Graph

20276 Commits

Author SHA1 Message Date
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
Charles Huet ca575fe935 Ninja: Add `$subdir/all` targets
With the Makefile generator one can use `cd $subdir; make all` to build
all targets associated with a given subdirectory.  This is not possible
to do with the Ninja generator since there is only one `build.ninja`
file at the top of the build tree.  However, we can approximate it by
allowing one to run `ninja $subdir/all` at the top of the tree to build
the targets in the corresponding subdirectory.

Port logic from cmGlobalUnixMakefileGenerator3::WriteDirectoryRule2 to
cmGlobalNinjaGenerator in order to produce equivalent directory-level
targets.
2016-03-18 10:59:01 -04:00
Brad King b7eb7e0f78 Merge topic 'cmake-gui-osx-identifier'
7b990e82 cmake-gui: Populate CFBundleIdentifier in our Info.plist file (#16023)
2016-03-18 09:43:18 -04:00
Brad King 66d146431d Merge topic 'cpack-osx-no-carbon'
c718070c CPack: Avoid requiring Carbon framework on OS X (#16021)
2016-03-18 09:43:15 -04:00
Brad King 9e5f914d86 Merge topic 'vs-remote-directory'
a3bcf2aa VS: Fix WinCE remote debugger tool per-config target name
2016-03-18 09:43:13 -04:00
Kitware Robot 908259084f CMake Nightly Date Stamp 2016-03-18 00:01:06 -04:00
Brad King 7b990e82c5 cmake-gui: Populate CFBundleIdentifier in our Info.plist file (#16023) 2016-03-17 16:07:39 -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 d9fc4dfe3c Merge topic 'use-GetCMakeRoot'
3144857e Avoid depending on CMAKE_ROOT cache entry internally (#16015)
2016-03-17 09:41:32 -04:00
Brad King a3bcf2aa2c VS: Fix WinCE remote debugger tool per-config target name
Fix the DebuggerTool RemoteExecutable value added by commit a22f9967
(VS: Optionally generate remote directory for WinCE projects,
2016-02-15) to account for the configuration when computing the target
name.
2016-03-17 09:37:51 -04:00
Kitware Robot 811e297454 CMake Nightly Date Stamp 2016-03-17 00:01:06 -04:00
Brad King f5eda70690 Merge topic 'vs-remote-directory'
a22f9967 VS: Optionally generate remote directory for WinCE projects
2016-03-16 09:08:01 -04:00
Brad King 3144857e1e Avoid depending on CMAKE_ROOT cache entry internally (#16015)
Use cmSystemTools::GetCMakeRoot() which always knows the location of our
resources.  Do not depend on CMAKE_ROOT because the user could unset it
from the cache.
2016-03-16 09:03:26 -04:00
Kitware Robot 98f3edcec9 CMake Nightly Date Stamp 2016-03-16 00:01:05 -04:00
Andrej Bosik a22f996725 VS: Optionally generate remote directory for WinCE projects
Teach the VS 2008 and 2005 generators to set the `RemoteDirectory`
in `DeploymentTool` and the `RemoteExecutable` in `DebuggerTool`.
Use a `DEPLOYMENT_REMOTE_DIRECTORY` target property to specify the
value.
2016-03-15 14:34:26 -04:00
Kitware Robot 1d4ab06a70 CMake Nightly Date Stamp 2016-03-15 00:01:08 -04:00
Brad King a87253154e Merge topic 'remove-vs7.0-generator'
f47b4f68 Drop Visual Studio 7 generator for VS .NET 2002
2016-03-14 10:37:50 -04:00
Kitware Robot b775ba20c6 CMake Nightly Date Stamp 2016-03-14 00:01:03 -04:00
Kitware Robot 96a19fc324 CMake Nightly Date Stamp 2016-03-13 00:01:03 -05:00
Kitware Robot c374cae510 CMake Nightly Date Stamp 2016-03-12 00:01:05 -05:00
Brad King f47b4f68a9 Drop Visual Studio 7 generator for VS .NET 2002
This generator has been deprecated since CMake 3.3.  Remove it.
2016-03-11 08:53:50 -05:00
Kitware Robot 114b693d49 CMake Nightly Date Stamp 2016-03-11 00:01:04 -05:00
Brad King 2b64dc7cab Merge topic 'update-kwsys'
fd466fe6 Merge branch 'upstream-KWSys' into update-kwsys
cd4fef30 KWSys 2016-03-09 (36d8666f)
2016-03-10 09:16:26 -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
Brad King 707b400e74 Merge topic 'xcode-regenerate-on-deleted-files'
111cd679 Xcode: ReRunCMake even if files disappeared (#15992)
2016-03-10 09:16:08 -05:00
Mariusz Pluciński 445d4d4bf4 VS 14: Add flag map for -std= to CppLanguageStandard tag in project files
This is used by the Clang/C2 toolset.
2016-03-10 09:11:40 -05:00
Mariusz Pluciński 2c2ec4883b VS: in Clang/C2 toolset, setup correct compiler settings 2016-03-10 09:11:39 -05:00
Kitware Robot af35bede1a CMake Nightly Date Stamp 2016-03-10 00:01:06 -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 cd9ba3ec45 cmLocalVisualStudio7Generator: Fix name of helper function
Rename `cmLVS6G_IsFAT` to `cmLVS7G_IsFAT` since it is for the local
VS 7 generator and not VS 6.
2016-03-09 09:42:04 -05:00
Brad King fd466fe657 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-03-09 (36d8666f)
2016-03-09 09:10:55 -05:00
Brad King b19bc31277 Merge topic 'update-kwsys'
ea04ec09 Merge branch 'upstream-KWSys' into update-kwsys
4ba9b473 KWSys 2016-03-08 (6b60c184)
2016-03-09 08:50:06 -05:00
Kitware Robot 6b9dc804ee CMake Nightly Date Stamp 2016-03-09 00:01:06 -05:00
Brad King ea04ec09d8 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-03-08 (6b60c184)
2016-03-08 09:29:23 -05:00
Brad King b369959eb5 CMake 3.5.0 2016-03-08 08:44:49 -05:00
Brad King 7f1c9fae38 Merge topic 'ninja-osx-versions'
9e165a64 Ninja: Add OS X dylib versioning (#14140)
1f2b39c6 cmCommonTargetGenerator: Adopt AppendOSXVerFlag method
2016-03-08 08:39:40 -05:00
Brad King a6e6f93b6c Merge topic 'toolchain-file-project'
72e0dc58 Diagnose recursive project/enable_language without crashing (#15999)
2016-03-08 08:39:37 -05:00
Brad King 79e05af4a3 Merge topic 'vs14-debug-enum-older-toolsets'
3f15665a VS: Fix VS 2015 .vcxproj debug setting for v100 toolset (#15986)
2016-03-08 08:39:32 -05:00
Kitware Robot 1d1b72a20d CMake Nightly Date Stamp 2016-03-08 00:01:09 -05:00
Bruce Stephens 9e165a64ad Ninja: Add OS X dylib versioning (#14140)
Teach the Ninja generator to add the `-current_version` and the
`-compatibility_version` flags based on the VERSION and SOVERSION target
properties just as the Makefile generators do.

Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
2016-03-07 15:03:21 -05:00
Bruce Stephens 1f2b39c6ce cmCommonTargetGenerator: Adopt AppendOSXVerFlag method
Move this method from cmMakefileLibraryTargetGenerator so it can be
re-used for the Ninja generator too.

Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
2016-03-07 14:57:26 -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
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 3f15665a45 VS: Fix VS 2015 .vcxproj debug setting for v100 toolset (#15986) 2016-03-07 10:07:39 -05:00
Brad King 9fcc8ff455 Merge topic 'vs-vcxproj-ConfigurationType'
6122909c VS: Add option to set `ConfigurationType` of a .vcxproj file
2016-03-07 10:02:40 -05:00
Kitware Robot 4debd8beb1 CMake Nightly Date Stamp 2016-03-07 00:01:05 -05:00
Kitware Robot 7cc8262823 CMake Nightly Date Stamp 2016-03-06 00:01:04 -05:00
Kitware Robot 1bf42fa9b9 CMake Nightly Date Stamp 2016-03-05 00:01:04 -05:00
Kitware Robot 831801671c CMake Nightly Date Stamp 2016-03-04 00:01:03 -05:00
Kitware Robot f37f422a7f CMake Nightly Date Stamp 2016-03-03 00:01:05 -05:00
Kitware Robot 8913ccca43 CMake Nightly Date Stamp 2016-03-02 00:01:05 -05:00
Kitware Robot 3cc22dffb7 CMake Nightly Date Stamp 2016-03-01 00:01:04 -05:00
Kitware Robot 26d615ad9f CMake Nightly Date Stamp 2016-02-29 00:01:04 -05:00
Kitware Robot b500c98c91 CMake Nightly Date Stamp 2016-02-28 00:01:03 -05:00
Kitware Robot 499be36a64 CMake Nightly Date Stamp 2016-02-27 00:01:04 -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 467f83d2e5 Merge topic 'fix_coverage_file_searching'
bc29ed54 CTest: Make coverage file selection more specific.
2016-02-26 10:31:30 -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 cc7a1b1941 Merge topic 'file-download-status-hash-mismatch'
6c9586f9 file(DOWNLOAD): Fill STATUS variable on hash mismatch (#15987)
2016-02-26 10:31:24 -05:00
Kitware Robot 9f7a2328ac CMake Nightly Date Stamp 2016-02-26 00:01:05 -05:00
Joseph Snyder bc29ed542b CTest: Make coverage file selection more specific.
When performing some other testing, the globs for Blanket.js and Delphi
code coverage are picking up unintended files.  Change the query for the
Delphi coverage to follow the naming convention, and check the second line
of the found JSON files for certain text before parsing them as coverage files.
2016-02-25 13:01:37 -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
Brad King f8af218ea1 Merge topic 'vs14-debug-enum-older-toolsets'
dc422d27 VS: Fix VS 2015 .vcxproj debug setting for older toolsets (#15986)
2016-02-25 09:00:27 -05:00
Brad King c842411dc5 Merge topic 'AddNewEclipseVersions'
aff38945 Eclipse: only add C/CXX macros if the language is enabled
6ee6b17e Eclipse: add newer version numbers
2016-02-25 09:00:24 -05:00
Kitware Robot 9b6fdbfb92 CMake Nightly Date Stamp 2016-02-25 00:01:08 -05:00
Alex Neundorf aff38945d6 Eclipse: only add C/CXX macros if the language is enabled
With this patch, the builtin macros and include dirs are only
added to the project file if the C/CXX langauges are really enabled.
I.e. before this patch the CXX-stuff was in the project file as soon
as CXX had been enabled at least once for this build tree.
I.e. disabling CXX later on did not remove the CXX macros etc.
from the project file (related to #15150)

Alex
2016-02-24 22:13:04 +01:00
Brad King dc422d271e 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-02-24 12:29:50 -05:00
Brad King 2039bf40e4 Merge topic 'CodeBlocksParallelFlag'
84ccd4f7 CodeBlocks: generate parallel project files (make -j)
2016-02-24 09:39:25 -05:00
Brad King 99895f85b3 Merge topic 'xcode-refactor-xcodeobject'
b860a925 Xcode: Refactor block writes to allow any level of nesting
2016-02-24 09:39:22 -05:00
Brad King 2186cff370 Merge topic 'xcode-remove-reftype'
572797f9 Xcode: Write refType only for Xcode 1.5
2016-02-24 09:39:20 -05:00
Brad King 0f48312386 Merge topic 'update-kwsys'
d010ba9f Merge branch 'upstream-KWSys' into update-kwsys
a132064b KWSys 2016-02-22 (4847aedd)
2016-02-24 09:39:18 -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
Robert Goulet b860a92582 Xcode: Refactor block writes to allow any level of nesting
Reviewed-by: Gregor Jasny <gjasny@googlemail.com>
2016-02-24 09:36:54 -05:00
Gregor Jasny 572797f984 Xcode: Write refType only for Xcode 1.5
This field is not expected by newer versions.
2016-02-24 09:35:54 -05:00
Kitware Robot 3dd42fe4eb CMake Nightly Date Stamp 2016-02-24 00:01:05 -05:00
Alex Neundorf 84ccd4f746 CodeBlocks: generate parallel project files (make -j)
This is done the same way as for Eclipse: cmake tries to determine
the number of CPUs, and then adds the respective -jN to the make
invocations in the project file.

Alex
2016-02-23 22:37:44 +01:00
Kitware Robot f389e6d6e2 CMake Nightly Date Stamp 2016-02-23 00:01:05 -05:00
Brad King d010ba9fa7 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-02-22 (4847aedd)
2016-02-22 09:03:40 -05:00
Kitware Robot df246f7c7f CMake Nightly Date Stamp 2016-02-22 00:01:03 -05:00
Kitware Robot 7e32bd945a CMake Nightly Date Stamp 2016-02-21 00:01:03 -05:00
Kitware Robot 6872a4fde0 CMake Nightly Date Stamp 2016-02-20 00:01:05 -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 39a80a1feb Merge topic 'reduce-entropy-consumption'
f23f18ab cmSystemTools: Avoid excess entropy consumption by RandomSeed (#15976)
b13a74b3 cmSystemTools: Remove unused include <fcntl.h>
2016-02-19 09:47:41 -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 3e3a12a4ab Merge topic 'fix-CPACK_INSTALL_CMAKE_PROJECTS-subdirectory'
26fdd9c3 CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS SubDirectory (4th) option
2016-02-19 09:47:36 -05:00
Cristian Rodríguez f23f18ab68 cmSystemTools: Avoid excess entropy consumption by RandomSeed (#15976)
Read `/dev/urandom` without buffering to avoid taking more than we need.
2016-02-19 09:44:59 -05:00
Brad King b13a74b35b cmSystemTools: Remove unused include <fcntl.h>
We do not seem to need this header anymore, and including it on AIX
causes `#define open open64` which breaks `std::ifstream::open` calls.
2016-02-19 09:44:59 -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
Kitware Robot 29c266eb56 CMake Nightly Date Stamp 2016-02-19 00:01:05 -05:00
Brad King d203761520 CMake 3.5.0-rc3 2016-02-18 10:41:26 -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
Daniel Wirtz 26fdd9c30a CPack: Fix CPACK_INSTALL_CMAKE_PROJECTS SubDirectory (4th) option 2016-02-18 09:37:59 -05:00
Kitware Robot ede2a6ea6b CMake Nightly Date Stamp 2016-02-18 00:01:04 -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