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!
--

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

Reply via email to