Commit Graph

324 Commits

Author SHA1 Message Date
Brad King aad0e62060 Merge topic 'use-generator-target'
1c1c2a12 cmGeneratorTarget: Port ExpandLinkItems away from cmTarget.
c66084f5 cmGeneratorTarget: Port GetImportLinkInterface away from cmTarget.
83c29e39 cmGeneratorTarget: Port ComputeLinkImplementationLibraries away from cmTarget.
19882554 cmGeneratorTarget: Port handleSystemIncludesDep away from cmTarget.
c1f687b1 cmGeneratorTarget: Port GetLinkImplementationLibrariesInternal.
a6e1f05c cmGeneratorTarget: Port ComputeLinkInterface away from cmTarget.
654002fe cmGeneratorTarget: Port ComputeLinkInterfaceLibraries away from cmTarget.
922c8901 cmGeneratorTarget: Port GetLinkInterface away from cmTarget.
eaa5b9cb cmGeneratorTarget: Port cmTargetCollectLinkLanguages away from cmTarget.
f539da12 cmGeneratorTarget: Port GetLinkInterfaceLibraries away from cmTarget.
1c5d70f9 cmGeneratorTarget: Port processILibs away from cmTarget.
064c2488 cmComputeLinkDepends: Port some API to cmGeneratorTarget.
3e428fdc cmGeneratorTarget: Move IsImportedSharedLibWithoutSOName from cmTarget.
110fd2fb cmGeneratorTarget: Move GetOutputTargetType from cmTarget.
e7391699 cmGeneratorTarget: Move HasMacOSXRpathInstallNameDir from cmTarget.
c5718217 cmGeneratorTarget: Move HaveInstallTreeRPATH from cmTarget.
...
2015-10-12 10:26:20 -04:00
Stephen Kelly a367416cec cmLocalGenerator: Add current source directory accessor. 2015-10-10 11:04:39 +02:00
Stephen Kelly bbef3c2da8 cmLocalGenerator: Add current binary directory accessor. 2015-10-10 11:04:39 +02:00
Stephen Kelly 50dc9b4440 cmGeneratorTarget: Move GetPDBDirectory from cmTarget. 2015-10-09 01:04:37 +02:00
Stephen Kelly 12cb3bdce4 cmLocalGenerator: Add Home directory accessors.
Reduce reasons for cmLocalGenerator to have a cmMakefile.
2015-10-09 00:00:19 +02:00
Stephen Kelly 5d3776a7eb Access sources through cmGeneratorTarget. 2015-10-07 08:37:56 +02:00
Brad King e134e53b47 Add support for *.manifest source files with MSVC tools
Classify .manifest sources separately, add dependencies on them, and
pass them to the MS manifest tool to merge with linker-generated
manifest files.

Inspired-by: Gilles Khouzam <gillesk@microsoft.com>
2015-09-17 10:21:32 -04:00
Stephen Kelly 69329fff70 cmGeneratorTarget: Move GetLanguages from cmTarget. 2015-08-26 19:46:32 +02:00
Stephen Kelly ee26add4f4 cmGeneratorTarget: Move IsBundleOnApple from cmTarget. 2015-08-05 18:20:49 +02:00
Stephen Kelly 7c809fa2a6 cmGeneratorTarget: Move GetLinkerLanguage from cmTarget. 2015-08-05 18:20:48 +02:00
Stephen Kelly 3df705681b cmGeneratorTarget: Move GetPDBName from cmTarget. 2015-08-05 18:20:46 +02:00
Stephen Kelly a45fed81e5 cmGeneratorTarget: Move GetCompilePDBPath from cmTarget. 2015-08-05 18:20:46 +02:00
Stephen Kelly 803a7982b4 cmGeneratorTarget: Move GetLinkInformation from cmTarget 2015-08-05 18:20:44 +02:00
Brad King a8c3698526 Merge topic 'refactor-fortran-module-directory'
e90372a0 cmCommonTargetGenerator: Factor out Fortran module directory computation
70c21301 cmCommonTargetGenerator: Store working directory for relative paths
7371d8f3 cmCommonTargetGenerator: Return string from GetFortranModuleDirectory
613bc08a cmDependsFortran: Use string to store module directory
2015-07-30 09:56:16 -04:00
Brad King 7e27a42ebd Merge topic 'cmCommonTargetGenerator-GetLinkedTargetDirectories'
6d79eda7 cmCommonTargetGenerator: Adopt linked target directory computation
2015-07-30 09:56:14 -04:00
Brad King 70c21301b2 cmCommonTargetGenerator: Store working directory for relative paths
The Makefile generators run tools with the current working directory set
to the subdirectory of the build tree for the each target.  The Ninja
generator runs tools with the current working directory set to the top
of the build tree.  Tell cmCommonTargetGenerator where the working
directory will be so it can compute proper relative paths.
2015-07-29 13:20:03 -04:00
Brad King 7371d8f3b4 cmCommonTargetGenerator: Return string from GetFortranModuleDirectory 2015-07-29 13:18:46 -04:00
Brad King 6d79eda769 cmCommonTargetGenerator: Adopt linked target directory computation
Factor a GetLinkedTargetDirectories method out of
cmMakefileTargetGenerator::WriteTargetDependRules to compute the list of
directories associated with targets to which the current target links.
2015-07-28 15:40:06 -04:00
Stephen Kelly 3942ec32dd cmMakefileTargetGenerator: Remove unused variable. 2015-07-28 20:08:11 +02:00
Stephen Kelly ec38e4c84f Move GetFullPath to cmGeneratorTarget 2015-07-27 21:59:02 +02:00
Stephen Kelly d568eefe10 cmCustomCommandGenerator: Require cmLocalGenerator in API. 2015-07-27 20:09:38 +02:00
Brad King c736de7b28 Factor an <INCLUDES> placeholder out of <FLAGS> in rule variables
Teach the Makefile and Ninja generators to substitute for an <INCLUDES>
placeholder instead of putting -I in <FLAGS>.  Update our values for

  CMAKE_<LANG>_COMPILE_OBJECT,
  CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and
  CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE

