Commit Graph

24093 Commits

Author SHA1 Message Date
Frank Winklmeier
aed227fd5a cmLocalGenerator: change ImportedGeneratorTargets from vector to map
For large number of targets significant amount of time is spent in
cmLocalGenerator::FindGeneratorTargetToUse, which uses find_if on a
vector to locate the given target. Using a map instead of vector for
ImportedGeneratorTargets (as done for cmMakefile::ImportedTargets)
provides a significant speedup (up to factor of 2).
2018-01-30 14:04:37 -05:00
Frank Winklmeier
4443adc1c0 cmLocalGenerator: remove public GetImportedGeneratorTargets
GetImportedGeneratorTargets is not used anywhere hence remove it
to avoid exposing the type of ImportedGeneratorTargets.
2018-01-30 17:51:14 +01:00
Brad King
e6267df94e Merge topic 'vcxproj-DebugInformationFormat-newline'
b07b1aa4 VS: Use newline for empty DebugInformationFormat tags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1704
2018-01-30 08:46:24 -05:00
Brad King
bb35233785 Merge topic 'xcode-gen-warning'
20ca9d8f cmGlobalXCodeGenerator: Avoid -Wconditional-uninitialized warning

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Sean McBride <sean@rogue-research.com>
Merge-request: !1714
2018-01-30 08:45:45 -05:00
Kitware Robot
c6312835d5 CMake Nightly Date Stamp 2018-01-30 00:01:05 -05:00
Brad King
20ca9d8f6f cmGlobalXCodeGenerator: Avoid -Wconditional-uninitialized warning
Clang incorrectly warns about a case where we initialize a variable
inside a condition in such a way that it will always be initialized
before we use it.  Simply initialize the variable when defining it to
silence the warning.
2018-01-29 09:21:46 -05:00
Brad King
92cd3d0677 Merge topic 'reduce-temporaries'
c85bb007 Reduce allocation of temporary values on heap.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1698
2018-01-29 08:05:27 -05:00
Brad King
18153217e2 Merge topic 'ctest_start_function_scope'
13347740 Help: add release notes, documentation for CTEST_RUN_CURRENT_SCRIPT behavior
74092d92 cmCTestScriptHandler: Add new field ShouldRunCurrentScript

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1703
2018-01-29 08:04:59 -05:00
Kitware Robot
53f77fad2f CMake Nightly Date Stamp 2018-01-29 00:01:05 -05:00
Kitware Robot
e07cf68f46 CMake Nightly Date Stamp 2018-01-28 00:01:09 -05:00
Kitware Robot
1d65f68834 CMake Nightly Date Stamp 2018-01-27 00:01:14 -05:00
Robert Dailey
b07b1aa416 VS: Use newline for empty DebugInformationFormat tags
Previously, code wrote out empty tags for `<DebugInformationFormat>`
like so:

    <DebugInformationFormat></DebugInformationFormat>

This gets corrected by Visual Studio 2017 when saving the solution. The
correction appears as:

    <DebugInformationFormat>
    </DebugInformationFormat>

