summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* cmGlobalGenerator: Refactor global target constructionBrad King2016-09-151-11/+24
| | | | | | Avoid using partially-constructed cmTarget instances. Collect the information about how to construct each target in a separate structure and then actually create each cmTarget with full construction.
* cmGlobalGenerator: Split CreateDefaultGlobalTargets implementationBrad King2016-09-151-0/+6
| | | | | Divide this long method into multiple helpers each dedicated to one of the targets. This also avoids having to clear/re-use local structures.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-15/+17
|
* make sure to include cmConfigure.h before cmStandardIncludes.hDaniel Pfeifer2016-09-031-0/+2
|
* use CM_NULLPTRDaniel Pfeifer2016-06-281-8/+8
|
* Make C++ feature checks extensibleDaniel Pfeifer2016-06-271-2/+2
| | | | | | Turn the feature check for cxx11_unordered_map into a function such that we can use it for other features as well. Drop the 11 suffix, as we may want to check features from other standards.
* cmGlobalGenerator: Make IsMultiConfig() constTobias Hunger2016-06-011-1/+1
|
* Pass arguments that are not modified as const&.Daniel Pfeifer2016-05-261-2/+2
| | | | | | | Use clang-tidy's performance-unnecessary-value-param checker to find value parameter declarations of expensive to copy types that are not modified inside the function. Ignore findings in kwsys. After applying the fix-its, manually change `const T&` to `T const&`.
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-95/+109
| | | | | | | | | | | | | Run the `Utilities/Scripts/clang-format.bash` script to update all our C++ code to a new style defined by `.clang-format`. Use `clang-format` version 3.8. * 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.
* Format include directive blocks and ordering with clang-formatBrad King2016-04-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sort include directives within each block (separated by a blank line) in lexicographic order (except to prioritize `sys/types.h` first). First run `clang-format` with the config file: --- SortIncludes: false ... Commit the result temporarily. Then run `clang-format` again with: --- SortIncludes: true IncludeCategories: - Regex: 'sys/types.h' Priority: -1 ... Commit the result temporarily. Start a new branch and cherry-pick the second commit. Manually resolve conflicts to preserve indentation of re-ordered includes. This cleans up the include ordering without changing any other style. Use the following command to run `clang-format`: $ git ls-files -z -- \ '*.c' '*.cc' '*.cpp' '*.cxx' '*.h' '*.hh' '*.hpp' '*.hxx' | egrep -z -v '(Lexer|Parser|ParserHelper)\.' | egrep -z -v '^Source/cm_sha2' | egrep -z -v '^Source/(kwsys|CursesDialog/form)/' | egrep -z -v '^Utilities/(KW|cm).*/' | egrep -z -v '^Tests/Module/GenerateExportHeader' | egrep -z -v '^Tests/RunCMake/CommandLine/cmake_depends/test_UTF-16LE.h' | xargs -0 clang-format -i This selects source files that do not come from a third-party. Inspired-by: Daniel Pfeifer <daniel@pfeifer-mail.de>
* Drop Visual Studio 6 generatorBrad King2016-03-091-5/+0
| | | | | | This generator has been deprecated since CMake 3.3. Remove it. Update documentation, modules, and tests to drop content specific to this generator.
* Diagnose recursive project/enable_language without crashing (#15999)Brad King2016-03-071-0/+1
| | | | | | | Calling `project()` or `enable_language()` from a toolchain file will infinitely recurse since those commands load the toolchain file. Diagnose and reject this case with an error message instead of crashing when the stack eventually overflows.
* Improve internal generator target structure lookupBrad King2016-02-081-0/+6
| | | | | | | | In commit v3.5.0-rc1~272^2~6 (cmGlobalGenerator: Add FindGeneratorTarget API, 2015-10-25) a lookup was implemented via linear search. Replace it with an efficient data structure. Suggested-by: Stephen Kelly <steveire@gmail.com>
* Fix internal target lookup performance regressionBrad King2016-02-081-1/+17
| | | | | | | | | | | Refactoring in commit v3.5.0-rc1~272^2~13 (cmGlobalGenerator: Remove direct storage of targets, 2015-10-25) replaced an efficient data structure mapping from target name to cmTarget instance with a linear search. Lookups through cmGlobalGenerator::FindTarget are done a lot. Restore the efficient mapping structure with a name indicating its purpose. Reported-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
* cmGlobalGenerator: Remove map from cmTarget to cmGeneratorTargetStephen Kelly2015-10-271-14/+0
| | | | | | | 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-1/+3
| | | | Mirror the cmMakefile::FindTarget method.
* cmGlobalGenerator: Add FindGeneratorTarget APIStephen Kelly2015-10-271-0/+6
|
* cmTarget: Implement ALIAS in terms of name mappingStephen Kelly2015-10-271-12/+2
| | | | Remove mapping to cmTarget.
* cmGlobalGenerator: Remove direct storage of targetsStephen Kelly2015-10-271-4/+3
| | | | Find the target by looping when needed.
* cmGlobalGenerator: Move GeneratorTargetsType to usage site.Stephen Kelly2015-10-241-0/+4
|
* cmGlobalGenerator: Port IsRootOnlyTarget to cmGeneratorTarget.Stephen Kelly2015-10-201-1/+1
|
* cmExportTryCompileFileGenerator: Port to cmGeneratorTarget.Stephen Kelly2015-10-181-0/+3
|
* cmGlobalGenerator: Compute export() related classes early.Stephen Kelly2015-10-181-2/+2
| | | | Simplify CMP0024 handling.
* Genex: Port some access API to cmGeneratorTarget.Stephen Kelly2015-10-151-3/+3
|
* cmMakefile: Store container of cmExportBuildFileGenerators.Stephen Kelly2015-10-141-2/+5
| | | | | | | | | 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-1/+1
|
* Merge topic 'refactor-computation'Brad King2015-10-061-1/+2
|\ | | | | | | | | | | | | | | | | | | | | 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: De-virtualize Compute().Stephen Kelly2015-10-051-1/+1
| | | | | | | | It now implements the NVI pattern.
| * cmGlobalGenerator: Call AddExtraIDETargets as a hook of Compute().Stephen Kelly2015-10-051-0/+1
| | | | | | | | Relieve the Xcode generator of having to reimplement Compute().
* | QtAutogen: Port global generator to cmGeneratorTarget.Stephen Kelly2015-10-051-1/+1
|/
* Merge topic 'fix-qtautogen-with-object-library-Ninja'Brad King2015-09-291-1/+0
|\ | | | | | | | | 9bc6eb8e cmGlobalGenerator: Initialize generator targets on construction (#15729)
| * cmGlobalGenerator: Initialize generator targets on construction (#15729)Stephen Kelly2015-09-291-1/+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.
* | Merge topic 'simplify-qt-autogen'Brad King2015-09-291-4/+1
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1fe39020 QtAutogen: Port away from cmLocalGenerator. 59a729b2 QtAutogen: Split initializer class into separate file. 1e83a963 QtAutogen: Split initializer methods into separate class. 12f0e13c QtAutogen: Simplify generator initialization API. 65ff75d3 QtAutogen: Remove unnecessary dereference. 64b78c14 QtAutogen: Move Source initialization to prior loop. c3c20d3c QtAutogen: Add _automoc.cpp sources before initializing. 8b6ec29d QtAutogen: Move initialization condition to caller. 9470b056 QtAutogen: Move condition to prior loop. b7491b1c QtAutogen: Move condition to prior loop. e791c854 QtAutogen: Make some methods static. 6210ec64 QtAutogen: Make internal method private. a3ceb998 QtAutogen: Don't use members to initialize automoc targets. dced2fe1 QtAutogen: Rename variable. f9a77e76 QtAutogen: Don't use a member to store skipped uic files. c3633e7a QtAutogen: Add missing includes and forward declarations.
| * QtAutogen: Simplify generator initialization API.Stephen Kelly2015-09-261-4/+1
| |
* | cmGlobalGenerator: Devirtualize method.Stephen Kelly2015-09-271-1/+1
|/
* cmGlobalGenerator: Remove unused method.Stephen Kelly2015-09-241-1/+0
|
* cmGlobalGenerator: Create local generators after all makefiles configured.Stephen Kelly2015-09-241-0/+2
|
* cmGlobalGenerator: Add API for the configure step being finished.Stephen Kelly2015-09-181-0/+3
|
* cmGlobalGenerator: Rename method.Stephen Kelly2015-08-281-1/+1
|
* cmLocalGenerator: Create from already-constructed cmMakefile.Stephen Kelly2015-08-281-1/+1
| | | | Don't manage the lifetime of the cmMakefile with cmLocalGenerator.
* cmGlobalGenerator: Remove MakeLocalGenerator method.Stephen Kelly2015-08-281-5/+2
| | | | Inline implementation to callers.
* cmLocalGenerator: Remove Parent pointer.Stephen Kelly2015-08-281-5/+3
|
* Merge topic 'minor-cleanups'Brad King2015-08-271-1/+1
|\ | | | | | | | | | | | | | | | | | | | | 7f551b4f cmGlobalGenerator: Implement VS6 check without virtual method. cd6293cd cmMakefile: Fix style. de6b2895 cmTarget: Remove vestigal method declaration. e35ee02d cmTarget: Fix indentation. 00f2298f Reduce uses of cmMakefile::GetGlobalGenerator. 6254ba95 cmMakefile: Remove Internal class. cf0a78dc cmGeneratorTarget: Issue messages through the local generator.
| * cmGlobalGenerator: Implement VS6 check without virtual method.Stephen Kelly2015-08-251-1/+1
| | | | | | | | Don't require existence of a global generator for this check.
* | cmGlobalGenerator: Extract new IsExcluded overload.Stephen Kelly2015-08-241-0/+2
|/
* cmGlobalGenerator: Rename progress initializer method.Stephen Kelly2015-08-231-1/+1
|
* cmGlobalGenerator: Move LG to target map to subclass.Stephen Kelly2015-08-231-3/+1
| | | | This is the only user.
* Merge topic 'global-generator-makefiles'Brad King2015-08-111-0/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 6d8a125e cmQtAutoGenerators: Prefer a generator to access global generator. 5f66900e cmGlobalGenerator: Port Find API to cmMakefile. c5b8841f cmGlobalGenerator: Create global targets from cmMakefiles. 8f75ea3b cmGlobalGenerator: Port global target creation to cmMakefile. 56f0540b cmGlobalGenerator: Port Configure-time check to cmMakefile. 19b546ef cmGlobalGenerator: Base final target property computation on Makefiles. f8be9ba9 cmGlobalGenerator: Base progress on Makefiles, not LocalGenerators. bc1097e3 cmExportLibraryDependenciesCommand: Port to cmMakefile. 204aecdf cmGlobalGenerator: Port configure-time code to cmMakefile. 3dd6f0a5 cmake: Port configure-time code to cmMakefile. 73e4df99 cmGlobalGenerator: Store a container of cmMakefiles. 19369937 cmGeneratorTarget: Port internal type to cmGeneratorTarget. 32f131b0 cmGeneratorTarget: Prefer the local generator to access the global.
| * cmGlobalGenerator: Port Find API to cmMakefile.Stephen Kelly2015-08-071-0/+1
| |
| * cmGlobalGenerator: Store a container of cmMakefiles.Stephen Kelly2015-08-071-0/+4
| | | | | | | | For use at configure-time.