to place <INCLUDES> just before <FLAGS>.
2015-07-13 10:49:46 -04:00
Brad King eacacacdce cmCommonTargetGenerator: Adopt GetDefines method
Move the member up from cmMakefileTargetGenerator so it can be re-used
later by cmNinjaTargetGenerator.
2015-07-09 10:10:25 -04:00
Brad King 0837538e46 cmCommonTargetGenerator: Adopt GetFlags method
De-duplicate per-target flag computation in Makefile and Ninja target
generators.
2015-07-09 10:06:24 -04:00
Brad King 7891f5d7e7 cmMakefileTargetGenerator: Fix comment typo 2015-07-09 10:04:00 -04:00
Brad King 058074d499 cmCommonTargetGenerator: Adopt GetFrameworkFlags
Move the member up from cmMakefileTargetGenerator.
2015-07-09 09:50:07 -04:00
Brad King ab8240189d cmCommonTargetGenerator: Adopt AppendFortranFormatFlags
Move up from cmMakefileTargetGenerator.
2015-07-09 09:50:07 -04:00
Brad King 0b22c0b815 cmCommonTargetGenerator: Adopt AddFortranFlags and friends
Move AddFortranFlags, GetFortranModuleDirectory, and supporting members
up from cmMakefileTargetGenerator.
2015-07-09 09:50:07 -04:00
Brad King cdb5b65752 cmCommonTargetGenerator: Adopt ModuleDefinitionFile member
De-duplicate the ModuleDefinitionFile and AddModuleDefinitionFlag
members from the Makefile and Ninja target generators.
2015-07-09 09:50:06 -04:00
Brad King beee793732 cmCommonTargetGenerator: Adopt GetFeature and friends
De-duplicate the GetFeature, GetFeatureAsBool, and AddFeatureFlags
members from the Makefile and Ninja target generators.
2015-07-09 09:50:06 -04:00
Brad King abfa5f2d1f cmCommonTargetGenerator: Adopt ConfigName member
De-duplicate the member from the Makefile and Ninja target generators.
2015-07-09 09:50:06 -04:00
Brad King a4a2518dd4 cmLocalUnixMakefileGenerator3: Provide GetConfigName() accessor
Rename internal member from ConfigurationName to ConfigName to
match the ninja generator.
2015-07-09 09:50:05 -04:00
Brad King e7dcdd1011 cmCommonTargetGenerator: Adopt basic target generator members
De-duplicate the GeneratorTarget, Target, and Makefile members from the
local Makefile and Ninja generators.
2015-07-09 09:50:05 -04:00
Brad King 001f9b3617 Add common base classes to Makefile and Ninja generators
Provide a place to move functionality common to both.
2015-07-09 09:50:05 -04:00
Stephen Kelly e77142350d Get the local generator from the GeneratorTarget.
The Makefile should not know the LocalGenerator at all
2015-06-22 13:23:46 -04:00
Stephen Kelly 5aa556be56 cmMakefileTargetGenerator: Require cmGeneratorTarget. 2015-06-22 13:23:45 -04:00
Brad King c1113705d7 Merge topic 'compiler-launcher'
698f7597 Add options to launch the compiler through tools like ccache or distcc
2015-06-15 09:45:28 -04:00
Bill Hoffman 698f75971b Add options to launch the compiler through tools like ccache or distcc
Create a <LANG>_COMPILER_LAUNCHER target property (initialized by a
CMAKE_<LANG>_COMPILER_LAUNCHER variable) to specify a compiler launcher
tool.  This will supersede the CMAKE_<LANG>_COMPILER_ARG1 approach to
using such tools.  The old approach set CMAKE_<LANG>_COMPILER to the
launcher tool while the new approach leaves this variable set to the
actual compiler.

