It seems that the Fortran_PREPROCESS property is not functioning properly on Linux. The default behavior of CMake on Linux is that source files are not preprocssed and Fortran_PREPROCESS doesn seem to affect this.
I attach a minimal example. Building this on Linux fails because source.f90 has not been preprocessed. I tried setting both the source file version and the target version of Fortran_PREPROCESS to ON but neither works. I also tried it for both Intel Fortran and GNU Fortran.
On Windows using Intel Fortran with Visual Studio it works fine. Here the default behavior is that source files are preprocessed, but I can change that using the Fortran_PREPROCESS property.
Best,
Maarten
CMakeLists.txt (227 Bytes)
source.f90 (78 Bytes)