summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
Commit message (Collapse)AuthorAgeFilesLines
* LINK_DIRECTORIES: Add new properties and commandsMarc Chevrier2018-09-251-0/+3
| | | | | | | | | | | | 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
* Merge topic 'getsafedef-stdstring'Brad King2018-09-181-1/+2
|\ | | | | | | | | | | | | f4ff60a803 cmMakefile: Make GetSafeDefinition return std::string const& Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2350
| * cmMakefile: Make GetSafeDefinition return std::string const&Vitaly Stakhovsky2018-09-181-1/+2
| |
* | target_link_libraries: Allow use with targets in other directoriesBrad King2018-09-121-0/+10
|/ | | | | | | | | | | | | | | | | | | | | Previously the command did not allow naming targets on the LHS that were not created in the calling directory. Lift this restriction to enable more flexible use by projects. Targets named on the RHS will need to be looked up during generation in the scope of the call site rather than the scope of the LHS target. Introduce an internal syntax in `[INTERFACE_]LINK_LIBRARIES` properties to specify target names that need to be looked up in a directory other than that containing the target on which the property is set. Add minimal documentation of the syntax to help users that encounter it. Unfortunately CMake previously did allow such calls in the case that only `INTERFACE` libraries are specified, but those libraries would be looked up in the target's directory rather than the caller's. Add policy `CMP0079` to enable the new behavior with new lookup scope in a compatible way. Fixes: #17943
* cmMakefile: Make GetRequiredDefinition return std::stringVitaly Stakhovsky2018-09-051-1/+1
| | | | | | | In all cases the return value is converted to std::string anyway. Also remove unnecessary `c_str()` calls in arguments to `GetRequiredDefinition`.
* cmMakefile: return directories as const std::string&Vitaly Stakhovsky2018-08-271-2/+2
|
* LINK_OPTIONS: Add new family of propertiesMarc Chevrier2018-06-061-0/+3
| | | | | | | | | | | | | | 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
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-3/+6
| | | | | | | | | | | | 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.
* cmake: Add options for parallel builds to --build modeFlorian Maushart2018-05-251-1/+2
| | | | | | | While we already support `cmake --build . -- -j`, the options after `--` are specific to the native build tool. Add new options `--parallel [<N>]` and `-j [<N>]` to abstract this and map to the proper option for the native build tool.
* cmMakefile: Convert private helpers to file static functionsVitaly Stakhovsky2018-05-011-3/+0
| | | | | | The two-argument forms of `AddDefineFlag` and `RemoveDefineFlag` need no access to `cmMakefile` class members. They are used only within the implementation file.
* cmMakefile: Improve ExpandVariablesInString return typeVitaly Stakhovsky2018-05-011-6/+5
| | | | | Return `std::string const&` instead of a `const char*` that points into a string anyway. Update call sites accordingly.
* add_compile_definitions: add new commandMarc Chevrier2018-04-201-0/+1
| | | | | | | This command manages preprocessor definitions at directory level and supports generator expressions. Fixes: #15374
* cmake_policy: Add undocumented PARENT_SCOPE option to GETBrad King2018-04-181-1/+2
| | | | | | 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.
* Features: Add infrastructure for C++ 20 language standardBrad King2018-03-271-1/+1
| | | | Issue: #17849
* Merge topic 'policy-version-range'Craig Scott2018-03-221-1/+2
|\ | | | | | | | | | | | | | | | | | | 45408b5ea1 cmake_minimum_required: Optionally set policies with version range 6a41aa2abd cmPolicies: Split parsing and impl of ApplyPolicyVersion 1d00ed7cf7 cmPolicies: Drop unnecessary check from ApplyPolicyVersion 0df559832b cmPolicies: Pass policy version as std::string Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1864
| * cmake_minimum_required: Optionally set policies with version rangeBrad King2018-03-211-1/+2
| | | | | | | | | | | | | | | | Teach `cmake_minimum_required` and `cmake_policy(VERSION)` to support a version range of the form `<min>[...<max>]`. Define this to mean that version `<min>` is required, but known policies up to those introduced by `<max>` will be set to `NEW`. This will allow projects to easily specify a range of versions for which they have been updated.
| * cmPolicies: Pass policy version as std::stringBrad King2018-03-161-1/+1
| |
* | find_package: Use PackageName_ROOT variables as search prefixesBrad King2018-03-161-3/+6
|/ | | | | | | | | | | | | | | | | | | This feature was originally added by commit v3.9.0-rc1~71^2~2 (find_*: Add a new PackageRoot search path group, 2017-05-03) and documented by commit v3.9.0-rc1~71^2 (find_*: Add docs for PackageRoot search path group, 2017-05-03). However, we had to disable the feature and remove the documentation in commit v3.9.1~2^2 (find_*: Disable the PACKAGE_ROOT search path group for CMake 3.9, 2017-08-08) due to breaking projects that used `PackageName_ROOT` variables themselves. Add policy `CMP0074` to restore the `PackageName_ROOT` variable behavior in a compatible way. Also revise the stack of root paths to store the paths themselves rather than the package names. This way the policy can be considered at the `find_package` call site instead of individual `find_` calls inside a find module. Co-Author: Chuck Atkins <chuck.atkins@kitware.com> Issue: #17144
* cmMakefile: Improve performance of GetSource for known filesFrank Winklmeier2018-02-231-0/+3
| | | | | | | Store "Known" files separately in KnownFileSearchIndex. This avoids creating the rather expensive cmSourceFileLocation object for source files that are already known. For large projects this results in a factor 3-4 speedup of cmGlobalGenerator::Compute().
* Reduce raw string pointers usage.Pavel Solodovnikov2018-01-311-9/+10
| | | | | | | | | | * 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.
* cmMakefile: use std::string in more methods; cleanup c_str()sVitaly Stakhovsky2018-01-231-2/+2
| | | | | Follow up commit 969c1f94ae (cmSourceGroup: code improvements; use std::string and C++11 loops, 2017-01-10).
* cmSourceFileLocation: allow skipping ambiguous extensionsBen Boeckel2018-01-101-5/+10
| | | | | | | | | | | The ambiguous extension logic is an old behavior that ends up taking lots of extra compute cycles to execute. This is triggered by various CMake codepaths which pass extension-less paths down when CMake actually knows that they are not ambiguous. These codepaths will be indicated in upcoming changes. Various APIs have gained a cmSourceFileLocationKind parameter, but they are all optional and default to the existing behavior.
* Merge topic '17431-iphone-deployment-target'Brad King2018-01-081-1/+16
|\ | | | | | | | | | | | | | | 4017bf40 Darwin: Emit deployment target that matches the SDK 8f4663ff Xcode: rename embedded SDK query function Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1447
| * Darwin: Emit deployment target that matches the SDKGregor Jasny2017-12-221-0/+15
| | | | | | | | Closes: #17431
| * Xcode: rename embedded SDK query functionGregor Jasny2017-12-221-1/+1
| |
* | Various typo fixesLuz Paz2018-01-031-1/+1
|/ | | | Some are user-facing. Others are source comments.
* Merge topic 'server-target-isGeneratorProvided'Brad King2017-11-271-3/+10
|\ | | | | | | | | | | | | afd9a339 server: return whether or not a target is generator provided Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1475
| * server: return whether or not a target is generator providedJustin Goshi2017-11-201-3/+10
| | | | | | | | | | | | Some generators auto-generate targets. For example VS generators create the ALL_BUILD target. Add the ability to mark targets as generator provided and return that info through cmake-server codemodel.
* | Merge topic 'serverFixTestDiscovery'Brad King2017-11-271-5/+5
|\ \ | |/ |/| | | | | | | | | fe2c2b0f server: ctestInfo fix to return all tests Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1479
| * server: ctestInfo fix to return all testsJustin Goshi2017-11-171-5/+5
| | | | | | | | | | Prior to this change we were looking at targets. But tests are associated with directories. This change fixes how we gather all tests.
* | Performance: Improve efficiency of source file lookup in cmMakefileAaron Orenstein2017-11-171-1/+12
|/ | | | | | | | | This reintroduces the change from commit v3.10.0-rc1~69^2 (Performance: Improve efficiency of source file lookup in cmMakefile, 2017-08-17) with some corrections. The original was rolled back by commit v3.10.0-rc1~52^2~1 (Revert "Performance: ...", 2017-09-25) due to incompatibilities found. The rollback was followed-up by addition of a test for the offending case, and this revision passes the test.
* Merge topic 'server-test-info'Brad King2017-11-071-0/+5
|\ | | | | | | | | | | | | 35a52bd1 server: add "ctestInfo" request to get test info Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1414
| * server: add "ctestInfo" request to get test infoJustin Goshi2017-11-031-0/+5
| |
* | Fix trivial typos in textluzpaz2017-11-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some are user facing. Found using codespell -q 3 --skip="./Utilities" -I .cmake-whitelist.txt` whereby the whitelist contained: ans dum helpfull emmited emmitted buil iff isnt nto ot pathes substract te todays upto whitespaces
* | CMP0037: De-duplicate check and message generationBrad King2017-10-301-0/+3
|/
* cmake-server: Add target install destinations to codemodelJustin Goshi2017-10-241-0/+4
| | | | | Protocol version is updated to 1.2 since this is a change to what was released in cmake version 3.10.
* Merge topic 'auto_ptr'Brad King2017-09-271-6/+7
|\ | | | | | | | | | | | | | | f0489856 Retire std::auto_ptr and its macro CM_AUTO_PTR Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Pavel Solodovnikov <hellyeahdominate@gmail.com> Merge-request: !1300
| * Retire std::auto_ptr and its macro CM_AUTO_PTRMatthias Maennich2017-09-251-6/+7
| | | | | | | | Signed-off-by: Matthias Maennich <matthias@maennich.net>
* | Revert "Performance: Improve efficiency of source file lookup in cmMakefile"Brad King2017-09-251-11/+0
|/ | | | | | This reverts commit 3b95ab569345028a1a8fe521d5ecd81fa97f2653. It regressed some legacy source file property behavior. Revert pending further investigation.
* Performance: Improve efficiency of source file lookup in cmMakefileAaron Orenstein2017-09-201-0/+11
| | | | Add an unordered map to cmMakefile to speed up GetSource() lookups.
* cmMakefile: Drop unused methodAaron Orenstein2017-09-201-1/+0
|
* cmMakefile: Add GetOrCreateSourceGroup methodsSebastian Holtermann2017-09-091-0/+12
|
* cmMakefile: Collect source group methods in one placeSebastian Holtermann2017-09-091-23/+18
|
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Use C++11 nullptrDaniel Pfeifer2017-08-241-16/+18
|
* Merge topic 'autogen-optimize-cleanup'Brad King2017-08-231-5/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | 8e452e67 Remove AUTOGEN variables from cmSourceFile and cmMakefile 0f2e178f Autogen: Don't use cmMakefile::GetQtUiFilesWithOptions 13bb716f Autogen: Fix and extend SKIP_AUTOMOC test 727247c3 Autogen: Read skip files from makefile 1eb1b409 Autogen: Remove VS specific code exclusion 54ec2a8b Autogen: Initializer file type scanning optimizations cf7b3b96 Autogen: Initializer optimizations and cleanups Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1171
| * Remove AUTOGEN variables from cmSourceFile and cmMakefileSebastian Holtermann2017-08-221-5/+0
| |
* | Use C++11 unordered containersDaniel Pfeifer2017-08-221-3/+3
|/
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-1/+1
|
* find_*: Add a new PackageRoot search path groupChuck Atkins2017-05-161-0/+5
| | | | | | The new PackageRoot search path group allows the PackageName_ROOT cmake and environment variables to be used as search prefixes for all find_* commands called from within a find module