Commit Graph

172 Commits

Author SHA1 Message Date
Brad King 7b5f85677c Fortran: Use module dir flag if needed for default module directory
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.
2016-09-20 08:48:41 -04:00
Daniel Pfeifer cc6b948e5e cmGeneratorTarget: factor out common part of AddSources commands 2016-09-08 23:47:16 +02:00
Daniel Pfeifer efed6468ed fix a load of include-what-you-use violations 2016-09-03 08:04:56 -04:00
Daniel Pfeifer 1d6909a287 use CM_NULLPTR 2016-06-28 09:02:26 -04:00
Tobias Hunger 49f10f0d24 cmGeneratorTarget: Adopt Fortran module directory generation
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.
2016-06-17 14:22:29 -04:00
Kitware Robot d9fd2f5402 Revise C++ coding style using clang-format
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.
2016-05-16 16:05:19 -04:00
Christoph Grüninger 58a4a77132 Make cmLinkInterface:: and cmGeneratorTarget::Multiplicity unsigned ints 2016-02-04 10:57:02 -05:00
Milian Wolff 275f2a85b2 Remove temporary allocations when calling cmGeneratorTarget::GetName.
This happens quite often from within comparisons such as in
NamedGeneratorTargetFinder or FindGeneratorTargetImpl. It is the
top hotspot of both, number of allocations as well as number of
temporary allocations - the majority of calls lead to temporary
allocations.

In raw numbers, this patch removes ~1E6 temporary allocations of
1.5E6 temporary allocations in total when running the cmake daemon
on the KDevelop build dir. That is 2/3 of the total.

