summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* IWYU: Fix handling of <memory> standard headerBrad King2019-07-101-0/+1
| | | | | | | | An old workaround for `std::allocator_traits<>::value_type` lints from IWYU on `std::vector<>` usage breaks IWYU's handling of `<memory>`. Convert the workaround to use the same approach we already use for a workaround of `std::__decay_and_strip<>::::__type` lints. Then update the `<memory>` inclusions to follow the now-correct IWYU lints.
* modermize: replace some raw pointers w/ `unique_ptr`Alex Turbov2019-06-241-1/+1
|
* Swift: disallow WIN32_EXECUTABLE propertiesSaleem Abdulrasool2019-06-031-0/+1
| | | | | | | | | | | Currently, the compiler does not synthesize the correct entry point for the application and passing the subsystem flag does not work the same way with the Swift linker language. Add a check to prevent the application of `WIN32_EXECUTABLE` to Swift executables until they can be properly supported. This will prevent the need for a future policy change. Closes: #19325
* Use cmAppend to append ranges to std::vector instancesSebastian Holtermann2019-05-231-1/+1
|
* Fix invalid ///! doxygen comment line startsSebastian Holtermann2019-03-311-11/+11
| | | | | In various places `///!` was used to start a comment line. This is not valid Doygen syntax. This patch replaces `///!` comment starts with `//!`.
* cmake: Teach --build mode to support multiple targetsBartosz Kosiorek2019-03-051-9/+9
| | | | Fixes: #16136
* cmGlobalGenerator: Optimize Printable() method from GeneratedMakeCommandBartosz Kosiorek2019-03-041-14/+1
|
* cmGlobalGenerator: Change case of methods from GeneratedMakeCommand structBartosz Kosiorek2019-03-041-3/+3
|
* 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