summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'reduce-allocations'Brad King2016-01-211-6/+6
|\ | | | | | | | | | | | | | | | | 70788e92 Remove temporary allocations when calling cmHasLiteral{Suf,Pre}fix. bd2384f5 Optimize cmMakefile::ExpandVariablesInStringNew. ad9394f4 Remove temporary allocations in cmMacroHelper::InvokeInitialPass. f9599ed4 Remove temporary allocations by extending the lifetime of the retval. 275f2a85 Remove temporary allocations when calling cmGeneratorTarget::GetName.
| * Remove temporary allocations by extending the lifetime of the retval.Milian Wolff2016-01-201-6/+6
| | | | | | | | | | | | | | | | | | | | See also Herb Sutter's article on the "most important const": http://herbsutter.com/2008/01/01/gotw-88-a-candidate-for-the-most-important-const/ When running the CMake daemon on the KDevelop build dir, this removes some hundreds of thousands of temporary allocations. This hotspot was found with heaptrack.
* | cmSystemTools: Rename OUTPUT_NORMAL to OUTPUT_FORWARD to clarify its purposeBrad King2016-01-191-1/+1
|/ | | | | | The OUTPUT_NORMAL value is not really "normal" and has only one caller. Rename it to OUTPUT_FORWARD to clarify that we are explicitly forwarding the output.
* Alias: Fix access at generate-time (#15832)Stephen Kelly2015-11-081-0/+6
| | | | | | | | | | | | Commit c389f8bb (cmLocalGenerator: Port Find method away from GetGeneratorTarget, 2015-10-25) ported the implementation of FindGeneratorTargetToUse away from the FindTargetToUse method, but neglected to handle alias targets. The latter method has a parameter to determine whether to include alias targets in the search, but as that is only needed at configure time, this generate-time equivalent does not need the condition.
* cmGlobalGenerator: Remove map from cmTarget to cmGeneratorTargetStephen Kelly2015-10-271-23/+3
| | | | | | | The configure-time and generate-time types should be completely independent. Add ownership of cmGeneratorTarget instances to the cmLocalGenerator.
* cmLocalGenerator: Port Find method away from GetGeneratorTargetStephen Kelly2015-10-271-11/+28
| | | | Mirror the cmMakefile::FindTarget method.
* cmGlobalGenerator: Add FindGeneratorTarget APIStephen Kelly2015-10-271-0/+48
|
* cmLocalGenerator: Store imported targets in a separate container.Stephen Kelly2015-10-271-0/+1
|
* cmTarget: Implement ALIAS in terms of name mappingStephen Kelly2015-10-271-4/+6
| | | | Remove mapping to cmTarget.
* cmGlobalGenerator: Remove unneeded GetGeneratorTargetStephen Kelly2015-10-271-2/+1
|
* cmGlobalGenerator: Remove direct storage of targetsStephen Kelly2015-10-271-31/+49
| | | | Find the target by looping when needed.
* Port to GetGeneratorTargets.Stephen Kelly2015-10-241-24/+23
|
* cmGlobalGenerator: Move GeneratorTargetsType to usage site.Stephen Kelly2015-10-241-0/+12
|
* cmLocalGenerator: Store a vector of generator targets.Stephen Kelly2015-10-211-1/+1
| | | | Not a map from cmTarget to cmGeneratorTarget.
* Merge topic 'use-generator-target'Brad King2015-10-211-3/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | c099e00f Access policy status from cmGeneratorTarget at generate time. d74bca5a cmGeneratorTarget: Copy the policy map from the cmTarget. c6e86955 cmTarget: Remove unused NameResolvesToFramework. 18046bd5 cmCommonTargetGenerator: Use NameResolvesToFramework without cmTarget. 91411641 Move ComputeLinkType out of cmTarget. 6d94078e cmGeneratorTarget: Move IsDLLPlatform from cmTarget. 3ebc6285 cmGeneratorTarget: Move HaveWellDefinedOutputFiles from cmTarget. 311018e5 cmGeneratorTarget: Move GetExportMacro from cmTarget. 215cd21a cmGeneratorTarget: Provide direct access to the backtrace. 1df8bd3a cmGlobalGenerator: Port IsRootOnlyTarget to cmGeneratorTarget. 83703bda cmGeneratorTarget: Copy IsExecutableWithExports from cmTarget.
| * cmGlobalGenerator: Port IsRootOnlyTarget to cmGeneratorTarget.Stephen Kelly2015-10-201-3/+3
| |
* | cmLocalGenerator: Remove cmGeneratorTargetsType from setter API.Stephen Kelly2015-10-201-3/+1
| |
* | cmLocalGenerator: Don't store imported generator targetsStephen Kelly2015-10-201-1/+0
|/ | | | | No consumers need them. This makes GetGeneratorTargets more comparable to cmMakefile::GetTargets, which does not include imported targets.
* cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.Stephen Kelly2015-10-191-1/+2
| | | | Leave the cmTarget method behind for now to implement cmInstallCommand.
* cmExportTryCompileFileGenerator: Port to cmGeneratorTarget.Stephen Kelly2015-10-181-0/+20
|
* cmGlobalGenerator: Compute export() related classes early.Stephen Kelly2015-10-181-2/+1
| | | | Simplify CMP0024 handling.
* Merge topic 'genex-consumers-generator-targets'Brad King2015-10-161-2/+2
|\ | | | | | | | | | | c4ae1578 Genex: Port some access API to cmGeneratorTarget. 6d27a3db Genex: Port implementation to cmGeneratorTarget.
| * Genex: Port some access API to cmGeneratorTarget.Stephen Kelly2015-10-151-2/+2
| |
* | cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-13/+13
|/ | | | | | | Mostly automated: values=( "EXECUTABLE" "STATIC_LIBRARY" "SHARED_LIBRARY" "MODULE_LIBRARY" "OBJECT_LIBRARY" "UTILITY" "GLOBAL_TARGET" "INTERFACE_LIBRARY" "UNKNOWN_LIBRARY" "TargetType") for i in "${values[@]}"; do git grep -l cmTarget::$i | xargs sed -i "s|cmTarget::$i|cmState::$i|g"; done
* cmLocalGenerator: Store cmGeneratorTargets.Stephen Kelly2015-10-141-1/+1
| | | | Relieve cmMakefile of this responsibility.
* cmMakefile: Store container of cmExportBuildFileGenerators.Stephen Kelly2015-10-141-3/+29
| | | | | | | | | Set a cmLocalGenerator on each instance at compute time. That will soon be needed to access cmGeneratorTarget instances. If a cmExportBuildFileGenerator is processed early during configure time as a result of CMP0024 it must be removed from the list to process later at generate time.
* cmGeneratorTarget: Move GetSupportDirectory from cmTarget.Stephen Kelly2015-10-121-7/+6
|
* Merge topic 'add-cmLocalGenerator-API'Brad King2015-10-121-5/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 223d0efe Remove some needless GetMakefile() calls. a367416c cmLocalGenerator: Add current source directory accessor. bbef3c2d cmLocalGenerator: Add current binary directory accessor. 12cb3bdc cmLocalGenerator: Add Home directory accessors. 72efa15d Eclipse: Port API to cmLocalGenerator. f2a641d6 Kate: Remove unused variables. 10cf42f5 Kate: Port API to cmLocalGenerator. e46ef270 export: Port internal method to cmGeneratorTarget. 53d3a1c9 cmMakefile: Remove unused GetProjectName calls. 4ab2750c cmLocalGenerator: Add GetProjectName method. c8187f41 cmCPluginAPI: Inline code to get project name. 8c6e6dd3 cmMakefile: Inline initialization of project name. 27916f2c cmLocalGenerator: Add cmake instance accessor.
| * cmLocalGenerator: Add current source directory accessor.Stephen Kelly2015-10-101-1/+1
| |
| * cmLocalGenerator: Add Home directory accessors.Stephen Kelly2015-10-081-4/+2
| | | | | | | | Reduce reasons for cmLocalGenerator to have a cmMakefile.
* | cmGeneratorTarget: Use local GetProperty method.Stephen Kelly2015-10-081-1/+1
|/
* Merge topic 'cmGeneratorTarget-sources'Brad King2015-10-081-1/+3
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | af71c7b4 cmTarget: Remove Compute method. dce6581b cmGeneratorTarget: Move computed sources from cmTarget. 7b6dc0fe cmGeneratorTarget: Inline GetSourceFiles from cmTarget. 33f87bb1 cmGeneratorTarget: Move AddInterfaceEntries method. da1b0449 cmTarget: Remove a conditional for generate-time source addition. fe113f0f cmTarget: Split storage of sources from genexes. 776ff8eb cmTarget: Add Compute API for sources. 64f73150 cmTarget: Add API for generate-time source addition. c38e30f6 cmGeneratorTarget: Add methods for generate-time source addition. 5d3776a7 Access sources through cmGeneratorTarget. 7ce0991a GHS: Port API to cmGeneratorTarget. 156bd2c9 Xcode: Port away from unnecessary CMP0049 compatibility. 01e666c7 cmTarget: Join strings conditionally. bf28b787 cmGeneratorTarget: Rename internal member. 9d653f9c cmFLTKWrapUI: Remove CMake 2.2 compat code.
| * cmTarget: Remove Compute method.Stephen Kelly2015-10-071-1/+0
| |
| * cmTarget: Add Compute API for sources.Stephen Kelly2015-10-071-0/+1
| | | | | | | | | | This method is a refactoring artifact. It will be removed in a follow-up.
| * Access sources through cmGeneratorTarget.Stephen Kelly2015-10-071-1/+3
| |
* | Set the current dirs on the snapshot before creating the cmMakefile.Stephen Kelly2015-10-071-6/+6
|/ | | | | | The cmMakefile should get a fully prepared snapshot and not clobber its definitions. It should eventually be able to process list files from any starting-point snapshot, though that is some refactoring away still.
* Merge topic 'refactor-computation'Brad King2015-10-061-13/+13
|\ | | | | | | | | | | | | | | | | | | | | 616f0311 cmGlobalGenerator: Move path computation to Compute. 9eea0486 cmGlobalGenerator: Do more computation at compute time. 2eca0559 cmGlobalGenerator: De-virtualize Compute(). 21f428f4 VisualStudio: Replace Compute override with AddExtraIDETargets override. a9588e90 VisualStudio10: Initialize the LongestSource at generate time. 4407eee0 cmGlobalGenerator: Call AddExtraIDETargets as a hook of Compute(). a09c545d Xcode: Extract a AddExtraIDETargets method.
| * cmGlobalGenerator: Move path computation to Compute.Stephen Kelly2015-10-051-8/+6
| |
| * cmGlobalGenerator: Do more computation at compute time.Stephen Kelly2015-10-051-8/+8
| |
| * cmGlobalGenerator: Call AddExtraIDETargets as a hook of Compute().Stephen Kelly2015-10-051-0/+2
| | | | | | | | Relieve the Xcode generator of having to reimplement Compute().
* | QtAutogen: Port API to cmGeneratorTarget.Stephen Kelly2015-10-061-4/+3
| |
* | QtAutogen: Port global generator to cmGeneratorTarget.Stephen Kelly2015-10-051-12/+14
| |
* | QtAutogen: Use a target type between loops.Stephen Kelly2015-10-051-7/+6
|/
* cmGlobalGenerator: Initialize generator targets on construction (#15729)Stephen Kelly2015-09-291-15/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Ninja generator and Visual Studio generators are special-cased for the QtAutogen feature. In order to reduce the number of custom targets, the Visual Studio generators prefer to create custom commands instead, and in order to create appropriate Ninja files, generated rcc files are listed as byproducts. This requires the use of the GetConfigCommonSourceFiles API of the cmGeneratorTarget for those generators when initializing the autogen target. The initializer method is called from Compute() after the cmGeneratorTarget objects are created, however the initialization of the object directory occurs later in the InitGeneratorTargets method. That means that the resulting object locations are computed incorrectly and cached before the object directory is determined, so the generated buildsystem can not find the object files. The initialization of the object directory was split from the creation of cmGeneratorTarget instances in commit 0e0258c8 (cmGlobalGenerator: Split creation of generator object from initialization., 2015-07-25). The motivation for the split was to do only what is essential to do early in cases where cmGeneratorTargets need to be created at configure-time. That is required for the purpose of implementing policies CMP0024 and CMP0026, and for try_compile(LINK_LIBRARIES). However, the split was not really necessary. Compute the object directory in the cmGeneratorTarget constructor instead. The QtAutogen unit test already tests the use of TARGET_OBJECTS with AUTOMOC, and that test already passes on Ninja. The reason it already passes is that the QtAutogen target also uses the AUTORCC feature, and specifies several qrc files in its SOURCES. Later in the Compute algorithm (after the InitGeneratorTargets call), the rcc files are determined and target->AddSource is called. The AddSource call clears the previously mentioned cache of source files, causing it to be regenerated when next queried, this time taking account of the object directory. Extend the test suite with a new target which does not make use of AUTORCC with qrc files so that the test added alone would break without the fix in this commit.
* QtAutogen: Split initializer class into separate file.Stephen Kelly2015-09-291-1/+1
|
* QtAutogen: Split initializer methods into separate class.Stephen Kelly2015-09-261-3/+3
|
* QtAutogen: Simplify generator initialization API.Stephen Kelly2015-09-261-10/+11
|
* QtAutogen: Remove unnecessary dereference.Stephen Kelly2015-09-261-3/+3
|
* QtAutogen: Move Source initialization to prior loop.Stephen Kelly2015-09-261-2/+1
| | | | | | | | Ensure that all targets have their _automoc.cpp before attempting to initialize the autogen target. The initialization evaluates generator expressions for target sources, and must include the _automoc.cpp of object library dependents in order for TARGET_OBJECTS to include the object file for the corresponding _automoc.cpp file.
* QtAutogen: Add _automoc.cpp sources before initializing.Stephen Kelly2015-09-261-0/+1
|