Hello all, I am starting to learn about CMake. So far I have only written very minimal CMakeLists.txt files. I am wondering how hard it would be to make CMake read some configuration options for Fortran 95 from an external file similar to this:
---- myprogram.conf ---- FC = mpif90 F77 = $(FC) FFLAGS = -fbounds-check -I/usr/lib/openmpi/include/ FFLAGS_DOUBLE = -fdefault-real-8 The "end users" are largely the developers. The program is recompiled and rerun regularly and these settings rarely change, so they need to be in some sort of global config file. I was thinking that it might make sense to write a thin shell script wrapper around CMake that basically does this: source $CONF_PATH/myprogram.conf cmake $SOURCE_PATH So then all those settings become environment variables. And then I'd do something inside CMakeLists.txt to make sure that CMake uses the contents of those variables to compile the program. Am I on the right track here? Or am I just badly re-inventing the wheel? If I am on the right track, can someone show me how I would get CMake to use these variables? I have tried to find documentation, but what I've found seems specific to C/C++: http://www.cmake.org/Wiki/CMake_Useful_Variables Thanks for the help. Cheers, Daniel. -- Lord of the rings calendar in your Linux/Unix/Mac terminal: cat /usr/share/calendar/calendar.lotr -- 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