Will Dicharry wrote:
It appears that add_definitions() places -DWHATEVER in the compile
command line on all Unix variants. Unfortunately, IBM's Fortran
compiler uses -D as a compile flag for something other than adding a
preprocessor definition. In order to pass a preprocessor definition,
you have to use -WF,-DWHATEVER.
What version of CMake are you using? This should work in 2.6.4 (and
perhaps earlier 2.6.x but I don't remember). There is a platform
configuration variable called "CMAKE_Fortran_DEFINE_FLAG" which is
set to "-WF,-D" for that compiler.
Add this to your project to see how the platform is set:
message("CMAKE_Fortran_DEFINE_FLAG=${CMAKE_Fortran_DEFINE_FLAG}")
message("CMAKE_Fortran_COMPILER_ID=${CMAKE_Fortran_COMPILER_ID}")
-Brad
_______________________________________________
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