summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Add generator expression support to per-source COMPILE_FLAGSZsolt Parragi2016-10-281-7/+9
| | | | | | This allows users to specify different genex-based compile flags for each file in a target, e.g. compiling just a single file with `Od/Ox` in release builds on Visual Studio.
* cmListFileCache: Remove cmState header includeStephen Kelly2016-10-191-0/+1
| | | | | Include it in dependents which have previously relied on it transitively.
* cmState: Port dependents to new cmStateTypes headerStephen Kelly2016-10-191-1/+1
|
* cmState: Port dependent code to new cmStateDirectory nameStephen Kelly2016-10-191-3/+3
|
* cmState: Move TargetType enum to separate namespaceStephen Kelly2016-10-191-12/+12
|
* cmRulePlaceholderExpander: Port clients to direct-useStephen Kelly2016-10-151-9/+14
| | | | | | Add a factory function to cmLocalGenerator so that variableMappings can be provided from it, and so that Ninja can always have a hard-coded TargetImpLib.
* cmLocalGenerator: Use strings instead of a Target in rule replacementStephen Kelly2016-10-151-1/+3
| | | | Don't rely on the cmGeneratorTarget type needlessly.
* cmLocalGenerator: Use a converter in rule replacement APIStephen Kelly2016-10-151-4/+8
| | | | | | | The rule replacement API should not really be in cmLocalGenerator, but it was historically, and this coupled many other things together here too, such as output conversion. Make the output converter a parameter so that rule replacement can be removed from cmLocalGenerator.
* Merge topic 'remove-obsolete'Brad King2016-10-131-49/+1
|\ | | | | | | | | | | b6a174d2 Makefiles: Remove query for CMAKE_OBJECT_NAME d0faa58a Makefiles: Remove forbidden flag logic
| * Makefiles: Remove query for CMAKE_OBJECT_NAMEStephen Kelly2016-10-091-3/+1
| | | | | | | | it is not set.
| * Makefiles: Remove forbidden flag logicStephen Kelly2016-10-091-46/+0
| | | | | | | | This might have been needed some day in the past, but not anymore.
* | cmLinkLineComputer: Extract link libraries computation from cmLocalGeneratorStephen Kelly2016-10-101-2/+1
| | | | | | | | Hide some methods which no longer need to be public.
* | cmLinkLineComputer: Move FrameworkPath computation from cmLocalGeneratorStephen Kelly2016-10-101-3/+2
| | | | | | | | Add UseWatcomQuote state, and remove corresponding method parameters.
* | cmLinkLineComputer: Move RPath computation from cmLocalGeneratorStephen Kelly2016-10-101-2/+2
| | | | | | | | | | | | 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-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | cmLocalGenerator: Pass link library info to OutputLinkLibrariesStephen Kelly2016-10-101-3/+6
| | | | | | | | | | | | | | Remove the cmGeneratorTarget from the interface. This is simplification of the OutputLinkLibraries responsibilities so that it can be broken apart into multiple methods.
* | Makefiles: Port CreateLinkLibs to cmLinkLineComputerStephen Kelly2016-10-101-8/+4
| |
* | cmLinkLineComputer: Extract from cmLocalGeneratorStephen Kelly2016-10-101-3/+18
| | | | | | | | | | | | | | | | | | | | | | 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-8/+3
| |
* | Makefiles: Make helper class independent of cmLocalGeneratorStephen Kelly2016-10-091-9/+21
|/ | | | It only needs output conversion.
* Merge topic 'nmake-encoding'Brad King2016-10-071-3/+7
|\ | | | | | | | | | | | | c666f8cb NMake: Use ANSI encoding for NMake Makefiles f00214aa cmGeneratedFileStream: Add optional encoding support bb1d3370 codecvt: Add class for encoding conversion
| * NMake: Use ANSI encoding for NMake MakefilesDāvis Mosāns2016-10-061-3/+7
| | | | | | | | | | Set ANSI encoding to cmGeneratedFileStream for use with NMake Makefile generator.
* | Makefiles: Introduce local RelativePath methodStephen Kelly2016-10-061-20/+22
|/ | | | | | | This makes it easier to remove directory-specific state from cmOutputConverter where it doesn't belong. Of course, this just relocates the problem to the makefiles generator for now, but that's better than affecting the core.
* 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.
* Fortran: Use module dir flag if needed for default module directoryBrad King2016-09-201-1/+5
| | | | | | | | | | | | | | Our buildsystem model says that the default Fortran module output directory is the build tree directory corresponding to the source tree `CMakeLists.txt` file adding the current target. Extend `cmGeneratorTarget::GetFortranModuleDirectory` to allow generators to pass in the compiler working directory. If the working directory does not match the default Fortran module output directory then we need an explicit module directory flag (e.g. `-J`) to tell the compiler to put/use modules in the latter. This does not affect the Makefile generator but will be useful for future introduction of Fortran support to the Ninja generator.
* Convert: Inline uses of START_OUTPUTStephen Kelly2016-09-191-24/+40
|
* Convert: Move access to BinaryDirectory out of loopsStephen Kelly2016-09-191-2/+2
|
* Convert: Inline uses of HOME_OUTPUTStephen Kelly2016-09-191-2/+4
|
* Convert: Inline HOME_OUTPUT MAKERULE conversionStephen Kelly2016-09-191-7/+16
|
* Convert: Avoid HOME_OUTPUT enum when converting to relative pathsStephen Kelly2016-09-191-2/+2
|
* Convert: Move access to CurrentBinaryDirectory out of loopsStephen Kelly2016-09-191-4/+7
|
* Convert: Avoid START_OUTPUT enum when converting to relative pathsStephen Kelly2016-09-191-3/+3
|
* Convert: Replace Convert(FULL) with equivalentStephen Kelly2016-08-271-13/+23
| | | | | This is more explicit than funnelling everything through the Convert method.
* Convert: Replace trivial conversion with new methodStephen Kelly2016-08-271-3/+6
|
* Convert: Replace UNCHANGED conversions with new API callStephen Kelly2016-08-271-5/+4
|
* Convert: Replace FULL conversions with equivalentStephen Kelly2016-08-271-9/+6
|
* Convert: Replace uses of Convert(NONE)Stephen Kelly2016-08-271-19/+19
| | | | These are equivalent to ConvertToOutputFormat.
* Makefiles: Change AppendCustomCommand API to stringsStephen Kelly2016-08-271-2/+2
| | | | | Avoid the RelativeRoot enum. Supply the HOME_OUTPUT string at each callsite to make the parameter non-defaulted.
* Makefiles: Change signature of AppendCustomCommandStephen Kelly2016-08-271-2/+2
| | | | The RelativeRoot parameter will become non-default.
* Makefiles: Port CreateCDCommand to string-based APIStephen Kelly2016-08-271-4/+4
|
* fix a batch of include-what-you-use violationsDaniel Pfeifer2016-08-231-5/+12
|
* Makefile: Avoid link line object list lengths nearing system limitsBrad King2016-07-201-0/+39
| | | | | | | Use response files for object file lists that approach the scale of the system `ARG_MAX` limit. Fixes #16206.
* Makefile: Factor out response file checks into common helperBrad King2016-07-201-0/+32
| | | | | | 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/+43
| | | | | | Factor the implementation out of cmMakefileLibraryTargetGenerator into a helper method in cmMakefileTargetGenerator so it can be re-used elsewhere later.
* Avoid using KWSys auto_ptr by adopting it ourselvesBrad King2016-06-291-1/+1
| | | | | | | | | | | | 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-26/+30
|
* cmGeneratorTarget: Adopt Fortran module directory generationTobias Hunger2016-06-171-1/+1
| | | | | | | | | Move code to create/get the fortran module directory from the cmCommonTargetGenerator to cmGeneratorTarget. Rename the ComputeFortranModuleDirectory method to CreateFortranModuleDirectory as this method *creates* the directory if it is missing.
* Refactor Makefile/Ninja tool working directory storageBrad King2016-06-171-1/+1
| | | | | Move cmCommonTargetGenerator::WorkingDirectory to cmLocalCommonGenerator and add an access method.
* Use the empty() method to check for emptyness.Daniel Pfeifer2016-06-021-1/+1
| | | | | Apply fix-its from clang-tidy's readability-container-size-empty checker.
* Merge topic 'remove-needless-copies'Brad King2016-05-271-1/+1
|\ | | | | | | | | | | 27ead963 Remove unnecessary local copies. 618fb23f Pass arguments that are not modified as const&.