summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* cmake: Teach --build to honor CMAKE_VERBOSE_MAKEFILE for NinjaGregor Jasny2015-02-261-2/+3
| | | | | | | | | The Ninja build system does not support a in-file verbositiy switch. Instead teach 'cmake --build' to extract the CMAKE_VERBOSE_MAKEFILE setting and pass it as an optional '-v' argument to Ninja. This can serve as a reasonable fallback. Signed-off-by: Gregor Jasny <gjasny@googlemail.com>
* find_library: Fix repeat call after changing directory content (#15293)Brad King2014-12-081-8/+9
| | | | | | | | | | | | | We use cmGlobalGenerator::GetDirectoryContent to avoid repeating directory listings. However, GetDirectoryContent loads content from disk at most once. This breaks find_library calls that occur when disk content has changed since preceding find_library calls. Teach cmGlobalGenerator::GetDirectoryContent to save the directory modification time when content is loaded and re-load content if it changes. Create a RunCMake.find_library test with a case covering this.
* file: Add LOCK subcommand to do file and directory lockingRuslan Baratov2014-12-031-0/+10
| | | | | | | | | Provide options to fail without blocking or to block up to a timeout. Provide options to specify the scope containing the lock so it can be released automatically at the end of a function, file, or process. Extend the RunCMake.file test with cases covering the file(LOCK) command usage and error cases.
* Give the interactive cache editor the USES_TERMINAL propertyPeter Collingbourne2014-11-141-1/+2
|
* file(GENERATE): Evaluate early to allow generating source filesStephen Kelly2014-11-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | The evaluation files must be known before cmTargetTraceDependencies attempts to find them, but we must actually generate the files after cmTargetTraceDependencies, as that can add to target SOURCES. The limitation is that the generated output name must not depend on the SOURCES of a target if the generated file is used by that target. Mark the output files as GENERATED so that trace dependencies does not expect them to already exist in the filesystem. Move the invokation of ForceLinkerLanguage in the Generate logic to after the generated file names are known. ForceLinkerLanguage tries to determine the sources of a target (in order to determine an already-known language) and otherwise fails to get information about the generated file. Test that the output of file(GENERATE) can be used as a target source file and that accessing the target SOURCES in the name of the output file is an error. Accessing the TARGET_OBJECTS would be a similar error if it was legal to use that generator expression in this context. That is not currently possible and is a different error condition, so test the current error output as a reminder to change the expected output if that becomes possible in the future. Test that generated rule files resulting from cmTargetTraceDependencies appear in the SOURCES generated in the output file.
* Fix some spelling errors in commentsGeoff Viola2014-10-131-4/+4
|
* CMake: Add CMAKE_GENERATOR_PLATFORM optionBrad King2014-09-051-0/+4
| | | | | | | | | | | Reject the option by default. It will be implemented on a per-generator basis. Pass the setting into try_compile project generation. Add cache entry CMAKE_GENERATOR_PLATFORM and associated variable documentation to hold the value persistently. Add a RunCMake.GeneratorPlatform test to cover basic use cases for the option. Verify that CMAKE_GENERATOR_PLATFORM is empty by default, and that it is rejected when the generator does not support a user setting.
* cmGlobalGenerator: Take Build output argument by referenceBrad King2014-07-311-2/+2
| | | | | | No call sites pass NULL to the output argument, so take it by reference to avoid the if(output) conditions. Propagate the change through the TryCompile APIs that call it.
* cmGlobalGenerator: Create a non-virtual 'DoGenerate' methodBrad King2014-07-221-1/+3
| | | | | | | Make the virtual 'Generate' method protected. Make 'DoGenerate' the main entry point to generation. This gives cmGlobalGenerator a chance to do some early operations before the individual generator-specific implementations take over.
* Tell generators about CMAKE_SYSTEM_NAME as soon as it is knownBrad King2014-07-171-0/+4
| | | | | | | | | Add a cmGlobalGenerator::SetSystemName virtual method. Call it from cmGlobalGenerator::EnableLanguage as soon as CMAKE_SYSTEM_NAME is known. This will give generators a chance to adapt themselves to the target system. Pass the cmMakefile instance to the method so that the generator can update it accordingly. Return early from EnableLanguage if SetSystemName returns false.
* cmTarget: Compile old-style link dependencies only for VS 6Brad King2014-07-141-0/+2
| | | | | Compile all the "ForVS6" cmTarget members only on Windows. No other platforms support the VS 6 generator.
* cmTarget: Run old-style link dependencies only for VS 6Brad King2014-07-141-0/+3
| | | | | Invoke it at runtime only with the VS 6 generator. No other generators need it.
* VS: Move VS-only API out of cmGlobalGeneratorBrad King2014-06-121-3/+0
| | | | | Move the IsDependedOn method to cmGlobalVisualStudio7Generator since that is the only caller.
* Allow a toolchain file to specify a generator toolsetBrad King2014-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | Delay use of CMAKE_GENERATOR_TOOLSET until the CMakeSystem.cmake file has been configured and loaded during the first project() or enable_language() command. This gives the toolchain file named by CMAKE_TOOLCHAIN_FILE a chance to set CMAKE_GENERATOR_TOOLSET. This point is still early enough to set the generator toolset prior to the initialization of any languages that might use the toolset. The cmake::GeneratorToolset member variable remains an indication of what was specified by the -T option or loaded from the cache. It does not need to be updated based on the toolchain file setting. The cmMakefile::TryCompile can still pass cmake::GeneratorToolset into the inner instance because the try-compiled project will do platform and language initialization using the CMakeSystem module configured for the outer project. Extend the RunCMake.GeneratorToolset test with cases that use a toolchain file to set CMAKE_GENERATOR_TOOLSET.
* Add an "installed file" property scopeNils Gladitz2014-05-281-0/+2
| | | | | | | Teach set_property and get_property an "INSTALL" property type to be associated with install-tree file paths. Make the properties available to CPack for use during packaging. Add a "prop_inst" Sphinx domain object type for documentation of such properties.
* cmGlobalGenerator: Store targets in hash mapsBen Boeckel2014-05-071-3/+12
|
* Remove extra semicolons from C++ code.Stephen Kelly2014-04-031-1/+1
| | | | | Clang based tools running over the code complain about these, but clang has a fixit for removing them.
* cmGeneratorTarget: Compute target objects on demandStephen Kelly2014-04-021-2/+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.
* cmGlobalGenerator: Add interface to call ForceLinkerLanguagesStephen Kelly2014-03-311-0/+2
| | | | | Avoid calling it too early when cmGeneratorTarget instances don't yet exist.
* cmGlobalGenerator: Make ComputeTargetObjects non-virtualStephen Kelly2014-03-151-1/+1
| | | | | | | | 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/+2
| | | | Make it public for future external calls.
* stringapi: Use strings for program pathsBen Boeckel2014-03-081-4/+4
|
* stringapi: Use strings for generator namesBen Boeckel2014-03-081-4/+4
|
* stringapi: Use strings for directoriesBen Boeckel2014-03-081-3/+3
|
* stringapi: Miscellaneous char* parametersBen Boeckel2014-03-081-4/+4
|
* stringapi: Pass configuration names as stringsBen Boeckel2014-03-081-5/+5
|
* strings: Remove cmStdString referencesBen Boeckel2014-03-081-23/+23
| | | | | | | | | | | 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-1/+1
| | | | All callers passed 0 in, so just remove the branch.
* stringapi: Use strings for VS project namesBen Boeckel2014-03-081-4/+4
|
* stringapi: Use strings for AddSubdirectory pathsBen Boeckel2014-03-081-1/+1
|
* stringapi: Use strings in target nameBen Boeckel2014-03-081-9/+10
|
* stringapi: Use strings for the languagesBen Boeckel2014-03-081-10/+11
|
* cmTarget: Find source files on request.Stephen Kelly2014-02-241-1/+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().
* OS X: Make sure RPATHs are unique to avoid possible corruption.Clinton Stimpson2014-02-031-0/+4
| | | | | | | | 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.
* Merge topic 'constify'Brad King2014-01-131-15/+15
|\ | | | | | | | | | | | | | | | | 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-10/+10
| |
* | cmake: Future-proof --find-package mode.Stephen Kelly2014-01-131-0/+2
|/ | | | | | | | | 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.
* Don't allow include() of export(EXPORT) file at configure time.Stephen Kelly2014-01-061-0/+2
| | | | | | | | | 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.
* Merge topic 'rpath-default'Brad King2014-01-021-0/+5
|\ | | | | | | | | 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/+5
| | | | | | | | | | Also adding documentation for CMAKE_MACOSX_RPATH, and improving documentation for MACOSX_RPATH.
* | Constify autogen handling.Stephen Kelly2013-12-111-1/+2
| |
* | Constify cmGeneratorTarget access.Stephen Kelly2013-12-111-1/+1
| |
* | Constify handling of target dependencies.Stephen Kelly2013-12-111-5/+7
|/
* cmGlobalGenerator: Make NameResolvesToFramework const.Stephen Kelly2013-11-191-2/+2
|
* cmMakefile: Make IsAlias const.Stephen Kelly2013-11-191-1/+1
|
* Merge topic 'cleanup-build-commands'Brad King2013-11-191-6/+15
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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) ...
| * VS: Switch to internal CMAKE_MAKE_PROGRAM lookup by generatorsBrad King2013-11-181-1/+1
| | | | | | | | | | | | | | | | Drop the "Modules/CMakeVS*FindMake.cmake" files. Override the cmGlobalGenerator::FindMakeProgram method for VS generators to use their internal APIs to locate the build tool. Set the CMAKE_MAKE_PROGRAM as a normal variable for use by project code, but do not cache it. This will allow CMake and CTest to select the proper tool at build time.
| * Teach GenerateBuildCommand to find its own make programBrad King2013-11-181-0/+2
| | | | | | | | | | | | | | | | 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.