mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 20:00:38 -06:00
The test project is compiled with a `-DVAR` compiler flag where `VAR` is the result variable. Tell `try_compile` to add the flag through `add_definitions` instead of `CMAKE_Fortran_FLAGS` so that it is not used for linking. Otherwise some Fortran compilers (e.g. XL 15) do not like the flag when used to drive linking.