summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* 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().
* 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.
* | | cmTarget: INTERFACE_LIBRARY is always EXCLUDE_FROM_ALL.Stephen Kelly2014-01-061-1/+2
| | |
* | | cmTarget: Enable convenient include dir handling for INTERFACE_LIBRARY.Stephen Kelly2014-01-061-2/+2
|/ / | | | | | | | | Make the CMAKE_INCLUDE_CURRENT_DIR_IN_INTERFACE variable affect INTERFACE_LIBRARY targets.
* | Merge topic 'rpath-default'Brad King2014-01-021-0/+28
|\ \ | |/ |/| | | | | d25ad48 OS X: Add CMP0042 to enable MACOSX_RPATH by default
| * OS X: Add CMP0042 to enable MACOSX_RPATH by defaultClinton Stimpson2014-01-021-0/+28
| | | | | | | | | | Also adding documentation for CMAKE_MACOSX_RPATH, and improving documentation for MACOSX_RPATH.
* | Merge topic 'constify'Brad King2013-12-231-1/+1
|\ \ | | | | | | | | | | | | ae6fc55 cmGlobalGenerator: Fix value type pushed into autogens vector
| * | cmGlobalGenerator: Fix value type pushed into autogens vectorBrad King2013-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The parent commit changed the AutogensType::value_type to be "std::pair<cmQtAutoGenerators,cmTarget const*>" but our std::make_pair call returns "std::pair<cmQtAutoGenerators,cmTarget*>". Construct the value_type directly instead of using make_pair. Otherwise the Sun 5.9 compiler complains ".../Source/cmGlobalGenerator.cxx", line 1281: Error: Formal argument x of type "const std::pair<cmQtAutoGenerators, const cmTarget*>&" in call to "std::vector<std::pair<cmQtAutoGenerators, const cmTarget*> > ::push_back(const std::pair<cmQtAutoGenerators, const cmTarget*>&)" is being passed "std::pair<cmQtAutoGenerators, cmTarget*>".
* | | Merge topic 'minor-cleanup'Brad King2013-12-191-0/+4
|\ \ \ | |/ / |/| | | | | | | | | | | e2cb3e7 Help: Note that COMPATIBLE_INTERFACE_ properties may be origin-debugged. 41e48c4 Avoid certain actions on IMPORTED targets.
| * | Avoid certain actions on IMPORTED targets.Stephen Kelly2013-12-111-0/+4
| |/ | | | | | | | | | | | | As we're iterating over IMPORTED targets now, handle them in the loop body. The existing behavior is harmless because generally nothing is done anyway for IMPORTED targets in these code paths, because they do not have sources for example.
* | Constify cmGeneratorTarget access.Stephen Kelly2013-12-111-1/+2
| |
* | Constify handling of target dependencies.Stephen Kelly2013-12-111-8/+9
|/
* INTERFACE_LIBRARY: Avoid codepaths which set unneeded properties.Stephen Kelly2013-11-251-0/+9
| | | | | | | | | | | | | As an INTERFACE_LIBRARY has no direct link dependencies, we can short-circuit in cmGeneratorExpressionEvaluator and in cmGlobalGenerator::CheckLocalGenerators. As they do not generate any output directly, any generate- or install- related code acn also be short-circuited. Many of the local generators already do this. Because only INTERFACE related properties make sense on INTERFACE_LIBRARY targets, avoid setting other properties, for example via defaults.
* Merge topic 'constify'Brad King2013-11-201-9/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 15eeace cmTarget: Trivially make more API const. be9dfb6 cmTarget: Make GetExportMacro const. 0794c13 cmTarget: Make NameResolvesToFramework const. 1c27521 cmGlobalGenerator: Make NameResolvesToFramework const. 37554ac cmMakefile: Make FindTarget const. 8841d73 cmMakefile: Make IsAlias const. 36e31cd cmTarget: Make GetInterfaceLinkLibraries const. 04d398d cmTarget: Make GetTargetSourceFileFlags const. 50d1520 cmTarget: Make custom command accessors API const. 0f87643 cmGeneratorTarget: Make GetIncludeDirectories const.
| * cmGlobalGenerator: Make NameResolvesToFramework const.Stephen Kelly2013-11-191-7/+9
| |
| * cmMakefile: Make IsAlias const.Stephen Kelly2013-11-191-1/+1
| |
| * cmTarget: Make custom command accessors API const.Stephen Kelly2013-11-191-1/+1
| | | | | | | | Add specific mutators instead of providing non-const refs.
* | Notify extra generators about languagesBen Boeckel2013-11-191-0/+5
|/ | | | | | Some generators can use the any enabled languages to add extra support in the relevant build tool. One such is Eclipse since there are many plugins available for various languages.
* Merge topic 'cleanup-build-commands'Brad King2013-11-191-66/+79
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 4cce44b Help: Document the CMAKE_MAKE_PROGRAM variable in more detail 558c74d VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generators 5229f2d Tests: Do not use an explicit make program for VS generators 72dd738 Tests: Fix MFC test heuristic for empty CMAKE_TEST_MAKEPROGRAM fd6076d Tests: Pass CMAKE_MAKE_PROGRAM instead of --build-makeprogram 68031ab Tests: Configure SubProject-Stage2 test more robustly 003d10c Tests: Simplify VSExcludeFromDefaultBuild configuration e47d934 Tests: Simplify VSProjectInSubdir configuration e965cb1 Tests: Simplify CTest.BuildCommand.ProjectInSubdir configuration 72bf255 Tests: Pass --build-options to every test 4d1d772 ctest: Teach --build-options to allow zero options 96966b5 ctest: Make the --build-makeprogram optional for --build-and-test 91a0211 Simplify some calls to cmGlobalGenerator::Build 123a060 Teach GenerateBuildCommand to find its own make program 5f5c92b VS: Add internal APIs to find MSBuild, devenv/VCExpress, and msdev 4ac75fd Prefer CMAKE_MAKE_PROGRAM over CMAKE_BUILD_TOOL (#14548) ...
| * Simplify some calls to cmGlobalGenerator::BuildBrad King2013-11-181-10/+1
| | | | | | | | | | | | | | | | Code paths that look up CMAKE_MAKE_PROGRAM from the cache only to pass it to Build, which only passes it to GenerateBuildCommand, no longer need to do so. GenerateBuildCommand now knows how to look up CMAKE_MAKE_PROGRAM in the cache when no explicit value is given, so simply pass 0 now.
| * Teach GenerateBuildCommand to find its own make programBrad King2013-11-181-0/+20
| | | | | | | | | | | | | | | | Add a cmGlobalGenerator::SelectMakeProgram method to select a caller-provided make program, the CMAKE_MAKE_PROGRAM cache entry, or a generator-provided default. Call it from all implementations of the GenerateBuildCommand method with the corresponding generator's default, if any.
| * cmGlobalGenerator: Cleanup GenerateBuildCommand APIBrad King2013-11-181-28/+18
| | | | | | | | | | | | | | | | | | All cmGlobalGenerator::GenerateBuildCommand call sites that need to produce a string now generate "cmake --build" commands. The remaining call sites immediately pass the result to cmSystemTools::RunSingleCommand. Avoid the intermediate string and argument parsing by directly producing a vector of strings. Also drop the ignoreErrors argument because no call sites remain that use it.
| * cmGlobalGenerator: Add method to compute "cmake --build" command lineBrad King2013-11-141-0/+40
| | | | | | | | | | | | Create a GenerateCMakeBuildCommand method to generate a command-line string invoking "cmake --build" for a given target and configuration. Optionally allow the "-i" make flag and additional native options.
| * cmGlobalGenerator: Drop unused GenerateBuildCommand implementationBrad King2013-11-141-33/+5
| | | | | | | | | | | | This is a virtual method that is overridden by every generator subclass. The base class implementation should never be called, so replace it with a dummy implementation.
* | CMP0037: Extend policy to reserved names and custom targetsNils Gladitz2013-11-191-0/+31
|/ | | | | | | | Teach add_custom_target to check the policy too. Extend the policy to disallow reserved target names that we use for builtin targets like "all". Extend the RunCMake.CMP0037 test to cover these cases.
* Refactor tool selection for edit_cache (#14544)Brad King2013-11-121-7/+8
| | | | | | | | | Refactor edit_cache tool selection to ask each global generator for its preference. Teach the Ninja generator to always use cmake-gui because Ninja by design cannot run interactive terminal dialogs like ccmake. Teach the Makefile generator to use cmake-gui when also using an "extra" generator whose IDE has no terminal to run ccmake, and otherwise fall back to CMAKE_EDIT_COMMAND selection for normal Makefile build systems.
* Merge topic 'constify'Brad King2013-11-121-7/+4
|\ | | | | | | | | | | | | dcac9be Make accessors for compile-related information const. 19a8a3c cmTarget: Don't finalize include directories in GetIncludeDirectories. 3305364 cmGlobalGenerator: Rename the FinalizeCompileDefinitions method.
| * cmTarget: Don't finalize include directories in GetIncludeDirectories.Stephen Kelly2013-11-071-5/+2
| | | | | | | | Rely on that having been done by the cmGlobalGenerator.
| * cmGlobalGenerator: Rename the FinalizeCompileDefinitions method.Stephen Kelly2013-11-071-2/+2
| | | | | | | | This will soon also finalize include directories.
* | Refactor internal resource location APIs and initializationBrad King2013-11-121-3/+3
|/ | | | | | | | | | | | | | | | | | | | Rename cmSystemTools::FindExecutableDirectory to FindCMakeResources. Teach it to compute the locations of cmake, ctest, cpack, ccmake, and cmake-gui executables, and the location of CMAKE_ROOT. Provide this information from static cmSystemTools::Get<resource>() methods. Refactor code that needs these locations to use the new APIs. Teach FindCMakeResources to use the OS X system API to lookup the executable location. When running from the CMake build tree itself, leave a file in the tree that FindCMakeResources can use to read the location of the source tree. This avoids the need to compile the source tree location into a binary that may be installed and used without the source tree. Teach the QtDialog on OS X to create a "cmake-gui" symlink in the build tree next to "cmake" and the other tools, as is already done in the install tree for the application bundle. This ensures a consistent set of executables are available in one directory.