In the spirit of keeping the XML structure as close to what Visual
Studio expects as possible, a newline is inserted after the opening tag
in the empty case.
2018-01-26 09:52:59 -06:00
Kyle Edwards
74092d92bf cmCTestScriptHandler: Add new field ShouldRunCurrentScript
This is to avoid scope issues with CTEST_RUN_CURRENT_SCRIPT. If
ctest_start() is called within a function scope, the value of
CTEST_RUN_CURRENT_SCRIPT that it sets doesn't make it to the global
scope. With this change, ctest_start() no longer sets
CTEST_RUN_CURRENT_SCRIPT, and instead sets a field directly in
cmCTestScriptHandler. The old behavior of CTEST_RUN_CURRENT_SCRIPT
has also been kept for projects and tests that rely on setting it.
2018-01-26 09:27:22 -05:00
Brad King
0e793e7bed Merge topic 'dedup-uv-signal-hack'
3ec5f7c1 De-duplicate cmUVSignalHackRAII
1ad58d30 cmUVSignalHackRAII: Use nullptr instead of NULL

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1699
2018-01-26 08:28:08 -05:00
Brad King
f343106b19 Merge topic 'ctest-chrono'
e6a80ccf Make use of std::chrono throughout every component
ff62b005 CTest: add safe conversion from cmDuration to integer types
695951bc CTest: introduce cmDuration

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1592
2018-01-26 08:27:37 -05:00
Pavel Solodovnikov
c85bb007df Reduce allocation of temporary values on heap.
- Use `std::move` while inserting temporary results into vectors.
- Change `push_back` to `emplace_back` where appropriate.
2018-01-26 13:24:45 +03:00
Kitware Robot
9a52b80d06 CMake Nightly Date Stamp 2018-01-26 00:01:07 -05:00
Brad King
3ec5f7c1a2 De-duplicate cmUVSignalHackRAII
This was added separately in `cmCTestMultiProcessHandler` and
`cmQtAutoGenerator`.  Factor out the duplicate code into a common header
for re-use.
2018-01-25 09:22:47 -05:00
Brad King
1ad58d3032 cmUVSignalHackRAII: Use nullptr instead of NULL 2018-01-25 09:21:39 -05:00
Brad King
d1d8daf15a Merge topic 'xl-qoptfile'
c4dc6485 XL: Enable use of response files for includes and objects
e342e410 Makefile,Ninja: Use tool-specific response file flag for include dirs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1691
2018-01-25 08:36:47 -05:00
Brad King
5c724c4ca8 Merge topic 'server-polish-opt-handshake'
239a3ef8 Server-mode: Document protocol version for optional handshake arguments
9b1a3d24 Server-mode: Rename functions to reflect what they do

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1693
2018-01-25 08:35:28 -05:00
Brad King
aaf3c5b32c Merge topic 'RemoveKDevelop3'
551bd0b3 Generators: adjust error message for the removed KDevelop3 generator
9198e6a2 Generators: remove KDevelop3 generator

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1688
2018-01-25 08:34:53 -05:00
Brad King
721647c8e5 Merge topic 'update-kwsys'
f8e89468 Merge branch 'upstream-KWSys' into update-kwsys
7a756570 KWSys 2018-01-23 (0579db1c)

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1695
2018-01-25 08:34:21 -05:00
Brad King
76f5a87cf1 Merge topic 'sourceFile-new-properties'
04483111 sourceFile properties: add property INCLUDE_DIRECTORIES
3073bd1f VisualStudio generators: refactoring
78b1c2e0 sourceFile properties: add property COMPILE_OPTIONS
3f935e69 LocalGenerator: refactoring

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1596
2018-01-25 08:33:35 -05:00
Brad King
03050c5689 Merge topic 'fix-include_regular_expression-subdir'
2d64f9f0 include_regular_expression: Fix propagation to subdirectories

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1690
2018-01-25 08:31:03 -05:00
Brad King
312512e2ba Merge topic 'windows-resources-through-link'
c3b80e86 Windows: Add support for running CMake tools through a symlink

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1680
2018-01-25 08:30:25 -05:00
Brad King
e46ca12acf Merge topic 'stdstring'
25243014 cmMakefile: use std::string in more methods; cleanup c_str()s

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1685
2018-01-25 07:59:08 -05:00
Kitware Robot
5189c1e322 CMake Nightly Date Stamp 2018-01-25 00:02:30 -05:00
Brad King
e342e4100a Makefile,Ninja: Use tool-specific response file flag for include dirs
When we use a response file for `-I` flags, not all compilers support
the `@<file>` syntax.  Define `CMAKE_<LANG>_RESPONSE_FILE_FLAG` to
specify tool-specific flag, just as we do for linking already via
`CMAKE_<LANG>_RESPONSE_FILE_LINK_FLAG`.
2018-01-24 14:31:53 -05:00
Brad King
f8e8946815 Merge branch 'upstream-KWSys' into update-kwsys
* upstream-KWSys:
  KWSys 2018-01-23 (0579db1c)
2018-01-24 14:11:07 -05:00
Tobias Hunger
9b1a3d244b Server-mode: Rename functions to reflect what they do
Rename the test* static functions to getOrTest* to better reflect
what they do now.
2018-01-24 17:01:40 +01:00
Marc Chevrier
0448311179 sourceFile properties: add property INCLUDE_DIRECTORIES 2018-01-24 15:10:10 +01:00
Pavel P
c3b80e8664 Windows: Add support for running CMake tools through a symlink
When `cmake.exe` is executed through a symlink, `GetModuleFileNameW`
will return location of the link instead of the real path of
`cmake.exe`.  This results in the following error output:

    CMake Error: Could not find CMAKE_ROOT !!!
    CMake has most likely not been installed correctly.

Use `cmSystemTools::GetRealPath` in `FindCMakeResources` on Windows
to resolve any symlink returned by `GetModuleFileNameW`.
2018-01-24 08:59:33 -05:00
Brad King
1a9da3c055 Merge topic 'cpack_trace'
93bc5848 CPack: accept --trace and --trace-expand

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1583
2018-01-24 08:52:03 -05:00
Brad King
2de6aa846f Merge topic 'vcxproj-spaces'
da1a500c cmVisualStudio10TargetGenerator: remove redundant space char in some tags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1684
2018-01-24 08:50:01 -05:00
Brad King
06d607271e Merge topic 'libuv-restore-fmode'
98628de8 Extend libuv file translate mode workaround to all executables
3b588ac5 cpack: Enable MSVC debug hook earlier

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1686
2018-01-24 08:36:35 -05:00
Alex Neundorf
551bd0b3e8 Generators: adjust error message for the removed KDevelop3 generator
If the user request a KDevelop3 project, tell the user that
KDevelop3 is not supported anymore, so he sees it's not just
a typo.

