Commit Graph

15 Commits

Author SHA1 Message Date
Regina Pfeifer
32cb564bea clang-tidy: Remove redundant member initializations 2018-12-15 10:51:47 +01:00
Brad King
03d40110dc cmStateSnapshot: Add method to get current directory snapshot 2018-12-11 12:50:21 -05:00
Marc Chevrier
a71caab46b LINK_DIRECTORIES: Add new properties and commands
These new capabilities enable to manage link directories

Two new properties:
* target properties: LINK_DIRECTORIES and INTERFACE_LINK_DIRECTORIES

One new command
* target_link_directories(): to populate target properties

Fixes: #17215
2018-09-25 23:59:58 +10:00
Vitaly Stakhovsky
437d0c16c7 cmStateSnapshot::GetDefinition(): Return std::string const*
Expose std::string type used internally in cmDefinitions instead of const char*
2018-09-05 20:08:17 -04:00
Marc Chevrier
c1f5a44b28 LINK_OPTIONS: Add new family of properties
This family enable to manage link flags

Three new properties:
* directory property: LINK_OPTIONS
* target properties: LINK_OPTIONS and INTERFACE_LINK_OPTIONS

Two new commands
* add_link_options(): to populate directory property
* target_link_options(): to populate target properties

Fixes: #16543
2018-06-06 17:22:39 +02:00
Kitware Robot
d7204e649e Revise C++ coding style using clang-format-6.0
Run the `clang-format.bash` script to update all our C and C++ code to a
new style defined by `.clang-format`.  Use `clang-format` version 6.0.

* If you reached this commit for a line in `git blame`, re-run the blame
  operation starting at the parent of this commit to see older history
  for the content.

* See the parent commit for instructions to rebase a change across this
  style transition commit.
2018-06-01 09:53:42 -04:00
Brad King
391a5837ee cmake_policy: Add undocumented PARENT_SCOPE option to GET
Policies affecting the behavior of CMake-provided macros and functions
need to be able to get the policy setting as of the call site rather
than the definition site.  Add an undocumented option to do this.
2018-04-18 08:09:56 -04:00
jrp2014
acda926a04 Replace some uses of sprintf with std::to_string 2018-04-05 15:34:23 -04: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
Daniel Pfeifer
5962db4389 Use C++11 nullptr 2017-08-24 23:39:47 +02:00
Daniel Pfeifer
b1ec5deaf1 Pass large types by const&, small types by value 2017-06-04 00:48:21 +02:00
Brad King
c1aaf8a61d Fix CMAKE_HOST_SYSTEM_NAME on SunOS
In commit 0bbd993f (Make CMAKE_HOST_SYSTEM_NAME available in scripting
context, 2016-12-26) we added a call to `uname` that checks for a zero
return value.  However, on Solaris the `uname(2)` manual [1] says that
on success a non-negative value is returned.  Fix our return code check
so that we detect the `SunOS` name correctly.

[1] https://docs.oracle.com/cd/E53394_01/html/E54765/uname-2.html
2017-02-27 10:30:45 -05:00
Gregor Jasny
0bbd993f61 Make CMAKE_HOST_SYSTEM_NAME available in scripting context 2017-02-19 19:27:34 +01:00
Daniel Pfeifer
2e620f0b38 Fix several include-what-you-use findings 2016-11-08 09:42:04 -05:00
Stephen Kelly
e0a84904eb cmState: Split auxiliary classes into separate files
Port dependents to the new locations as needed.

Leave behind a cmState.h include in cmListFileCache to reduce noise. It
is removed in a following commit.
2016-10-19 15:40:59 +02:00