[CMake] have problem when I precompile *.f90 with -fpp using ifort
Lei Pan
panlei7 at gmail.com
Sat Jul 21 03:18:39 EDT 2012
Hello:
I have two files: main.f90, mod_a.f90.
in mod_a.f90
---------------------------------
MODULE mod_a
...
#ifdef PSV
...
#endif
...
END
---------------------------------
part of my CMakeLists:
--------------------------------------------------------------------------------------------------
add_library(mod mod_a.f90)
add_definitions(-DPSV)
add_executable(main main.f90)
target_link_libraries(main ${NETCDF_FORTRAN_LIB} mod)
set_target_properties(main PROPERTIES COMPILE_FLAGS "-fpp")
-------------------------------------------------------------------------------------------------
make output:
**/**/mod_a.f90(15): warning #5117: Bad # preprocessor line
#ifdef PSV
-^
**/**/mod_a.f90(20): warning #5117: Bad # preprocessor line
#endif
-^
how to write the CMakeLists.txt in the situation?
Thank you!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120721/21d2a872/attachment.htm>
More information about the CMake
mailing list