This hotspot was found with heaptrack.
2016-01-20 21:20:54 +01:00
Tim Grothe 247c168b98 Refactor `.def` file lookup
Return a `cmSourceFile const*` from GetModuleDefinitionFile so that
callers can get more information than just the path to the file.
2015-11-04 09:15:14 -05:00
Stephen Kelly 278ba2db47 cmGeneratorTarget: Add API for globally visible IMPORTED 2015-10-27 07:44:25 +01:00
Stephen Kelly 7f6beddae3 cmGeneratorTarget: Port cmOptionalLinkImplementation 2015-10-27 07:44:23 +01:00
Stephen Kelly 520ca0ff6c cmGeneratorTarget: Add API for property keys 2015-10-27 07:44:23 +01:00
Stephen Kelly b397eae82e cmGeneratorTarget: Move LinkLanguagePropagatesToDependents from cmTarget 2015-10-27 07:44:21 +01:00
Stephen Kelly 7a1b83cb3f cmGeneratorTarget: Add GetUtilityBacktrace API 2015-10-27 07:44:21 +01:00
Stephen Kelly 736c2042c6 cmGeneratorTarget: Add GetUtilities API 2015-10-27 07:44:20 +01:00
Stephen Kelly bde277e811 cmGeneratorTarget: Add GetLinkDirectories API. 2015-10-26 22:02:13 +01:00
Stephen Kelly cf69630e51 cmGeneratorTarget: Move GetFrameworkVersion from cmTarget 2015-10-26 22:02:13 +01:00
Stephen Kelly 3f8aa62bfb cmGeneratorTarget: Add API for target-relative commands. 2015-10-26 22:02:13 +01:00
Stephen Kelly f528e6bcb9 Makefiles: Port progress marks to cmGeneratorTarget. 2015-10-24 09:19:53 +02:00
Stephen Kelly c2c239e607 cmGlobalGenerator: Move GeneratorTargetsType to usage site. 2015-10-24 09:19:52 +02:00
Stephen Kelly d74bca5a8f cmGeneratorTarget: Copy the policy map from the cmTarget. 2015-10-21 00:52:23 +02:00
Stephen Kelly 6d94078e62 cmGeneratorTarget: Move IsDLLPlatform from cmTarget. 2015-10-21 00:52:22 +02:00
Stephen Kelly 3ebc62850c cmGeneratorTarget: Move HaveWellDefinedOutputFiles from cmTarget. 2015-10-21 00:52:22 +02:00
Stephen Kelly 311018e5ad cmGeneratorTarget: Move GetExportMacro from cmTarget. 2015-10-21 00:52:22 +02:00
Stephen Kelly 215cd21a02 cmGeneratorTarget: Provide direct access to the backtrace. 2015-10-21 00:37:03 +02:00
Stephen Kelly 83703bda7d cmGeneratorTarget: Copy IsExecutableWithExports from cmTarget. 2015-10-21 00:36:09 +02:00
Stephen Kelly d8f8940bc6 cmGeneratorTarget: Move IsCFBundleOnApple from cmTarget. 2015-10-19 20:27:41 +02:00
Stephen Kelly 7550879f57 cmGeneratorTarget: Move IsXCTestOnApple from cmTarget. 2015-10-19 20:27:41 +02:00
Stephen Kelly 88d10d55ac cmGeneratorTarget: Copy IsAppBundleOnApple from cmTarget.
Leave the cmTarget method behind for now to implement cmInstallCommand.
2015-10-19 20:27:41 +02:00
Stephen Kelly b5f5de70c0 cmGeneratorTarget: Copy IsFrameworkOnApple from cmTarget.
Leave the cmTarget method behind for now to implement cmInstallCommand.
2015-10-19 20:27:41 +02:00
Stephen Kelly 8e20ea6ef2 cmGeneratorTarget: Move IsLinkable from cmTarget. 2015-10-19 20:27:40 +02:00
Stephen Kelly eb3be7d688 cmGeneratorTarget: Move GetExportName from cmTarget. 2015-10-18 16:29:30 +02:00
Stephen Kelly beff29f0d4 cmGeneratorTarget: Move ComputeVersionedName from cmTarget. 2015-10-16 20:24:44 +02:00
Stephen Kelly 12e4790a0b cmGeneratorTarget: Move GetTargetVersion from cmTarget. 2015-10-16 20:24:44 +02:00
Stephen Kelly 1427227720 cmGeneratorTarget: Move CheckCMP0004 from cmTarget. 2015-10-16 20:24:44 +02:00
Stephen Kelly 8f363d6771 cmGeneratorTarget: Move ImportInfo from cmTarget. 2015-10-16 20:24:43 +02:00
Stephen Kelly a892b285f8 cmGeneratorTarget: Move ImportedGetLocation from cmTarget. 2015-10-16 20:24:43 +02:00
Stephen Kelly cb8c728f17 cmGeneratorTarget: Move GetFullNameImported from cmTarget. 2015-10-16 20:24:43 +02:00
Stephen Kelly 60bd9f9c92 cmGeneratorTarget: Move GetObjectLibrariesCMP0026 from cmTarget. 2015-10-16 20:17:22 +02:00
Stephen Kelly 4ee2b26708 cmGeneratorTarget: Use enum for GetType. 2015-10-15 00:41:40 +02:00
Stephen Kelly ce75c86ec3 cmGeneratorTarget: Move GetSupportDirectory from cmTarget. 2015-10-12 18:39:59 +02:00
Stephen Kelly 526cc7dc52 cmGeneratorTarget: Move HasImportLibrary from cmTarget. 2015-10-12 18:39:59 +02:00
Stephen Kelly 8d2e3e53b9 cmGeneratorTarget: Move HasImplibGNUtoMS from cmTarget. 2015-10-12 18:39:59 +02:00
Stephen Kelly f7acd74215 cmGeneratorTarget: Port LinkImplClosure to cmGeneratorTarget. 2015-10-12 18:39:58 +02:00
Stephen Kelly bf2d061ad3 cmGeneratorTarget: Move FindTargetToLink from cmTarget. 2015-10-12 18:39:58 +02:00
Stephen Kelly 9ca4cae51e cmGeneratorTarget: Move GetUtilityItems from cmTarget. 2015-10-12 18:39:58 +02:00
Stephen Kelly 1c1c2a1201 cmGeneratorTarget: Port ExpandLinkItems away from cmTarget. 2015-10-10 17:06:56 +02:00
Stephen Kelly c66084f5d7 cmGeneratorTarget: Port GetImportLinkInterface away from cmTarget. 2015-10-10 11:22:41 +02:00
Stephen Kelly 83c29e3903 cmGeneratorTarget: Port ComputeLinkImplementationLibraries away from cmTarget. 2015-10-10 11:22:27 +02:00
Stephen Kelly c1f687b1ad cmGeneratorTarget: Port GetLinkImplementationLibrariesInternal. 2015-10-10 11:22:20 +02:00