Alex
2018-01-24 08:30:02 -05:00
Alex Neundorf
9198e6a27b Generators: remove KDevelop3 generator
The last KDevelop3 release was many years ago, in 2008 I think.
I haven't seen or read about anybody using KDevelop 3 since a
long time, so I think it can safely be removed from CMake.
KDevelop 4 (first released in 2010) has its own proper CMake
support now, independent from this generator.

Alex
2018-01-24 08:30:02 -05:00
Brad King
2d64f9f08d include_regular_expression: Fix propagation to subdirectories
Refactoring in commit v3.4.0-rc1~321^2 (cmMakefile: Remove special
handling of INCLUDE_REGULAR_EXPRESSION, 2015-04-04) accidentally broke
propagation of the include regex to subdirectories.  Refactoring in
commit v3.5.0-rc1~319^2~1 (cmState: Initialize properties immediately,
2015-10-07) moved maintenance of this value from `cmMakefile` to
`cmStateSnapshot`.

Restore propagation of the `INCLUDE_REGULAR_EXPRESSION` to
subdirectories and add a test to cover it.

Fixes: #17676
2018-01-24 08:20:19 -05:00
Kitware Robot
1345bdf1b6 CMake Nightly Date Stamp 2018-01-24 00:02:43 -05:00
Wouter Klouwen
e6a80ccfc4 Make use of std::chrono throughout every component
This commit continues the changes made in CTest to support std::chrono
by
applying it throughout every component where a duration was used.

No functional change intended.
2018-01-23 18:56:42 +00:00
Isaiah Norton
93bc5848e7 CPack: accept --trace and --trace-expand 2018-01-23 13:15:53 -05:00
Vitaly Stakhovsky
25243014e5 cmMakefile: use std::string in more methods; cleanup c_str()s
Follow up commit 969c1f94ae (cmSourceGroup: code improvements; use
std::string and C++11 loops, 2017-01-10).
2018-01-23 11:10:04 -05:00
Wouter Klouwen
ff62b00522 CTest: add safe conversion from cmDuration to integer types
A problem area by recent refactoring of time to std::chrono has been the
unsafe conversion from duration<double> to std::chrono::seconds, which
is of an unspecified integer type.

This commit adds a template function that for a given type provides a
safe conversion, effectively clamping a duration<double> into what fits
safely in that type. A specialisation for int and unsigned int are
provided.

It changes the protential problem areas to use this safe function.
2018-01-23 10:05:12 -05:00
Wouter Klouwen
695951bc46 CTest: introduce cmDuration
This commit introduces cmDuration as a typedef for
std::chrono::duration<double, std::ratio<1>>. It is less verbose and
provides for a point to put future common functionality for durations.

No functional change intended.
2018-01-23 10:04:38 -05:00
Brad King
9c52b587b6 Merge topic 'recognize-versioned-shared-libraries'
5cbf3653 cmComputeLinkInformation: Better RPATH detection for versioned libraries.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1682
2018-01-23 09:36:09 -05:00
Brad King
ce863c17d0 Merge topic 'feature-codelite-fortran'
51caac69 CodeLite: Better support for Fortran and Windows

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1678
2018-01-23 09:35:43 -05:00
Brad King
98628de812 Extend libuv file translate mode workaround to all executables
Since libuv commit v1.14.1~7 (win: add uv__once_init() calls,
2017-08-30) the libuv initialization of the file translate mode may take
place even if we do not use a uv loop.  This change was included in our
libuv update commit f4a26c748b (libuv 2018-01-19).  Therefore use of
libuv even through `cmSystemTools::GetRealPath` in any executable may
trigger its file translate mode setting.

Factor out the logic added to `cmake.exe` by commit v3.9.0-rc4~10^2
(cmake: Fix default file translate mode when using libuv, 2017-06-13)
and re-use to initialize all executables.

Issue: #16962
2018-01-23 09:29:07 -05:00
Brad King
3b588ac582 cpack: Enable MSVC debug hook earlier
All other executables do this just after console and command-line
encoding conversion.  Do the same in CPack.
2018-01-23 09:27:30 -05:00
Marc Chevrier
3073bd1f3d VisualStudio generators: refactoring
Uniformize include directories handling.
Fix memory leaks in class cmVisualStudio10TargetGenerator:
OptionsMap uses now std::unique_ptr.
2018-01-23 10:25:03 +01:00