Commit Graph

38811 Commits

Author SHA1 Message Date
Brad King
f8ca0ab3ac Merge topic 'std-string-apis'
653b8946 Reduce raw string pointers usage.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1729
2018-02-01 08:05:33 -05:00
Brad King
3ffc9b99bb Merge topic 'UseSWIG-doc-clarify'
b844a414 UseSWIG: Clarify documentation of SWIG_OUTFILE_DIR
315b0927 UseSWIG: Improve documentation markup
ce130c7a UseSWIG: Convert docs to a bracket comment

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1733
2018-02-01 08:04:52 -05:00
Brad King
f04cc45850 Merge topic 'findmpi-linker-parsing-enh'
0def3604 FindMPI: Discard IMPI boilerplate text
9ecbec5e FindMPI: Support for IMPI's compiler check
76755367 FindMPI: Set up environment variables for wrapper
e7c0298d FindMPI: Retain unused link paths
8cddc899 FindMPI: Use more CMake variables
8b79107a FindMPI: Improve link information parsing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1694
2018-02-01 08:04:08 -05:00
Brad King
8cb92c25d7 Merge topic 'perf-from-callgrind'
901c4a1e cmExpandedCommandArgument: add an overload for const char*
88ed556d cmGeneratorTarget: make keyword strings const
14a13d30 cmGeneratorExpressionLexer: only tokenize strings with a '$'
f2b8d67f cmTarget: use static strings for special property names
6dfd0f92 cmGeneratorExpressionNode: avoid some strlen in $<TARGET_PROPERTY>
f9235fd4 cmAddCustomCommandCommand: use std::string const& for FileIsFullPath
c0e7a137 cmAddCustomCommandCommand: store keywords in strings

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1689
2018-02-01 08:03:13 -05:00
Kitware Robot
70695e72a6 CMake Nightly Date Stamp 2018-02-01 00:01:10 -05:00
Noel Eck
b844a414c7 UseSWIG: Clarify documentation of SWIG_OUTFILE_DIR
The `SWIG_OUTFILE_DIR` variable provides the option to specify an output
directory location.  This commit removes portion stating that this is
equal to the `swig -o` option since it does not set the output filename.

Fixes: #17703
Signed-off-by: Noel Eck <noel.eck@intel.com>
2018-01-31 14:22:24 -05:00
Brad King
315b0927e9 UseSWIG: Improve documentation markup 2018-01-31 14:20:17 -05:00
Brad King
ce130c7a6b UseSWIG: Convert docs to a bracket comment 2018-01-31 13:55:22 -05:00
Christian Pfeiffer
0def36043f FindMPI: Discard IMPI boilerplate text
Intel MPI on Windows prefixes all outputs with some boilerplate
copyright text. By discarding it, we should prevent any potential
clashes with our regex parsing.
2018-01-31 17:43:30 +01:00
Christian Pfeiffer
9ecbec5e01 FindMPI: Support for IMPI's compiler check
Intel MPI has an optional feature to check compatibility with the
compiler, given by I_MPI_CHECK_COMPILER.
This commit adds support for executing that check.
2018-01-31 17:27:38 +01:00
Christian Pfeiffer
767553674e FindMPI: Set up environment variables for wrapper
For MPICH derivates and Intel MPI, we can improve the compiler wrapper
behavior and accuracy by defining certain environment variables if they
haven't been set otherwise.
2018-01-31 17:27:37 +01:00
Ben Boeckel
901c4a1e05 cmExpandedCommandArgument: add an overload for const char*
Static string comparisons were causing heap allocations just for a
comparison.
2018-01-31 11:04:36 -05:00
Ben Boeckel
88ed556d99 cmGeneratorTarget: make keyword strings const 2018-01-31 11:04:36 -05:00
Ben Boeckel
14a13d30ee cmGeneratorExpressionLexer: only tokenize strings with a '$'
In standard libraries, `std::string::find` is usually implemented using
vectorized code. Since the Tokenize method iterates
character-by-character, doing an initial check using `find` improves
performance.
2018-01-31 11:04:36 -05:00
Ben Boeckel
f2b8d67f19 cmTarget: use static strings for special property names
Similar to 660769151a, the `SetProperty`
side is showing up in performance listings due to string comparisons.
2018-01-31 11:04:35 -05:00
Ben Boeckel
6dfd0f9294 cmGeneratorExpressionNode: avoid some strlen in $<TARGET_PROPERTY> 2018-01-31 11:04:35 -05:00
Ben Boeckel
f9235fd474 cmAddCustomCommandCommand: use std::string const& for FileIsFullPath 2018-01-31 11:04:35 -05:00
Ben Boeckel
c0e7a13702 cmAddCustomCommandCommand: store keywords in strings
Callgrind indicated that `strlen` was being called a lot of times here
due to the string comparisons. Since keywords are "sparse" in
`add_custom_command`, use a hash comparison to handle keywords and then
use strings for comparison since they have a built-in length parameter.
2018-01-31 11:03:51 -05:00
Brad King
a0c04e71eb Merge topic 'windows-cmake-stack-size'
c7cee1a1 Windows: Increase stack size used by CMake binaries

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1728
2018-01-31 10:53:21 -05:00
Pavel Solodovnikov
653b894683 Reduce raw string pointers usage.
* Change some functions to take `std::string` instead of
  `const char*` in the following classes: `cmMakeFile`, `cmake`,
  `cmCoreTryCompile`, `cmSystemTools`,  `cmState`, `cmLocalGenerator`
  and a few others.
