summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'dev/hashmap-for-targets'Brad King2014-05-071-5/+3
|\ | | | | | | | | | | 325599ca cmGlobalGenerator: Store targets in hash maps ac4106c6 cmMakefile: Use a hashmap for imported targets
| * cmGlobalGenerator: Store targets in hash mapsBen Boeckel2014-05-071-5/+3
| |
* | Merge branch 'master' into osx-init-earlyBrad King2014-04-291-197/+157
|\ \ | |/ | | | | | | Resolve conflict in Source/cmGlobalGenerator.cxx by integrating changes from both sides.
| * Merge topic 'target-transitive-sources'Brad King2014-04-031-1/+16
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 9407174b target_sources: New command to add sources to target. 81ad69e0 Make the SOURCES target property writable. 6e636f2e cmTarget: Make the SOURCES origin tracable. 3676fb49 cmTarget: Allow transitive evaluation of SOURCES property. e6971df6 cmTarget: Make the source files depend on the config. df753df9 cmGeneratorTarget: Don't add computed sources to the target. 869328aa cmComputeTargetDepends: Use valid config to compute target depends.
| | * cmTarget: Make the source files depend on the config.Stephen Kelly2014-04-021-1/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Disallow the use of config-specific source files with the Visual Studio and Xcode generators. They don't have any way to represent the condition currently. Use the same common-config API in cmQtAutoGenerators. While it accepts config-specific files, it doesn't have to support multiple configurations yet. Loop over the configs in cmTargetTraceDependencies and cmGlobalGenerator::WriteSummary and consume all source files. Loop over the configs in cmComputeTargetDepends and compute the object library dependencies for each config.
| * | Merge topic 'target-sources-refactor'Brad King2014-04-031-48/+8
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 5de63265 Genex: Only evaluate TARGET_OBJECTS to determine target sources. aa0a3562 cmGeneratorTarget: Compute target objects on demand 042c1c83 cmTarget: Compute languages from object libraries on demand. fdcefe3c cmGeneratorTarget: Compute consumed object libraries on demand. c355d108 cmComputeTargetDepends: Track object library depends. e5da9e51 cmTarget: Allow any generator expression in SOURCES property. 5702e106 cmTarget: Include TARGET_OBJECTS genex in target SOURCES property. 857d30b5 cmGlobalGenerator: Add interface to call ForceLinkerLanguages 28e1d2f8 cmStringCommand: Add GENEX_STRIP subcommand. bf98cc25 Genex: Evaluate TARGET_OBJECTS as a normal expression. 8cd113ad cmTarget: Store strings instead of cmSourceFile* to represent SOURCES. 4959f341 cmSourceFileLocation: Collapse full path for directory comparisons. fcc92878 cmSourceFileLocation: Remove unused Update method. 59e8740a cmTarget: Remove AddSourceFile method 26d494ba cmTarget: Use string API to add sources to cmTarget objects. d38423ec cmTarget: Add a method to obtain list of filenames for sources. ...
| | * cmGeneratorTarget: Compute target objects on demandStephen Kelly2014-04-021-46/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a ComputeObjectMapping method to compute the object names. It takes mapping to populate as an out-parameter so that it can be extended in the future with parameters relevant to generator expression evaluation. Remove the supporting cmGeneratorTarget::AddObject method. It is no longer needed as the container member is populated directly. The ComputeObjectMapping method is called whenever objects are requested from the cmGeneratorTarget. Because the Xcode generator makes no such request, explicitly invoke the method from that generator so that the logic of checking for bad sources in object libraries is executed. In a follow-up, the UseObjectLibraries usage may be replaced by a true generator expression evaluator for TARGET_OBJECTS. That will require generators to use cmGeneratorTarget::GetExternalObjects which is not currently the case for Xcode and VS generators.
| | * cmGeneratorTarget: Compute consumed object libraries on demand.Stephen Kelly2014-04-021-1/+0
| | | | | | | | | | | | | | | | | | | | | Remove up-front object library computation from cmGlobalGenerator. Adjust tests for message coming from the generator expression evaluation.
| | * cmGlobalGenerator: Add interface to call ForceLinkerLanguagesStephen Kelly2014-03-311-0/+7
| | | | | | | | | | | | | | | Avoid calling it too early when cmGeneratorTarget instances don't yet exist.
| | * cmGeneratorTarget: Compute the object directory early.Stephen Kelly2014-03-311-1/+1
| | | | | | | | | | | | Ensure it is populated before tracing dependencies.
| * | Merge branch 'master' into revise-compiler-id-policiesBrad King2014-04-021-172/+157
| |\ \ | | |/
| | * cmGlobalGenerator: Make ComputeTargetObjects non-virtualStephen Kelly2014-03-151-2/+19
| | | | | | | | | | | | | | | | | | | | | | | | Implement it in terms of the ComputeObjectFilenames virtual method on the local generators. Remove the reimplementation from the global generators which are now all functionally identical.
| | * cmGlobalGenerator: Extract a ComputeTargetObjectDirectory interface.Stephen Kelly2014-03-131-0/+6
| | | | | | | | | | | | Make it public for future external calls.
| | * Remove c_str calls when using stream APIs.Stephen Kelly2014-03-111-1/+1
| | | | | | | | | | | | | | | Use an ad-hoc clang tool for matching the calls which should be ported.
| | * Remove some c_str() calls.Stephen Kelly2014-03-111-28/+28
| | | | | | | | | | | | | | | | | | Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
| | * stringapi: Use strings for program pathsBen Boeckel2014-03-081-12/+19
| | |
| | * stringapi: Use strings for generator namesBen Boeckel2014-03-081-2/+2
| | |
| | * stringapi: Use strings for directoriesBen Boeckel2014-03-081-4/+5
| | |
| | * stringapi: Miscellaneous char* parametersBen Boeckel2014-03-081-4/+5
| | |
| | * typo: Match argument name with the headerBen Boeckel2014-03-081-3/+3
| | |
| | * stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-7/+10
| | |
| | * strings: Remove cmStdString referencesBen Boeckel2014-03-081-19/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Casts from std::string -> cmStdString were high on the list of things taking up time. Avoid such implicit casts across function calls by just using std::string everywhere. The comment that the symbol name is too long is no longer relevant since modern debuggers alias the templates anyways and the size is a non-issue since the underlying methods are generated since it's inherited.
| | * cmTarget: Remove the project argument to FindTargetBen Boeckel2014-03-081-35/+16
| | | | | | | | | | | | All callers passed 0 in, so just remove the branch.
| | * stringapi: Use strings for VS project namesBen Boeckel2014-03-081-5/+6
| | |
| | * stringapi: Use strings in target nameBen Boeckel2014-03-081-12/+12
| | |
| | * stringapi: Use strings for the languagesBen Boeckel2014-03-081-16/+20
| | |
| | * cmGeneratorTarget: Classify sources on demand, not up front.Stephen Kelly2014-02-241-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implement a Visitor to hold the sequence of source file tests for populating outputs. Use VS 6 and 7 workaround from Brad King for lack of partial template specialization and function template specialization capabilities. This will make it possible to use context dependent generator expressions to determine the sources of a target.
| | * cmTarget: Find source files on request.Stephen Kelly2014-02-241-35/+0
| | | | | | | | | | | | | | | | | | In a follow-up, the list of sources will become dependent on the config, so check for existence in cmTarget::GetSourceFiles instead of up-front with cmGlobalGenerator::CheckTargets().
* | | Add platform-specific initialization step when enabling languagesBrad King2014-04-291-0/+15
|/ / | | | | | | | | | | | | | | Create a Modules/CMakeSystemSpecificInitialize.cmake module loaded after CMakeSystem.cmake but before per-language initialization. Use it to load an optional Platform/<os>-Initialize.cmake module. This will be useful to do per-platform initialization that does not depend on the language and use the results when enabling specific languages.
* | Do not warn by default when policy CMP0025 or CMP0047 is not setBrad King2014-04-021-2/+4
|/ | | | | | | | | | | | | | | | | | | | | These policies are triggered by the use of a particular compiler rather than outdated CMake code in a project. Avoid warning in every project that enables a language by not displaying the policy warning by default. Add variable CMAKE_POLICY_WARNING_CMP<NNNN> to control the warning explicitly; otherwise enable the warning with --debug-output or --trace. This breaks with strict policy convention because it does not provide developers with any warning about the behavior change by default. Existing projects will continue to build without a warning or change in behavior. When a developer changes the minimum required version of CMake in a project to a sufficiently high value (3.0), the project will suddenly get the new compiler id and may break, but at least the breakage comes with a change to the project rather than the version of CMake used to build it. Breaking strict policy convention is worthwhile in this case because very few projects will be affected by the behavior change but every project would have to see the warning if it were enabled by default.
* Merge topic 'minor-cleanups'Brad King2014-02-191-1/+0
|\ | | | | | | | | | | | | | | | | | | f6cae4ea Tests: Remove some trailing black lines. c0ea4c5c Makefile: Fix comment indentation. 5e0c73c7 cmGlobalGenerator: Remove unused variable. 907c09cd include_directory: Add missing include. a74d125a Help: Fix typo 317d8498 Small typo fix
| * cmGlobalGenerator: Remove unused variable.Stephen Kelly2014-02-171-1/+0
| |
* | cmTarget: Don't try to get sources of an INTERFACE_LIBRARY.Stephen Kelly2014-02-141-1/+2
|/ | | | An an assert to ensure this.
* OS X: Make sure RPATHs are unique to avoid possible corruption.Clinton Stimpson2014-02-031-0/+7
| | | | | | | | When using link_directories() and including CMAKE_CFG_INTDIR, one can end up with duplicate RPATHs in the binary which install_name_tool cannot fix without corrupting the binary. Also, the cmake_install.cmake file has been fixed to correctly handle these generator specific variables.
* QNX: Introduce QCC compiler id for that QNX platform compiler.Stephen Kelly2014-01-221-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | Introduce policy CMP0047 to control resetting the id for compatibility. De-duplicate content in the QNX platform file by including the GNU one. QNX is a form of GNU platform. Do not clear CMAKE_SHARED_LIBRARY_${lang}_FLAGS variables. They are populated again later by the Compiler/GNU.cmake file anyway. Modify the CMAKE_CXX_COMPILE_OBJECT variable only when the QCC compiler id is in use, and the language is CXX. Use the QNX recommended flag for QCC instead of the gcc compatible -x flag. Populate new module files to handle system includes and depfiles when using the QCC compiler. Remove code which unsets the system include and depfiles related variables. When a GNU driver is used instead of the QCC one, the appropriate flags will be used. These variables were previously cleared for lowest-common-denominator compatibility with both drivers.
* Merge topic 'constify'Brad King2014-01-131-34/+50
|\ | | | | | | | | | | | | | | | | 2cbf0311 cmGlobalGenerator: Make SelectMakeProgram const. b4ff38a5 cmGlobalGenerator: Make CheckALLOW_DUPLICATE_CUSTOM_TARGETS const 8aeddf1f cmGlobalGenerator: Make some API const. 8fd0f2a7 cmGeneratorTarget: Hold a const global generator. 46315320 cmComputeLinkDepends: Hold a const global generator.
| * cmGlobalGenerator: Make SelectMakeProgram const.Stephen Kelly2014-01-121-4/+4
| |
| * cmGlobalGenerator: Make CheckALLOW_DUPLICATE_CUSTOM_TARGETS constStephen Kelly2014-01-121-1/+1
| |
| * cmGlobalGenerator: Make some API const.Stephen Kelly2014-01-121-29/+45
| |
* | cmake: Future-proof --find-package mode.Stephen Kelly2014-01-131-24/+26
|/ | | | | | | | | Create cmGeneratorTargets before generating generate-time information. C++ interfaces for querying build information is increasingly only available at generate time through the cmGeneratorTarget class. Ensure that the required cmGeneratorTarget instances are created. Use the cmGlobalGenerator access API to access the relevant cmGeneratorTarget instead of creating a temporary one on the stack.
* Merge topic 'minor-cleanups'Brad King2014-01-091-1/+2
|\ | | | | | | | | | | | | | | 531e40b cmTarget: Make GetSourceFiles populate an out-vector parameter. 38de54c cmGeneratorTarget: Add methods to access source file groups. f579fe0 Help: Fix link to MAP_IMPORTED_CONFIG_<CONFIG> 590d238 cmTarget: Handle NO_SYSTEM_FROM_IMPORTED.
| * cmTarget: Make GetSourceFiles populate an out-vector parameter.Stephen Kelly2014-01-091-1/+2
| | | | | | | | | | In a future patch, this will also be populated with extra sources from the linked dependencies.
* | Merge topic 'policies'Brad King2014-01-091-9/+14
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | 73e9340 get_target_property: Error on non-existent target. ab9f58f FindQt4: Ensure target exists before calling get_target_property. 37ebeb9 FindQt4: Fix use of get_target_property to use actual target name. 6aabb6a Genex: Use case-sensitive comparison for COMPILER_ID. 5bb53f6 cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.
| * | cmTarget: Deprecate COMPILE_DEFINITIONS_ properties with a policy.Stephen Kelly2014-01-081-9/+14
| |/
* | Merge topic 'optional-install'Brad King2014-01-091-2/+13
|\ \ | |/ |/| | | | | be0458c InstallRules: added new variable to disable generation of install rules
| * InstallRules: added new variable to disable generation of install rulesNils Gladitz2014-01-081-2/+13
| | | | | | | | | | | | The boolean variable CMAKE_SKIP_INSTALL_RULES allows disabling generation of install rules for projects which don't want them.
* | Merge topic 'unicode-fstream'Brad King2014-01-071-2/+3
|\ \ | | | | | | | | | | | | 5730710 Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.
| * | Use cmsys::[io]fstream instead of cmsys_ios::[io]fstream.Clinton Stimpson2014-01-071-2/+3
| | | | | | | | | | | | | | | Also use SystemTools::Fopen() instead of fopen(). This is to eventually support utf-8 filenames.
* | | Don't allow include() of export(EXPORT) file at configure time.Stephen Kelly2014-01-061-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | As a new feature it does not need to participate in CMP0024. Store cmExportBuildFileGenerator instances which correspond to the export(EXPORT) signature in a second map which does not own the pointers. This avoids the need to add cmExportBuildFileGenerator and dependencies to the bootstrap system.
* | | cmTarget: Fix system include annotation propagation.Stephen Kelly2014-01-061-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Direct users of IMPORTED targets treat INTERFACE_INCLUDE_DIRECTORIES as SYSTEM, after commit a63fcbcb (Always consider includes from IMPORTED targets to be SYSTEM., 2013-08-29). It was intended that transitive use of an IMPORTED target would have the same behavior, but that did not work. The implementation processed only direct dependencies in cmTarget::FinalizeSystemIncludeDirectories. Implement transitive evaluation of dependencies by traversing the link interface of each target in the link implementation.