<div>Hello:</div> I have two files: main.f90, mod_a.f90.<div>in mod_a.f90</div><div>---------------------------------</div><div>MODULE mod_a</div><div>...</div><div>#ifdef PSV</div><div>...</div><div>#endif</div><div>...</div>
<div>END</div><div>---------------------------------</div><div>part of my CMakeLists:</div><div>--------------------------------------------------------------------------------------------------</div><div><div>add_library(mod mod_a.f90)</div>
<div>add_definitions(-DPSV)</div><div><br></div><div>add_executable(main main.f90)</div><div>target_link_libraries(main ${NETCDF_FORTRAN_LIB} mod)</div><div>set_target_properties(main PROPERTIES COMPILE_FLAGS "-fpp")</div>
</div><div>-------------------------------------------------------------------------------------------------</div><div><br></div><div>make output:</div><div><div>**/**/mod_a.f90(15): warning #5117: Bad # preprocessor line</div>
<div>#ifdef PSV</div><div>-^</div><div>**/**/mod_a.f90(20): warning #5117: Bad # preprocessor line</div><div>#endif</div><div>-^</div><div><br></div></div><div>how to write the CMakeLists.txt in the situation?</div><div><br>
</div><div>Thank you!</div><div><br></div><div><br></div>