summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'tidy-use-equals-default'Brad King2019-01-291-2/+0
|\ | | | | | | | | | | | | | | | | 094f01d0f0 cleanup: Prefer compiler provided special member functions 55671b41d2 clang-tidy: Use `= default` Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Brad King <brad.king@kitware.com> Merge-request: !2841
| * cleanup: Prefer compiler provided special member functionsRegina Pfeifer2019-01-251-2/+0
| |
| * clang-tidy: Use `= default`Regina Pfeifer2019-01-251-2/+2
| | | | | | | | | | | | Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and `Source/cmUVHandlePtr.h` where a few older compilers require a user-defined default constructor (with `{}`).
* | Merge topic 'add_consistent_verbose_build_flag'Brad King2019-01-291-1/+53
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 66801f4d40 cmake: Add tests for verbose output to --build mode 439fe2e253 cmake: Add options for verbose output to --build mode 638667efa2 cmake: cmcmd.cxx fix "The arguments are" comments 3ca4402966 ctest: Fix --build-and-test without --build-target on Xcode cb6c233ecc cmake: Add -hideShellScriptEnvironment xcodebuild option 1a45266cb5 cmGlobalGenerator: Add a class that represent the build command Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2708
| * | cmGlobalGenerator: Add a class that represent the build commandRobert Maynard2019-01-251-1/+53
| |/ | | | | | | | | | | This refactors a std::vector<std::string> into a class so that we can extend the features to represent things such as multiple chained commands in the future.
* | Merge topic 'max-recursion-depth'Brad King2019-01-251-0/+2
|\ \ | | | | | | | | | | | | | | | | | | | | | a6982cff0d cmMakefile: Impose maximum recursion limit Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Juraj Oršulić <juraj.orsulic@fer.hr> Merge-request: !2746
| * | cmMakefile: Impose maximum recursion limitKyle Edwards2019-01-231-0/+2
| |/ | | | | | | | | | | | | | | | | In order to keep infinitely-recursive scripts from causing a stack overflow in the CMake executable, CMake now imposes a maximum recursion limit before issuing an error message. The limit can be adjusted at runtime with CMAKE_MAXIMUM_RECURSION_DEPTH. Fixes: #18694
* | Pass EXCLUDE_FROM_ALL from directory to targetsZack Galbreath2019-01-211-1/+1
|/ | | | | | When a target is created it now inherits the EXCLUDE_FROM_ALL property from its directory. This change makes it possible to include a target in "all", even if its directory has been marked as EXCLUDE_FROM_ALL.
* clang-tidy: Use default member initializationRegina Pfeifer2018-12-151-10/+4
|
* fileapi: Report cmake generator in reply index fileBrad King2018-12-121-0/+6
|
* Merge topic 'getsafedef-stdstring'Brad King2018-09-181-1/+1
|\ | | | | | | | | | | | | 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/+1
| |
* | target_link_libraries: Allow use with targets in other directoriesBrad King2018-09-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Make internal TARGET_PROPERTY generator expressions more robustBrad King2018-09-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | While collecting usage requirements from the `INTERFACE_*` properties of directly linked targets, we internally generate `TARGET_PROPERTY:` and `TARGET_OBJECTS:` generator expressions to refer to those properties on those targets. At the point we generate these expressions we already have a pointer to an exact `cmGeneratorTarget` instance. Switch from using the target name in these generator expressions to using an internal unique name generated for each `cmGeneratorTarget` instance to be referenced. This avoids depending on the user-facing target name to find the same target we already have.
* | cmGlobalGenerator: Remove unused FindLocalGenerator methodBrad King2018-09-111-2/+0
|/ | | | | This method has not been used since commit v3.4.0-rc1~234^2~1 (cmGlobalGenerator: Port Find API to cmMakefile, 2015-08-02).
* cmGlobalGenerator::AddInstallComponent(): Accept std::string argumentVitaly Stakhovsky2018-08-301-1/+1
|
* Merge topic 'autogen_single_entry'Brad King2018-08-061-4/+3
|\ | | | | | | | | | | | | 87e7904c91 Autogen: Use a single AUTOGEN setup function in cmGlobalGenerator Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2260
| * Autogen: Use a single AUTOGEN setup function in cmGlobalGeneratorSebastian Holtermann2018-08-031-4/+3
| | | | | | | | | | | | By moving all AUTOGEN setup code in ``cmGlobalGenerator`` into a single ``cmGlobalGenerator::QtAutoGen`` function, the ``cmGlobalGenerator::Compute`` function becomes cleaner.
* | cmGlobalGenerator: Add IsXcode queryBrad King2018-08-011-0/+2
|/ | | | Make it easy to detect use of the Xcode generator.
* Revise C++ coding style using clang-format-6.0Kitware Robot2018-06-011-9/+10
| | | | | | | | | | | | 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-5/+8
| | | | | | | 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.
* Make use of std::chrono throughout every componentWouter Klouwen2018-01-231-3/+4
| | | | | | | | 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.
* Autogen: Rename cmQtAutogeneratorInitializer to cmQtAutoGenInitializerSebastian Holtermann2018-01-171-2/+2
|
* Merge topic 'include_external_ms_project_support_non_windows_target'Brad King2017-12-051-0/+4
|\ | | | | | | | | | | | | | | 2c06e9e7 include_external_msproject: Support non-Windows target platforms c89e8522 cmGlobalGenerator: Add IsIncludeExternalMSProjectSupported method Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1525
| * cmGlobalGenerator: Add IsIncludeExternalMSProjectSupported methodTomoki Imai2017-12-041-0/+4
| |
* | Autogen: Make cmQtAutoGeneratorInitializer an instantiable classSebastian Holtermann2017-11-191-2/+3
|/ | | | | Remove the cmQtAutoGenDigest classes and make cmQtAutoGeneratorInitializer instantiable instead.
* CMP0037: Allow test and package targets when features are not enabledBrad King2017-10-301-0/+3
| | | | | | | When CMake will not generate a test, package, or package_source target, allow projects to create their own targets with these names. Fixes: #16062
* Merge topic 'defer-target-source-check'Brad King2017-10-251-0/+2
|\ | | | | | | | | | | | | | | 4e7f6738 Defer check for sources within a target until generation. 6e4e7c65 Tests: Exclude bad RunCMake.add_executable case on multi-arch Xcode Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1242
| * Defer check for sources within a target until generation.Deniz Bahadir2017-10-241-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `add_library` and `add_executable` commands can now be called with no source-files and won't generate a warning or error message, as long as source-files will be added later via the `target_sources` command. If during the generation step still no sources are associated with targets created by such calls a useful error message will be generated and generation fails. Targets of type `INTERFACE_LIBRARY`, `UTILITY` or `GLOBAL_TARGET` are excluded from this check because we do not need sources for these target types during generation. Fixes: #16872
* | Add infrastructure for generators to select a build tool instanceBrad King2017-10-191-0/+3
|/ | | | | | | | | | | | | | Add cache entry `CMAKE_GENERATOR_INSTANCE` to hold the instance location persistently across re-runs of CMake in a given build tree. For now we reject the option by default if explicitly set. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add a RunCMake.GeneratorInstance test to cover basic use cases for the option. Verify that `CMAKE_GENERATOR_INSTANCE` is empty by default, and that it is rejected when the generator does not support a user setting. Issue: #17268
* cmake: Add --open option for IDE generatorsGregor Jasny2017-10-131-0/+6
|
* Autogen: Iterate source files only onceSebastian Holtermann2017-09-071-1/+3
| | | | | | | | | | | | | | This is a large commit that serves multiple purposes - Iterate source files only once and store all extracted information in a cmQtAutogenDigest class that can be reused. This is brings speed improvements because several properties are only evaluated once. More that that it helps to avoid duplication of code with non trivial files property checks. - Fix the Visual Studio generator to use PRE_BUILD when possible. - Convert `for( ... )` loops to C++11 range base loops where possible (cmQtAutogen*.cxx only). - String concatenation optimizations.
* clang-format: format all code as Cpp11Daniel Pfeifer2017-08-301-3/+3
|
* 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-8/+8
|
* Use C++11 unordered containersDaniel Pfeifer2017-08-221-4/+5
|
* cmGlobalGenerator: Rename member to avoid shadowingBrad King2017-06-141-3/+9
| | | | | | The `CurrentMakefile` member is shadowed by a generate-time member of the same name in `cmGlobalXCodeGenerator`. Rename our member to clarify its configure-time role and avoid the shadow.
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-2/+4
|
* cmGlobalGenerator::DirectoryContent: remove custom copy ctorDaniel Pfeifer2017-04-211-6/+0
|
* cmGlobalGenerator: Add method to check if object file location is knownBrad King2017-04-181-0/+5
| | | | | | | Add a `HasKnownObjectFileLocation` method returning whether we know the exact location of object files produced by the native build system. This is true everywhere except on Xcode when an architecture placeholder is used.
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Merge topic 'ipo-policy-CMP0069'Brad King2017-03-311-0/+2
|\ | | | | | | | | | | | | | | | | | | | | | | dfa8263f Implement interprocedural optimization for GNU compilers 1588a577 Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATION a7575700 Refactoring: s,GetFeatureAsBool,IsIPOEnabled, e05835c3 CheckIPOSupported: Visual Studio and Xcode generators do not support IPO Acked-by: Kitware Robot <kwrobot@kitware.com> Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Nils Gladitz <nilsgladitz@gmail.com> Merge-request: !568
| * Add policy CMP0069 to enforce INTERPROCEDURAL_OPTIMIZATIONRuslan Baratov2017-03-301-0/+2
| | | | | | | | | | | | | | | | | | Previously the `INTERPROCEDURAL_OPTIMIZATION` target property was honored only for the Intel compiler on Linux and otherwise ignored. In order to add support for more compilers incrementally without changing behavior in the future, add a new policy whose NEW behavior enforces the `INTERPROCEDURAL_OPTIMIZATION` property. Add flags for supported compilers and otherwise produce an error.
* | Apple: Fix Resources location for all generatorsGregor Jasny2017-03-231-0/+4
|/ | | | Issue: #16680
* Add policy CMP0068 separate install_name and RPATH settings on macOSClinton Stimpson2017-02-141-0/+3
| | | | | | | | BUILD_WITH_INSTALL_RPATH, SKIP_BUILD_RPATH, CMAKE_SKIP_RPATH and CMAKE_SKIP_INSTALL_RPATH no longer any effect on the install name of a target on macOS. Fixes: #16589
* Xcode: Control emission of EFFECTIVE_PLATFORM_NAMEGregor Jasny2017-01-201-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When building with multiple SDKs within one project Xcode requires the usage of ${EFFECTIVE_PLATFORM_NAME} to put temporary and build outout into separate directories. For example an iOS device and simulator build use two different SDKs (iphoneos and iphonesimulator). In the past cmake tries to detect embedded toolchains that could possibly use simulators and emitted EFFECTIVE_PLATFORM_NAME (EPN) at the proper locations. In #16253 Mark noticed that if he uses macosx and iphoneos in combination the necessary EPN is not emitted. This is because CMake by default assumes macosx SDK which does not trigger EPN emission. The fist naive approach - enabling EPN unconditionally revealed that then the EPN leaks into generator expressions like $<TARGET_FILE:xxx> which might be a regression and thus is unacceptable. The next approach was to add an CMake property to enable EPN emission unconditionally. This solved the reported problem. But the EPN leakage also happened for the embedded toolchains already without anyone noticing. So the control property was turned into a tri-state one: * No definition: EPN is activated for embedded toolchains like before * ON: EPN is always emitted * OFF: EPN is never emitted That approach gives the user the chance to disable EPN for embedded toolchains and restores generator expression functionality for those. Closes: #16253
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-11/+11
|
* Introduce CM_UNORDERED_MAPDaniel Pfeifer2016-10-241-21/+4
| | | | | Avoid duplicating switch among std::unordered_map, cmsys::hash_map, and std::map.
* cmGlobalGenerator: Allow FindMakeProgram to failBrad King2016-10-201-1/+1
| | | | | Revise its signature to return `bool` so that it can fail and abort configuration early.
* cmState: Split auxiliary classes into separate filesStephen Kelly2016-10-191-1/+2
| | | | | | | 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.