Commit Graph

20329 Commits

Author SHA1 Message Date
Brad King e2465c19c6 Merge topic 'preallocate-condition-keywords'
5c324294 cmConditionEvaluator: Pre-allocate keyword strings
2016-03-31 08:45:56 -04:00
Brad King 91d91d9d5d Merge topic 'simplify-condition-context'
2379b3ae cmConditionEvaluator: Remove GetConditionContext method
02fce523 cmConditionEvaluator: Drop unnecessary path conversion
2016-03-31 08:45:54 -04:00
Brad King e0917f29a4 Merge topic 'vs-fortran-MP'
729f5f01 VS: Map Intel Fortran `/MP` flag for multi-processor compilation (#15990)
2016-03-31 08:45:51 -04:00
Kitware Robot b290ddf925 CMake Nightly Date Stamp 2016-03-31 00:01:05 -04:00
Zack Galbreath 398b8800e3 cmParseCoberturaCoverage: Remove extra coverage line
Fix off-by-one error in cmParseCoberturaCoverage that added an
extra blank line to the end of source file being covered.
2016-03-30 14:22:07 -04:00
Kitware Robot 00e4d1220b CMake Nightly Date Stamp 2016-03-30 00:01:06 -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
Brad King dc333a7115 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2016-03-29 (b51abb30)
2016-03-29 14:29:42 -04:00
Brad King 5c324294ce cmConditionEvaluator: Pre-allocate keyword strings
Calls to `IsKeyword("...")` cause runtime construction of std::string.
Avoid possible repeated allocation by pre-allocating keyword strings
during initialization.
2016-03-29 10:32:28 -04:00
Brad King 2379b3ae31 cmConditionEvaluator: Remove GetConditionContext method
All it does is call cmListFileContext::FromCommandContext, so move this
to the call sites.
2016-03-29 10:10:20 -04:00
Brad King 02fce523a1 cmConditionEvaluator: Drop unnecessary path conversion
In commit v3.4.0-rc2~1^2 (cmIfCommand: Issue CMP0054 warning with
appropriate context, 2015-10-20) we added construction of a
cmListFileContext with conversion of the calling file path.  This code
path runs on every condition (e.g. `if()`) and so the path conversion
has a noticeable performance cost.  Fortunately the only use of this
context is for insertion into cmMakefile::CMP0054ReportedIds so we do
not need to convert the path.  Simply drop the conversion.
2016-03-29 10:02:17 -04:00
Brad King 2ab344a1dc Merge topic 'ghs-link-flags'
36ad8dd4 GHS: Implement link flags and dirs for non-target groups (#16029)
230d50ed GHS: Factor out compiler information shared among languages
2016-03-29 09:24:36 -04:00
Brad King 729f5f01b4 VS: Map Intel Fortran `/MP` flag for multi-processor compilation (#15990) 2016-03-29 08:45:00 -04:00
Kitware Robot 60de9b8a4f CMake Nightly Date Stamp 2016-03-29 00:01:05 -04:00
Geoff Viola 36ad8dd440 GHS: Implement link flags and dirs for non-target groups (#16029) 2016-03-28 11:46:46 -04:00
Brad King c69ed0a884 Merge topic 'only_change_timeout_once'
06b7f5d2 CTest: Only apply the secondary test timeout once
2016-03-28 09:25:40 -04:00
Kitware Robot aa9227aa4d CMake Nightly Date Stamp 2016-03-28 00:01:04 -04:00
Kitware Robot 6732749e5b CMake Nightly Date Stamp 2016-03-27 00:01:04 -04:00
Kitware Robot 9b5652846f CMake Nightly Date Stamp 2016-03-26 00:01:10 -04:00
Kitware Robot 484d7ca0e0 CMake Nightly Date Stamp 2016-03-25 00:01:06 -04:00
Brad King 64130a7e79 CMake 3.5.1 2016-03-24 09:56:42 -04:00
Brad King 6d36fc8341 Merge topic 'fix-variable_watch-reallocation'
c6104028 Avoid occasional use-after-free when a variable watch is executed
2016-03-24 08:49:46 -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
Kitware Robot 02166c33db CMake Nightly Date Stamp 2016-03-24 00:01:08 -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
Taylor Braun-Jones ad140c6e1b VS: Put ALL_BUILD in the PREDEFINED_TARGETS_FOLDER 2016-03-23 13:22:15 -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
Zack Galbreath 06b7f5d2ca CTest: Only apply the secondary test timeout once
This commit fixes a bug in the implementation of the test property
TIMEOUT_AFTER_MATCH.  The new timeout value was being applied
every time a line was output by the test after the match had been
encountered.  Now the new timeout value is only set once.

This commit also improves some output formatting related to this
property.
2016-03-23 12:09:41 -04:00
Brad King 405766757c Merge topic 'use-cmXMLWriter'
51465da1 CPack/IFW: port to cmXMLWriter
754485af cmExtraEclipseCDT4Generator: port to cmXMLWriter
c45671b0 cmGlobalKdevelopGenerator: port to cmXMLWriter
dcdc270e cmExtraCodeLiteGenerator: port to cmXMLWriter
27e09764 cmExtraCodeBlocksGenerator: port to cmXMLWriter
d7407621 cmXMLWriter: add Doctype() method
dd27e313 cmXMLWriter: overload Element() method for empty elements
2016-03-23 11:19:19 -04:00
Daniel Pfeifer 51465da1ec CPack/IFW: port to cmXMLWriter 2016-03-23 11:18:16 -04:00
Daniel Pfeifer 754485afff cmExtraEclipseCDT4Generator: port to cmXMLWriter 2016-03-23 11:18:15 -04:00
Daniel Pfeifer c45671b0f1 cmGlobalKdevelopGenerator: port to cmXMLWriter 2016-03-23 11:18:15 -04:00
Kitware Robot 38caf1bb74 CMake Nightly Date Stamp 2016-03-23 00:01:06 -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
Attila Krasznahorkay b1e1aa1e6a Makefile: Optionally scan only source and build trees for dependencies
Add a `CMAKE_DEPENDS_IN_PROJECT_ONLY` variable to activate the behavior.
2016-03-22 16:04:15 -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 41c17c1d2e Merge topic 'ghs-try_compile'
bf3e76d2 GHS: Fix try_compile (#15975)
2016-03-22 11:15:41 -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
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
Kitware Robot 1449b11e19 CMake Nightly Date Stamp 2016-03-22 00:01:06 -04:00
Geoff Viola bf3e76d214 GHS: Fix try_compile (#15975) 2016-03-21 10:35:01 -04:00
Daniel Pfeifer dcdc270eeb cmExtraCodeLiteGenerator: port to cmXMLWriter 2016-03-21 10:11:53 -04:00
Daniel Pfeifer 27e0976453 cmExtraCodeBlocksGenerator: port to cmXMLWriter 2016-03-21 10:11:53 -04:00
Daniel Pfeifer d740762181 cmXMLWriter: add Doctype() method 2016-03-21 10:11:53 -04:00
Daniel Pfeifer dd27e31351 cmXMLWriter: overload Element() method for empty elements 2016-03-21 10:11:53 -04:00
Brad King cd992170db Merge topic 'cpack-osx-optional-CoreServices'
d84ba668 CPack: Avoid using OS X CoreServices if compiler fails on header (#16021)
2016-03-21 09:39:24 -04:00
Kitware Robot bbab373b00 CMake Nightly Date Stamp 2016-03-21 00:01:04 -04:00
Kitware Robot 33594f20fa CMake Nightly Date Stamp 2016-03-20 00:01:07 -04:00
Kitware Robot a9cb00cd50 CMake Nightly Date Stamp 2016-03-19 00:01:05 -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
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 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
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