Re: [CMake] copying fortran .mod files in different directories

2020-03-04 Thread Lukas van de Wiel
Hi Bill, Thanks a lot for your quick response! Using your idea I could set the Fortran module directory per module target, and add those directories as target_include_directories to the executables. Worked like a charm! Lukas PS. As example, I adapted my cat/dog CMakeLists.txt to this to get to

Re: [CMake] copying fortran .mod files in different directories

2020-03-04 Thread Bill Somerville
On 04/03/2020 09:24, Lukas van de Wiel wrote: we are running a Fortran code containing several dozen modules. These are build in two versions, differentiated by #ifdef statements. The archive files of the two versions are being kept apart by different file names, but the .mod files have fixed n

[CMake] copying fortran .mod files in different directories

2020-03-04 Thread Lukas van de Wiel
Dear more experienced cmake user, we are running a Fortran code containing several dozen modules. These are build in two versions, differentiated by #ifdef statements. The archive files of the two versions are being kept apart by different file names, but the .mod files have fixed names, based on