On 21. Dec, 2009, at 20:52 , C. Meissa wrote: > Hello List, > > I’m moving my fortran project to cmake… > > I have a src directory containing 3 dirs: > main > mod1 > mod2 > > The main program in “main” is to be linked against the libs in “mod1” > and “mod2”. > > Additionally “mod2” does need “mod1”, too. (use mod1). > > When compiling gfortran says: > Fatal Error: Can't open module file 'mod1.mod' for reading at (1): File not > found > > This happens even if I statically set the “add_subdirectory()”-statements to > the right order. > Isn’t there a fortran dependency checker? > > I’m using cmake version 2.6-patch 0 from debian lenny. > > Thx a lot in advance > C.M. >
You provide very little information to solve your problem... But I think you need to add a include_directories() call to the place where the .mod file will be created. You can use the variables CMAKE_BINARY_DIR and CMAKE_CURRENT_BINARY_DIR to refer to the top-level binary directory and the current binary directory, respectively. Michael _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