* Greatly reduce using of `const char*` overloads for
  `cmSystemTools::MakeDirectory` and `cmSystemTools::RelativePath`.
* Remove many redundant `c_str()` conversions throughout the code.
2018-01-31 18:23:03 +03:00
Brad King
e2db8531f1 Merge topic 'windows-embed-cmake-gui-version'
45f6aa32 Windows: Embed version information into cmake-gui

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1726
2018-01-31 09:22:43 -05:00
Brad King
4499cc8bb6 Merge topic 'msvc_cuda_files_use_consistent_obj_names'
fa583869 CUDA: Use MSVC default pattern for naming object files

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1722
2018-01-31 08:36:24 -05:00
Brad King
a7ee918f19 Merge topic 'generate_speedup'
aed227fd cmLocalGenerator: change ImportedGeneratorTargets from vector to map
4443adc1 cmLocalGenerator: remove public GetImportedGeneratorTargets

Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: Attila Krasznahorkay <attila.krasznahorkay@gmail.com>
Merge-request: !1717
2018-01-31 08:34:59 -05:00
Brad King
3fd01be56b Merge topic 'source_group-TREE-args'
365e02e7 source_group: Fix TREE argument parsing

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1713
2018-01-31 08:34:24 -05:00
Brad King
174693dafe Merge topic 'CheckIPOSupported-doc-Fortran'
9e341f05 CheckIPOSupported: Document existing Fortran support

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1727
2018-01-31 08:33:29 -05:00
Brad King
0a37b515af Merge topic 'vs-restore-order'
1fe66c46 VS: Restore the order of the AdditionalIncludeDirectories tag

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1719
2018-01-31 08:33:00 -05:00
Brad King
efa5a26d02 Merge topic 'dedup-ComputeObjectFilenames'
79f22e84 Makefile,Ninja: De-duplicate ComputeObjectFilenames method

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1715
2018-01-31 08:32:27 -05:00
Brad King
063684503b Merge topic 'adsp-asmembler-identification'
f83330ed ASM: ADSP assembler identification

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1723
2018-01-31 08:31:49 -05:00
Brad King
a50828cc51 Merge topic 'FindCUDA-restore-config-types'
9f74aaeb FindCUDA: Fix regression in per-config flags

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1725
2018-01-31 08:31:06 -05:00
Kitware Robot
f5b5a72096 CMake Nightly Date Stamp 2018-01-31 00:01:06 -05:00
Brad King
c7cee1a11e Windows: Increase stack size used by CMake binaries
Deep regex matching logic can exceed the default 1MB stack size.  Until
a better regex engine is used, simply push the problem over a farther
horizon by increasing the stack size when built using a MSVC-compatible
linker.

