summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.h
Commit message (Collapse)AuthorAgeFilesLines
* Makefiles: Drop 'requires' step and its supporting infrastructureYurii Batrak2017-12-141-3/+0
| | | | | | | | The 'requires' step was used to provide implicit dependencies between the generated Fortran module files and a Fortran target that needs these module files to ensure the correct compilation order. After recent refactoring to resolve all dependencies explicitly through `.mod.stamp` make targets, the separate 'requires' step is not needed anymore.
* Use C++11 override instead of CM_OVERRIDEBrad King2017-09-151-5/+3
| | | | | | | | We now require C++11 support including `override`. Drop use of the old compatibility macro. Convert references as follows: git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' | xargs sed -i 's/CM_OVERRIDE/override/g'
* IWYU: Mark cmConfigure.h with pragma: keepDaniel Pfeifer2017-08-261-1/+1
| | | | Also remove `#include "cmConfigure.h"` from most source files.
* Pass large types by const&, small types by valueDaniel Pfeifer2017-06-031-1/+1
|
* Use quotes for non-system includesDaniel Pfeifer2017-04-111-1/+1
| | | | | | | | | | | | | Automate with: git grep -l '#include <cm_' -- Source \ | xargs sed -i 's/#include <\(cm_.*\)>/#include "\1"/g' git grep -l '#include <cmsys/' -- Source \ | xargs sed -i 's/#include <\(cmsys\/.*\)>/#include "\1"/g' git grep -l '#include <cm[A-Z]' -- Source \ | xargs sed -i 's/#include <\(cm[A-Z].*\)>/#include "\1"/g'
* Refactor WINDOWS_EXPORT_ALL_SYMBOLS implementationBrad King2017-03-091-2/+1
| | | | | | | Use `cmGeneratorTarget::ModuleDefinitionInfo` to combine the implementation of `WINDOWS_EXPORT_ALL_SYMBOLS` with that of using a `.def` file as a source. Only one of these could be used within a single target before anyway.
* Fix several include-what-you-use findingsDaniel Pfeifer2016-11-081-5/+7
|
* cmState: Port dependent code to new cmStateDirectory nameStephen Kelly2016-10-191-1/+1
|
* Merge topic 'remove-obsolete'Brad King2016-10-131-2/+0
|\ | | | | | | | | | | b6a174d2 Makefiles: Remove query for CMAKE_OBJECT_NAME d0faa58a Makefiles: Remove forbidden flag logic
| * Makefiles: Remove forbidden flag logicStephen Kelly2016-10-091-2/+0
| | | | | | | | This might have been needed some day in the past, but not anymore.
* | cmLinkLineComputer: Move FrameworkPath computation from cmLocalGeneratorStephen Kelly2016-10-101-2/+1
| | | | | | | | Add UseWatcomQuote state, and remove corresponding method parameters.
* | cmLinkLineComputer: Move RPath computation from cmLocalGeneratorStephen Kelly2016-10-101-1/+1
| | | | | | | | | | | | Add state for Relink and populate it at the point of cmLinkLineComputer initialization. This allows removal of the parameter in go-between methods.
* | cmLinkLineComputer: Move ComputeLinkLibs from cmLocalGeneratorStephen Kelly2016-10-101-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add a cmOutputConverter to the cmLinkLineComputer and factory methods to facilitate shell escapes. Add state to the cmLinkLineComputer to record whether outputting for response files or for watcom, to satisfy the cmOutputConverter API. These are constant for the lifetime of the cmLinkLineComputer, even when its functionality is extended in the future. This also keeps the signatures of cmLinkLineComputer relatively simple. Pass the cmComputeLinkInformation as a method parameter so that cmLinkLineComputer is free from target-specific state. An instance should be usable for all targets in a directory.
* | Makefiles: Port CreateLinkLibs to cmLinkLineComputerStephen Kelly2016-10-101-1/+3
| |
* | cmLinkLineComputer: Extract from cmLocalGeneratorStephen Kelly2016-10-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | CMake has several classes which have too many responsibilities. cmLocalGenerator is one of them. Start to extract the link line computation. Create generator-specific implementations of the interface to account for generator-specific behavior. Unfortunately MSVC60 has different behavior to everything else and CMake still generates makefiles for it. Isolate it with MSVC60-specific names.
* | Makefiles: Inline only use of methodStephen Kelly2016-10-091-1/+0
|/
* 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.
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-231-5/+9
|
* Makefile: Factor out response file checks into common helperBrad King2016-07-201-0/+3
| | | | | | Factor CMAKE_<LANG>_USE_RESPONSE_FILE_FOR_{OBJECTS,LIBRARIES} lookup out into a common helper. Use a separate helper for each because more specific logic may be added to each later.
* Makefile: Factor out WINDOWS_EXPORT_ALL_SYMBOLS helperYury Zhuravlev2016-07-111-0/+4
| | | | | | Factor the implementation out of cmMakefileLibraryTargetGenerator into a helper method in cmMakefileTargetGenerator so it can be re-used elsewhere later.
* mark functions with CM_OVERRIDEDaniel Pfeifer2016-06-271-3/+5
|
* Revise C++ coding style using clang-formatKitware Robot2016-05-161-27/+32
| | | | | | | | | | | | | 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.
* Makefiles: Port to cmGeneratorTarget.Stephen Kelly2015-10-241-2/+0
|
* Remove vestigial declarations.Stephen Kelly2015-10-201-1/+0
|
* cmMakefileTargetGenerator: Add accessor for GeneratorTarget.Stephen Kelly2015-08-051-0/+1
|
* cmCommonTargetGenerator: Adopt GetDefines methodBrad King2015-07-091-3/+0
| | | | | Move the member up from cmMakefileTargetGenerator so it can be re-used later by cmNinjaTargetGenerator.
* cmCommonTargetGenerator: Adopt GetFlags methodBrad King2015-07-091-3/+0
| | | | | De-duplicate per-target flag computation in Makefile and Ninja target generators.
* cmCommonTargetGenerator: Adopt GetFrameworkFlagsBrad King2015-07-091-3/+0
| | | | Move the member up from cmMakefileTargetGenerator.
* cmCommonTargetGenerator: Adopt AppendFortranFormatFlagsBrad King2015-07-091-3/+0
| | | | Move up from cmMakefileTargetGenerator.
* cmCommonTargetGenerator: Adopt AddFortranFlags and friendsBrad King2015-07-091-8/+0
| | | | | Move AddFortranFlags, GetFortranModuleDirectory, and supporting members up from cmMakefileTargetGenerator.
* cmCommonTargetGenerator: Adopt Convert methodBrad King2015-07-091-12/+0
| | | | Move it up from cmMakefileTargetGenerator.
* cmCommonTargetGenerator: Adopt ModuleDefinitionFile memberBrad King2015-07-091-3/+0
| | | | | De-duplicate the ModuleDefinitionFile and AddModuleDefinitionFlag members from the Makefile and Ninja target generators.
* cmCommonTargetGenerator: Adopt GetFeature and friendsBrad King2015-07-091-7/+0
| | | | | De-duplicate the GetFeature, GetFeatureAsBool, and AddFeatureFlags members from the Makefile and Ninja target generators.
* cmCommonTargetGenerator: Adopt ConfigName memberBrad King2015-07-091-1/+0
| | | | De-duplicate the member from the Makefile and Ninja target generators.
* cmCommonTargetGenerator: Adopt basic target generator membersBrad King2015-07-091-3/+0
| | | | | De-duplicate the GeneratorTarget, Target, and Makefile members from the local Makefile and Ninja generators.
* Add common base classes to Makefile and Ninja generatorsBrad King2015-07-091-1/+3
| | | | Provide a place to move functionality common to both.
* cmMakefileTargetGenerator: Require cmGeneratorTarget.Stephen Kelly2015-06-221-1/+1
|
* cmLocalGenerator: Remove 'optional' parameter from Convert.Stephen Kelly2015-06-041-3/+2
| | | | Port callers away from it.
* Merge topic 'custom-command-multiple-outputs'Brad King2015-04-131-2/+1
|\ | | | | | | | | | | 9660a3cc Makefile: Fix multiple custom command outputs with one missing 5c08e255 KWSys SystemTools: Teach Touch with !create to succeed on missing file
| * Makefile: Fix multiple custom command outputs with one missingBrad King2015-04-101-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The use of "cmake -E touch_nocreate" added in commit v3.2.1~4^2 (Makefile: Fix multiple custom command outputs regression, 2015-03-06) caused builds to fail when one of the outputs is intentionally not created. This was fixed by our parent commit by making touch_nocreate succeed when the file is missing. Add a test case covering it. For the Watcom WMake generator, check for the SYMBOLIC source file property separately on each output. The mark is needed on outputs that are not really created to tell 'wmake' not to complain that it is missing. The mark is also needed on outputs that are created or 'wmake' will not consider them out of date when they exist. Inspired-by: Ben Boeckel <ben.boeckel@kitware.com>
* | Merge topic 'custom-command-multiple-outputs'Brad King2015-03-091-0/+10
|\ \ | |/ | | | | | | 66a9c90c Makefile: Fix multiple custom command outputs regression (#15116)
| * Makefile: Fix multiple custom command outputs regression (#15116)Brad King2015-03-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In commit v3.2.0-rc1~272^2~2 (Makefile: Fix rebuild with multiple custom command outputs, 2014-12-05) we changed the generated makefile pattern for multiple outputs from out1: depends... commands... out2: out1 to out1 out2: depends... commands... This was based on the incorrect assumption that make tools would treat this as a combined output rule and run the command(s) exactly once for them. It turns out that instead this new pattern is equivalent to out1: depends... commands... out2: depends... commands... so the commands may be run more than once. Some documents suggest using a "dedicated witness" stamp file: stamp: depends... rm -f stamp touch stamp.tmp commands... mv stamp.tmp stamp out1 out2: stamp However, if the commands fail the error message will refer to the stamp instead of any of the real outputs, which may be confusing to readers. Also, this approach seems to have the same behavior of the original approach that motiviated the above commit: multiple invocations are needed to bring consumers of the outputs up to date. Instead we can return to the original approach but add an explicit touch to each extra output rule: out1: depends... commands... out2: out1 touch -c out2 This causes make tools to recognize that all outputs have changed and therefore to execute any commands that consume them.
* | Makefile: Fix output during parallel builds (#12991)Brad King2015-02-061-1/+1
|/ | | | | | | | | | Replace use of separate "cmake -E cmake_progress_report" and "cmake -E cmake_echo_color" commands to report the progress and message portions of build output lines with --progress-* options to the latter to print everything with a single command. The line buffering of the stdout FILE stream should cause the whole line to be printed with one atomic write. This will avoid inter-mixing of line-wise messages from different processes during a parallel build.
* Makefile: Fix rebuild with multiple custom command outputs (#15116)Brad King2014-12-051-12/+0
| | | | | | | Fix the generated makefiles for custom commands with multiple outputs to list all the outputs on the left hand side of the build rule. This is much simpler and more reliable than the old multiple-output-pair infrastructure.
* Watcom: Use single quote for all file/path items in wlink commandJiri Malak2014-04-081-1/+2
| | | | | | Watcom Linker use single quote if necessary for quoting target name, libraries names and libraries search path. Object names were already fixed.
* Makefile: Generate single-quoted object lists for WatcomJiri Malak2014-03-271-2/+4
| | | | | | | | | | | | | | | | Drop the CMAKE_NO_QUOTED_OBJECTS internal variable from the Makefile generators. The underlying problem is with the Watcom linker, not with WMake. The Watcom linker wants object files to be single-quoted. Add <LINK-RULE>_USE_WATCOM_QUOTE platform information variables to tell the generators to use Watcom-style single quotes for object files on link lines. On Windows, Watcom uses the GetCommandLine API to get the original command-line string and do custom parsing that expects single quotes. On POSIX systems, Watcom approximates the original command line by joining all argv[] entries separated by a single space. Therefore we need to double-quote the single-quoted arguments so that the shell does not consume them and they are available for the parser to see.
* Constify some APIs in generators.Stephen Kelly2014-03-131-4/+5
|
* cmOSXBundleGenerator: Make MacOSXContentGeneratorType arg const.Stephen Kelly2014-03-131-1/+1
|
* Generalize cmCustomCommandGenerator to more fieldsBrad King2014-03-121-2/+2
| | | | | | | Until now the cmCustomCommandGenerator was used only to compute the command lines of a custom command. Generalize it to get the comment, working directory, dependencies, and outputs of custom commands. Update use in all generators to support this.
* stringapi: Use strings for dependency informationBen Boeckel2014-03-081-1/+1
|