Factor the flag generation out of cmCommonTargetGenerator::GetFlags
into a new cmLocalGenerator::GetTargetCompileFlags method.
This will allow it to be used without a target generator available.
Add a cmLocalGenerator::GetTargetFortranFlags virtual method to get
generator-specific generation of Fortran-specific flags. Implement it
in cmLocalCommonGenerator by moving the implementation from
cmCommonTargetGenerator::AddFortranFlags. This will allow it to be used
without having a target generator available.
Inspired-by: Tobias Hunger <tobias.hunger@qt.io>
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.
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.
Move this method from cmMakefileLibraryTargetGenerator so it can be
re-used for the Ninja generator too.
Signed-off-by: Bruce Stephens <bruce.r.stephens@gmail.com>
55474e61 cmState: Move GetTargetTypeName from cmTarget.
38df5c36 Remove now-obsolete casts.
4ee2b267 cmGeneratorTarget: Use enum for GetType.
eac15298 cmState: Move TargetType enum from cmTarget.
482b3811 cmTarget: Move link type enum out.
2ee1cb85 cmTarget: Move ImportInfoMap out of internal class.
a48bcabd cmTarget: Move backtrace member out of internal class.
6694d993 cmTarget: Remove unneeded constructors.
983c00f8 Generators: Use GetType from the cmGeneratorTarget.
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>
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.
Factor a GetLinkedTargetDirectories method out of
cmMakefileTargetGenerator::WriteTargetDependRules to compute the list of
directories associated with targets to which the current target links.
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>.