[cmake-developers] Assembly/preprocessed targets for Fortran
Brad King
brad.king at kitware.com
Tue Nov 4 15:45:39 EST 2014
On 11/04/2014 03:19 PM, Tim Gallagher wrote:
> I looked through the CMake source code and it didn't seem that
> hard to make it work correctly for Fortran also. I made the
> changes on my local branch and it works great for the Intel
> and GNU compiler suites on Linux (those are the only ones I
> have access to). I modified the other compiler modules on the
> assumption that the options were the same for C, C++ and Fortran
> source files (which is true for Intel and GNU).
Great, thanks for looking into this.
> adding "Fortran" to the check for "C" and "C++" when assigning
> the `lang_is_c_or_cxx` variable. That variable name should change
Perhaps "lang_has_preprocessor"? You could also add
bool const lang_has_assembly = lang_has_preprocessor;
and update each use of the variable to use the proper name.
In the future the answer may not be the same.
Watch out for other uses of lang_is_c_or_cxx, like for
CMAKE_EXPORT_COMPILE_COMMANDS. Check if each use case
makes sense for Fortran.
> 2) How would/could I go about testing the changes to the other
> compilers/platforms that I do not have personal access to?
You could look at adding coverage of these make targets to
the test suite under the proper conditions. That will likely
be a harder change than your main fix though.
Thanks,
-Brad
More information about the cmake-developers
mailing list