Issue: #17659
2018-01-30 14:40:40 -05:00
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
Brad King
9e341f05b0 CheckIPOSupported: Document existing Fortran support
Support was added by commit v3.9.0-rc1~318^2 (CheckIPOSupported: Add
Fortran support, 2017-04-02) but the documentation was not updated.
2018-01-30 12:58:41 -05:00
Mateusz Janek
365e02e73e source_group: Fix TREE argument parsing
Fixes: #17581
2018-01-30 12:49:26 -05:00
Christian Pfeiffer
e7c0298d5c FindMPI: Retain unused link paths
If our ``find_library`` step hasn't used a particular link directory at
all, it's best to retain it in order to prevent issues from secondary
dependencies not being found.
2018-01-30 18:23:45 +01:00
Christian Pfeiffer
8cddc89926 FindMPI: Use more CMake variables
This replaces hardcoded expectations of flags like -l and -L with a
dynamical solution based on CMake platform variables.

Furthermore, the linker flag parsing is dynamified to support more forms
and given linker paths are now removed properly from the linker flags.
2018-01-30 18:23:45 +01: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
45f6aa3235 Windows: Embed version information into cmake-gui
In commit 5b9da05b7a (Windows: Embed version information into CMake
binaries, 2017-10-25) we accidentally left out cmake-gui.
2018-01-30 11:51:03 -05:00
Robert Maynard
fa583869f7 CUDA: Use MSVC default pattern for naming object files
The default that CUDA uses causes failures when you try to embed
CUDA obj's into another target.
2018-01-30 09:14:02 -05:00
Vitaly Stakhovsky
1fe66c462b VS: Restore the order of the AdditionalIncludeDirectories tag
Move the `AdditionalIncludeDirectories` tag back to the VS-preferred
location in `.vcxproj` files.

Fixes: #17691
2018-01-30 08:53:04 -05:00
Brad King
142938225e Merge topic 'update_foreach_range_doc'
7771657c Help: Better explain that foreach(RANGE ) is inclusive.

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1716
2018-01-30 08:48:32 -05:00
Brad King
ed91b81c0d Merge topic 'doc-typo-CMAKE_INCLUDE_CURRENT_DIR'
99e473ca Help: Fix typo in CMAKE_INCLUDE_CURRENT_DIR docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1708
2018-01-30 08:48:03 -05:00
Brad King
eddea58148 Merge topic 'doc-typo-CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE'
fc57afde Help: Fix typo in CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE docs

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1709
2018-01-30 08:47:18 -05: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
Brad King
9f74aaeb7d FindCUDA: Fix regression in per-config flags
Changes in commit 48f7e2d300 (Unhardcode the CMAKE_CONFIGURATION_TYPES
values, 2017-11-27) accidentally left `CUDA_configuration_types`
undefined, but this is used in a few places to handle per-config flags.
Restore it.

Fixes: #17671
2018-01-30 08:18:11 -05:00
Anton Danielsson
f83330ed6c ASM: ADSP assembler identification
Add support to identify the ADSP (Analog Devices) assembler
in CMakeDetermineASMCompiler.

Fixes: #17695
2018-01-30 10:06:01 +01:00
Kitware Robot
c6312835d5 CMake Nightly Date Stamp 2018-01-30 00:01:05 -05:00
Robert Maynard
7771657cd0 Help: Better explain that foreach(RANGE ) is inclusive. 2018-01-29 10:52:14 -05:00
Brad King
79f22e8408 Makefile,Ninja: De-duplicate ComputeObjectFilenames method
Move the method implementation up to `cmLocalCommonGenerator`
to avoid duplicating it in each generator.
2018-01-29 10:51:22 -05:00