summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Merge topic 'clean-up-link-configuration'Brad King2016-10-101-92/+55
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a1cfc4fe cmMakefile: Simplify programmer error to an assert 4079ba20 cmMakefile: Implement LinkLibraries as an internal property 17ab8e33 cmMakefile: Inline method into only remaining caller 7edfcd0e cmMakefile: Inline method into caller 6c8dc7f1 cmake: Simplify find-package mode library addition 1efca9f4 cmMakefile: Remove obsolete parameter d9b5f0a3 cmTarget: Remove target name from parameter list 1c70c6cc cmMakefile: Use public API to find a target 2b7baed7 cmMakefile: Inline method into only caller 7ba95492 cmMakefile: Use public API to find a target 6d98b15f cmMakefile: Invert if() condition to remove else 869037ee cmMakefile: Remove ALIAS check 2f6462a6 cmMakefile: Collapse two consecutive if()s into one 148b83a1 cmMakefile: DeMorgan-invert condition 4457a9f1 cmMakefile: Return after error and remove else condition 4d039c5b cmMakefile: Invert handling of error condition ...
| * cmMakefile: Simplify programmer error to an assertStephen Kelly2016-10-071-8/+3
| |
| * cmMakefile: Implement LinkLibraries as an internal propertyStephen Kelly2016-10-071-28/+47
| | | | | | | | | | | | | | | | | | cmMakefile should not have logic particular to individual cmake commands. The link_libraries() command is generally obsolete in favor of target_link_libraries(). An alternative language for CMake probably would not offer the former. The quirks and historical behaviors of the current language should be separate from the core classes of CMake to allow replacing the language.
| * cmMakefile: Inline method into only remaining callerStephen Kelly2016-10-071-29/+0
| |
| * cmMakefile: Remove obsolete parameterStephen Kelly2016-10-071-4/+3
| |
| * cmTarget: Remove target name from parameter listStephen Kelly2016-10-071-3/+3
| | | | | | | | Use the member state instead.
| * cmMakefile: Use public API to find a targetStephen Kelly2016-10-071-3/+3
| |
| * cmMakefile: Inline method into only callerStephen Kelly2016-10-071-14/+0
| | | | | | | | | | cmMakefile should not have API which is only useful for deprecated systems like cmPluginAPI.
| * cmMakefile: Use public API to find a targetStephen Kelly2016-10-071-3/+4
| |
| * cmMakefile: Invert if() condition to remove elseStephen Kelly2016-10-071-3/+3
| |
| * cmMakefile: Remove ALIAS checkStephen Kelly2016-10-071-7/+0
| | | | | | | | | | This method is only called from the cmPlugin API, which predates ALIAS targets and is obsolete.
| * cmMakefile: Collapse two consecutive if()s into oneStephen Kelly2016-10-071-14/+11
| |
| * cmMakefile: DeMorgan-invert conditionStephen Kelly2016-10-071-4/+4
| |
| * cmMakefile: Return after error and remove else conditionStephen Kelly2016-10-071-17/+18
| |
| * cmMakefile: Invert handling of error conditionStephen Kelly2016-10-071-6/+6
| |
| * cmMakefile: Remove superfluous overloadStephen Kelly2016-10-071-5/+0
| | | | | | | | Explicit is better than implicit.
| * cmMakefile: Remove useless link directory containerStephen Kelly2016-10-071-4/+1
| | | | | | | | It is never populated - a find will never find anything.
| * cmTarget: Inline MergeLinkLibraries into only callerStephen Kelly2016-10-071-1/+10
| |
* | cmMakefile: Remove pointless conditionStephen Kelly2016-10-091-4/+2
|/ | | | This method is never called with an empty string.
* project: Fix support for explicit RC languageBrad King2016-09-281-1/+20
| | | | | | | | | | | | | | | The check added in commit v3.6.0-rc1~293^2 (Diagnose recursive project/enable_language without crashing, 2016-03-07) broke support for enabling `RC` explicitly along with other languages like `C`. The reason is that we enable all listed languages at once so the internal `enable_language(RC)` that we do while enabling `C` or `CXX` on some platforms triggers the recursion check if `RC` is explicitly listed. Ideally we should refactor things to only enable one language at a time, but for now it is simplest to just exclude `RC` from the explicit list until other languages are enabled, and then enable it. Closes: #16330
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* cmState: Record buildsystem target names in each directoryBrad King2016-09-191-0/+1
| | | | | | Maintain in the directory state the list of target names added to be built. These are normal, non-imported targets (but do include INTERFACE libraries).
* cmTarget: Construct with basic information up frontBrad King2016-09-141-8/+8
| | | | | Avoid having partially constructed cmTarget instances around, except for the special case of GLOBAL_TARGET construction.
* Avoid requiring default cmTarget constructor for map indexingBrad King2016-09-141-2/+3
| | | | | | The `std::map<>` index operator requires a default constructor on the value type. Avoid requiring a default constructor on `cmTarget` just for this purpose.
* cmMakefile: Restore nested error logic use of cmExecutionStatusBrad King2016-09-061-11/+8
| | | | | | | | | | | | | | Since commit 14a8d61f (cmMakefile: Port nested error logic away from cmExecutionStatus) we fail to continue processing function and macro bodies after non-fatal errors. A non-fatal error should not stop foreach loops, macro bodies, nested bodies, or the outer script. Add a test covering these cases, and revert the change to fix them. Also revert commit 2af853de (cmMakefile: Simplify IssueMessage implementation) because the assertion it added (which was removed by the above commit and is restored by reverting it) is incorrect. We do have code paths that call cmMakefile::IssueMessage with an empty execution stack, such as in CheckForUnusedVariables's LogUnused call.
* fix a load of include-what-you-use violationsDaniel Pfeifer2016-09-031-6/+7
|
* add_custom_command: Add DEPFILE option for NinjaKulla Christoph2016-08-301-4/+6
| | | | | | | | Provide a way for custom commands to inform the ninja build tool about their implicit dependencies. For now simply make use of the option an error on other generators. Closes: #15479
* Parser: Port away from cmMakefileStephen Kelly2016-08-251-3/+12
| | | | It is an unneeded dependency.
* cmMakefile: Port nested error logic away from cmExecutionStatusStephen Kelly2016-08-251-7/+11
| | | | It is no longer needed.
* cmMakefile: Simplify IssueMessage implementationStephen Kelly2016-08-251-5/+3
| | | | | It is only called during configure time when the execution stack is non-empty.
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-231-10/+16
|
* CMake: don't use else after returnDaniel Pfeifer2016-08-181-85/+82
|
* Use better KWSys SystemTools::GetEnv and HasEnv signaturesDāvis Mosāns2016-07-181-1/+4
|
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-10/+9
| | | | | | | | | | | | Replace use of cmsys::auto_ptr with a CM_AUTO_PTR macro that maps to our own implementation adopted from the KWSys auto_ptr implementation. Later we may be able to map CM_AUTO_PTR to std::auto_ptr on compilers that do not warn about it. Automate the client site conversions: git grep -l auto_ptr -- Source/ | grep -v Source/kwsys/ | xargs sed -i \ 's|cmsys::auto_ptr|CM_AUTO_PTR|;s|cmsys/auto_ptr.hxx|cm_auto_ptr.hxx|'
* use CM_NULLPTRDaniel Pfeifer2016-06-281-29/+30
|
* cmake: Add an option to control what files needs to be tracedAlex Turbov2016-06-171-1/+23
| | | | | | | | | | Even in relatively small projects using `--trace` (and `--trace-expand`) may produce a lot of output. When developing a custom module usually one is interested in output of only a few particular modules. Add a `--trace-source=<file>` option to enable tracing only a subset of source files. The final output would be only from requested modules, ignoring anything else not matched to given filename(s).
* Merge topic 'cleanup-streams'Brad King2016-06-161-1/+1
|\ | | | | | | | | | | | | | | ed5fa48d cmXMLWriter: use ifstream from KWSys 24ab29b8 Prefer istringstream and ostringstream over stringstream. ab8b77dd Remove redundant arguments from fstream constructors eb79fa72 Access std::ios_base with std::ios
| * Access std::ios_base with std::iosDaniel Pfeifer2016-06-141-1/+1
| | | | | | | | Just because it is shorter.
* | Merge topic 'clean-up-cmMakefile-IssueMessage'Brad King2016-06-161-3/+4
|\ \ | | | | | | | | | | | | | | | 5bbcf758 cmIfCommand: Don't rely on NestedError logic to issue messages 262ce91e cmMakefile: Extract invoke result variables
| * | cmMakefile: Extract invoke result variablesStephen Kelly2016-06-131-3/+4
| |/ | | | | | | Make it more clear what is happening here.
* | Parser: Out-of-line conditional code to cmMakefileStephen Kelly2016-06-131-4/+75
|/ | | | Simplify parser API.
* Merge topic 'fix-cmake-ISP-violation'Brad King2016-06-131-3/+3
|\ | | | | | | | | | | 23f87e81 cmake: Remove force from IssueMessage API 54c65d5f cmake: Extract DisplayMessage API.
| * cmake: Remove force from IssueMessage APIStephen Kelly2016-06-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-14/+38
|\ \ | | | | | | | | | | | | | | | | | | | | | 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-9/+29
| | |
| * | cmMakefile: Avoid IssueMessage after configure is finishedStephen Kelly2016-06-121-5/+9
| |/
* | Merge topic 'find-lib32'Brad King2016-06-131-0/+8
|\ \ | | | | | | | | | | | | 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/+8
| |/ | | | | | | | | | | | | 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.Daniel Pfeifer2016-06-101-1/+2
|/ | | | | Apply fixits of clang-tidy's readability-braces-around-statements checker.
* Remove c_str() calls from stream arguments.Daniel Pfeifer2016-06-061-1/+1
| | | | | | Mostly automated: git grep -l '.c_str() <<' | xargs sed -i 's|\.c_str() <<| <<|g'