Commit Graph

9 Commits

Author SHA1 Message Date
Brad King 39ebfc79e6 Ninja: Add explicit preprocessing step for Fortran
All Fortran sources need to be preprocessed before any source may be
compiled so that module dependencies can be (later) extracted.  Factor
out an explicit preprocessing step preceding compilation.  Use Ninja
depfile dependencies on the preprocessing step and then compile the
already-preprocessed source with a separate build statement that depends
explicitly only on the preprocessor output.  Later we will insert
dynamic discovery of module dependencies between these steps.
2016-09-22 13:53:09 -04:00
Brad King f9dbe22ca2 Intel: Do not use GNU-like flags on Windows
Refactor options out of `Modules/Compiler/Intel-{ASM,C,CXX,Fortran}.cmake`
into a common helper in `Modules/Compiler/Intel.cmake`.  Condition
them to be used only on non-Windows hosts where the Intel compiler
is GNU-like instead of MSVC-like.

Previously this worked only because the options were later overridden
by `Modules/Platform/Windows-Intel*.cmake`, but it is cleaner to not
set the options in the first place.
2016-07-05 13:58:42 -04: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
Tim Gallagher b6b37e3037 Makefile: Add assembly and preprocessed targets for Fortran
Extend the FortranOnly test to cover "make <src>.i" targets.
2014-11-10 10:24:53 -05:00
Kitware Robot 77543bde41 Convert CMake-language commands to lower case
Ancient CMake versions required upper-case commands.  Later command
names became case-insensitive.  Now the preferred style is lower-case.

Run the following shell code:

cmake --help-command-list |
grep -v "cmake version" |
while read c; do
    echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g'
done >convert.sed &&
git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' |
egrep -z -v '^(Utilities/cm|Source/kwsys/)' |
xargs -0 sed -i -f convert.sed &&
rm convert.sed
2012-08-13 14:19:16 -04:00
Brad King 5c0c635a09 Fortran: Add support for free- and fixed-form flags
Define a "Fortran_FORMAT" target and source file property.  Initialize
the target property from a "CMAKE_Fortran_FORMAT" variable.  Interpret
values "FIXED" and "FREE" to indicate the source file format.  Append
corresponding flags to the compiler command line.
2011-08-31 10:24:43 -04:00
Brad King 2eca4dd2d1 Use Intel for Linux flags only on Linux
The commit "Split Intel compiler information files" moved some Linux
specific flags into the platform-independent Intel compiler info files.
This moves them back.
2009-09-01 13:55:13 -04:00
Brad King 2ce6a7d0fb Split Intel compiler information files
This moves platform-independent Intel compiler flags into separate
"Compiler/Intel-<lang>.cmake" modules.  Platform-specific flags are
left untouched.
2009-08-21 09:54:42 -04:00
Brad King 0ea43ee128 Set CMAKE_<LANG>_VERBOSE_FLAG variables for Intel
We set the variables to contain "-v", the verbose front-end output
option for Intel compilers.  This enables detection of implicit link
libraries and directories for these compilers.
2009-07-29 16:07:27 -04:00