Implement this property for Makefile and Ninja generators.  It cannot be
implemented for VS or Xcode generators as the IDE build tools offer no
such hooks.
2015-06-15 09:36:48 -04:00
Brad King f5690cc57c Merge topic 'move-Feature-API'
f573bd22 cmLocalGenerator: Add Feature API from cmMakefile.
ccbc2259 cmGeneratorTarget: Move Feature API from cmTarget.
2015-06-08 13:54:05 -04:00
Stephen Kelly ccbc225913 cmGeneratorTarget: Move Feature API from cmTarget. 2015-06-06 15:44:16 +02:00
Stephen Kelly 59e21ffa13 Port static calls from cmLocalGenerator to cmOutputConverter. 2015-06-06 09:15:58 +02:00
Stephen Kelly 6e570f857a cmLocalGenerator: Remove 'optional' parameter from Convert.
Port callers away from it.
2015-06-04 09:06:09 -04:00
Stephen Kelly 1335992c8f Remove CMAKE_USE_RELATIVE_PATHS variable.
The test for this variable was removed in commit v2.8.8~330^2~7 (complex:
Remove ancient unused ComplexRelativePaths test, 2011-12-23).

Commit v3.1.0-rc1~425^2~2 (backtrace: Convert to local paths in
IssueMessage, 2014-03-12) appears to have accidentally made some backtraces
print relative paths with the variable because conversions which used to be
done at configure time, before the variable had an effect are now potentially
done at generate time.

The documentation of the variable says not to use it, and the docs are wrong in
that the variable actually applies in per-directory scope.

The read of the variable makes it harder to split conversion methods from
cmLocalGenerator where they don't belong.  Remove it now.
2015-06-03 11:43:31 -04:00
Brad King fe168ea4d2 Merge topic 'mingw32-make-backslash-workaround'
7dd4a12c Revert "Makefile: Fix compilation after parent commit was backported"
2015-06-01 11:34:14 -04:00
Brad King 7dd4a12c30 Revert "Makefile: Fix compilation after parent commit was backported"
This reverts commit bfa57c5f80.
This change should not be part of 'master', only in 'release'
for CMake 3.2.
2015-06-01 11:33:24 -04:00
Brad King 05845ac10f Merge branch 'release' 2015-06-01 11:09:28 -04:00
Brad King bfa57c5f80 Makefile: Fix compilation after parent commit was backported
The CMake 3.2 release branch does not have 'cmAlgorithms.h' and simply
provides 'cmHasLiteralSuffix' in 'cmStandardIncludes.h' instead.
2015-06-01 11:07:05 -04:00
Brad King 3638641396 Merge topic 'run-include-what-you-use'
b3475ba5 Makefile: Fix <LANG>_INCLUDE_WHAT_YOU_USE with CTEST_USE_LAUNCHERS
2015-05-26 09:23:54 -04:00
Brad King b3475ba57b Makefile: Fix <LANG>_INCLUDE_WHAT_YOU_USE with CTEST_USE_LAUNCHERS
The 'ctest --launch' command must be placed before the IWYU launcher on
the compiler command line.  Extend the RunCMake.IncludeWhatYouUse test
to cover this case.  The Ninja generator already does it correctly.
2015-05-22 08:44:46 -04:00
Brad King 03a65dab30 Merge topic 'run-include-what-you-use'
ada5ffce Add options to run include-what-you-use with the compiler
67fa3da9 cmake: Add internal -E mode to run include-what-you-use with the compiler
2015-05-21 09:03:40 -04:00