summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.h
Commit message (Collapse)AuthorAgeFilesLines
* use CM_NULLPTRDaniel Pfeifer2016-06-281-18/+17
|
* Make C++ feature checks extensibleDaniel Pfeifer2016-06-271-3/+3
| | | | | | 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.
* Merge topic 'fix-cmake-ISP-violation'Brad King2016-06-131-2/+1
|\ | | | | | | | | | | 23f87e81 cmake: Remove force from IssueMessage API 54c65d5f cmake: Extract DisplayMessage API.
| * cmake: Remove force from IssueMessage APIStephen Kelly2016-06-121-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The force parameter is ugly and makes the method harder to reason about (issues the message ... but maybe it doesn't ... but then again you can force it). It is a violation of https://en.wikipedia.org/wiki/Interface_segregation_principle and is the kind of thing described in a recent blog here: http://code.joejag.com/2016/anti-if-the-missing-patterns.html "Any time you see this you actually have two methods bundled into one. That boolean represents an opportunity to name a concept in your code."
* | Merge topic 'avoid-cmMakefile-IssueMessage-after-configure'Brad King2016-06-131-3/+4
|\ \ | | | | | | | | | | | | | | | | | | | | | ea5324cd cmMakefile: Port messages for compile features to cmake df8c3130 cmGlobalGenerator: Don't use cmMakefile::IssueMessage after configure 946d1e50 cmMakefile: Avoid IssueMessage after configure is finished 096c7754 cmLocalGenerator: Store Backtrace for the directory
| * | cmMakefile: Port messages for compile features to cmakeStephen Kelly2016-06-121-3/+4
| |/
* | Merge topic 'find-lib32'Brad King2016-06-131-0/+3
|\ \ | | | | | | | | | | | | 896ad251 Teach find_library and find_package to search lib32 paths (#11260)
| * | Teach find_library and find_package to search lib32 paths (#11260)Daniel Scharrer2016-06-101-0/+3
| |/ | | | | | | | | | | | | Add a ``FIND_LIBRARY_USE_LIB32_PATHS`` global property analogous to the ``FIND_LIBRARY_USE_LIB64_PATHS`` property. This helps find commands on multilib systems that use ``lib32`` directories and either do not have ``lib`` symlinks or point ``lib`` to ``lib64``.
* | Add missing braces around statements in header filesDaniel Pfeifer2016-06-111-2/+4
|/
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-166/+159
| | | | | | | | | | | | | 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-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Source: Stabilize include orderBrad King2016-04-291-0/+2
| | | | | Each source file has a logical first include file. Include it in an isolated block so that tools that sort includes do not move them.
* cmListFileBacktrace: Refactor storage to provide efficient value semanticsBrad King2016-04-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since commit v3.4.0-rc1~321^2~2 (Genex: Store a backtrace, not a pointer to one, 2015-07-08) we treat cmListFileBacktrace instances as lightweight values. This was true at the time only because the backtrace information was kept in the cmState snapshot hierarchy. However, that forced us to accumulate a lot of otherwise short-lived snapshots just to have the backtrace fields available for reference by cmListFileBacktrace instances. Recent refactoring made backtrace instances independent of the snapshot hierarchy to avoid accumulating short-lived snapshots. This came at the cost of making backtrace values heavy again, leading to lots of string coying and slower execution. Fix this by refactoring cmListFileBacktrace to provide value semantics with efficient shared storage underneath. Teach cmMakefile to maintain its call stack using an instance of cmListFileBacktrace. This approach allows the current backtrace to be efficiently saved whenever it is needed. Also teach cmListFileBacktrace the notion of a file-level scope. This is useful for messages about the whole file (e.g. during parsing) that are not specific to any line within it. Push the CMakeLists.txt scope for each directory and never pop it. This ensures that we always have some context information and simplifies cmMakefile::IssueMessage. Push/pop a file-level scope as each included file is processed. This supersedes cmParseFileScope and improves diagnostic message context information in a few places. Fix the corresponding test cases to expect the improved output.
* cmMakefile: Move cmMakefileCall to .cxx fileBrad King2016-04-151-13/+0
|
* Rename local target lookup methods to clarify purposeBrad King2016-04-011-1/+1
| | | | | | | | | | Rename methods: * `cmMakefile::Find{ => LocalNonAlias}Target` * `cmLocalGenerator::Find{ => LocalNonAlias}GeneratorTarget` These names clarify that they are for directory-local target names and do not consider alias targets.
* Fix lookup of an ALIAS target outside aliased target's directory (#16044)Brad King2016-04-011-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Refactoring in commit v3.5.0-rc1~272^2~11 (cmTarget: Implement ALIAS in terms of name mapping, 2015-10-25) accidentally introduced logic that assumes ALIAS targets always reference targets in their own directory. Fix this and add a test case. The configure-step fix is that `cmMakefile::FindTarget` should not consider aliases. The purpose of this method is just to look up targets local to a directory. Since ALIAS and normal targets share a namespace we know a locally defined target will never collide with an ALIAS target anyway. The method has 3 call sites, and this change is safe for all of them: * `cmInstallCommand::HandleTargetsMode`: Rejects aliases before the call. * `cmFLTKWrapUICommand::FinalPass`: Should never have considered aliases. * `cmMakefile::FindTargetToUse`: Falls back to a global lookup anyway. The generate-step fix is that `cmLocalGenerator::FindGeneratorTarget` should not consider aliases. This method is the generate-step equivalent to the above. The method has 2 call sites, and this change is safe for both of them: * `cmInstallTargetGenerator::Compute`: Never uses an alias target name. * `cmLocalGenerator::FindGeneratorTargetToUse`: Falls back to global lookup. Reported-by: Matteo Settenvini <matteo@member.fsf.org>
* Make message suppression more consistent.Michael Scott2015-11-301-1/+2
| | | | | | | | | | | | | | | | Make the message suppression more consistent, by adding a check for the message related CMake variables in cmake::IssueMessage, which allows callers of IssueMessage other than the message command to behave as expected. Also added a check for CMAKE_SUPPRESS_DEVELOPER_WARNINGS in the message command to mirror the deprecated message type behaviour. Added a 'force' flag to the cmake::IssueMessage method, to make the message suppression consistent, when setting the message related CMake variables directly in a CMake file. Expand message command tests to cover the AUTHOR_WARNING message type as well.
* Merge branch 'reduce-cmState-accumulation' into ↵Brad King2015-11-251-6/+2
|\ | | | | | | reduce-cmState-accumulation-for-master
| * cmMakefile: Remove unused PolicyPushPop interfacesBrad King2015-11-251-5/+1
| | | | | | | | | | | | The PolicyPushPop constructor arguments and Quiet method were used to pass non-default arguments to PushPolicy and PopSnapshot, but no clients use them anymore.
| * cmMakefile: Clarify purpose of method that pops a scope snapshotBrad King2015-11-251-1/+1
| | | | | | | | | | | | | | The `PopPolicyBarrier` method is actually responsible for closing any scope opened by creating a snapshot. Rename it to `PopSnapshot` and add a comment explaining the purpose of the poilcy-scope-specific part of the method.
* | cmMakefile: Add imported target accessorStephen Kelly2015-10-271-0/+1
| |
* | cmLocalGenerator: Port FindGeneratorTarget away from GetGeneratorTargetStephen Kelly2015-10-271-0/+5
| |
* | cmTarget: Implement ALIAS in terms of name mappingStephen Kelly2015-10-271-2/+2
| | | | | | | | Remove mapping to cmTarget.
* | cmake: Store hardcoded lists of sources and headersStephen Kelly2015-10-271-13/+0
| | | | | | | | Don't duplicate this in each cmMakefile.
* | Merge topic 'inline-cmMakeDepend-content'Brad King2015-10-211-4/+0
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | c0969b10 cmMakeDepend: Inline into inheriting class. 6a1e7328 cmMakeDepend: Inline into only user. 00f50b00 cmMakeDepend: Inline into header. 3df749af Remove vestigial declarations. 3029c27e cmMakeDepend: Use public cmMakefile API.
| * | Remove vestigial declarations.Stephen Kelly2015-10-201-4/+0
| | |
* | | Merge topic 'fix-CMP0054-elseif-warning'Brad King2015-10-211-1/+1
|\ \ \ | |/ / |/| / | |/ | | d6a03b47 cmIfCommand: Issue CMP0054 warning with appropriate context. (#15802)
| * cmIfCommand: Issue CMP0054 warning with appropriate context. (#15802)Stephen Kelly2015-10-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit v3.4.0-rc1~494^2~4 (cmMakefile: Add API for elseif to create backtrace., 2015-05-29) removed the use of cmMakefileCall to push/pop execution context in favor of a new way to create backtraces. However, a call to cmMakefile::GetExecutionContext is still invoked to issue a contextual CMP0054 warning through cmConditionEvaluator. As the elseif is not part of the call stack, this resulted in trying to access an empty vector. Avoid the attempt at getting execution context when evaluating elseif by constructing a context and backtrace on behalf of the cmConditionEvaluator in all cases.
* | cmState: Move TargetType enum from cmTarget.Stephen Kelly2015-10-141-3/+3
| | | | | | | | | | | | | | 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
* | cmTarget: Move link type enum out.Stephen Kelly2015-10-141-2/+2
| | | | | | | | Remove a reason for generate time code to depend on the cmTarget header/type.
* | Merge topic 'genex-generator-objects'Brad King2015-10-141-14/+7
|\ \ | | | | | | | | | | | | | | | | | | | | | 2293d43d cmLocalGenerator: Store cmGeneratorTargets. 488723f5 cmMakefile: Store container of cmExportBuildFileGenerators. 15834405 cmGeneratorExpression: Port interface to cmGeneratorTarget. 11165525 cmGeneratorExpression: Port to cmLocalGenerator.
| * | cmLocalGenerator: Store cmGeneratorTargets.Stephen Kelly2015-10-141-14/+0
| | | | | | | | | | | | Relieve cmMakefile of this responsibility.
| * | cmMakefile: Store container of cmExportBuildFileGenerators.Stephen Kelly2015-10-141-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | cmState: Initialize default definitions immediately.Stephen Kelly2015-10-131-1/+0
|/ / | | | | | | Don't leave this as cmMakefile responsibility.
* | cmMakefile: Remove unused GetProjectName calls.Stephen Kelly2015-10-081-5/+0
| |
* | Remove now-unused directory setters.Stephen Kelly2015-10-071-2/+0
|/
* cmMakefile: Remove Configured state.Stephen Kelly2015-09-271-4/+0
| | | | It is vestigial.
* cmMakefile: Remove cmLocalGenerator member.Stephen Kelly2015-08-281-3/+3
|
* Merge topic 'minor-cleanups'Brad King2015-08-271-2/+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.
| * cmMakefile: Remove Internal class.Stephen Kelly2015-08-251-2/+1
| | | | | | | | Move only remaining state to the direct class.
* | cmState: Move ProjectName from cmMakefile.Stephen Kelly2015-08-251-2/+0
| |
* | cmMakefile: Use std::string in ProjectName API.Stephen Kelly2015-08-251-2/+2
| |
* | cmMakefile: Out-of-line GetProjectName.Stephen Kelly2015-08-251-4/+1
|/
* cmState: Move directory Properties from cmMakefile.Stephen Kelly2015-08-241-3/+0
|
* Fix iOS Bundle layouts (#15669)Gregor Jasny2015-08-241-0/+3
| | | | | | | | | | In contrast to Mac OS X App bundle layout the iOS one lacks the Contents/MacOSX structure. See also the Bundle Structures documentation in Mac Developer Library: https://developer.apple.com/library/mac/documentation/CoreFoundation/Conceptual/CFBundles/BundleTypes/BundleTypes.html For now detect iOS targets by checking the SDK name/path.
* cmMakefile: Remove unused method.Stephen Kelly2015-08-061-4/+0
|
* Merge topic 'cmState-policies'Brad King2015-08-061-13/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | 757a1f54 cmState: Move PolicyState from cmMakefile. 52dbe654 cmState: Record the end position of each directory. 65a5e0c6 cmLinkedTree: Add Clear API. 34835433 cmState: Add Type for policy scope. af0de01c cmState: Remove call stack parent tracking. 6ae8b30b cmMakefile: Move policy barriers inside cmState scopes. a5fc17b5 cmMakefile: Re-order policy entries and barriers. 0a01e6c6 cmState: Add Snapshot Type accessor. f0005bb4 Tests: Verify generate-time policy scope behavior.
| * cmState: Move PolicyState from cmMakefile.Stephen Kelly2015-08-021-13/+0
| | | | | | | | | | Implement lexical scope checking in terms of the state stack instead of barriers.
* | cmMakefile: Store EvaluationFiles.Stephen Kelly2015-08-011-0/+9
|/ | | | | Relieve the cmGlobalGenerator of this responsibility. Evaluate the generator expressions in the context of the cmLocalGenerator.
* cmMakefile: Move method out of line.Stephen Kelly2015-07-291-4/+1
|