Skip to content

Commit e477c08

Browse files
src/CMakeLists.txt: added file properties for CRTM_K_Matrix_Module.f90 to use -cpp for appropriate preprocessing flag detection when using gfortran
1 parent 329fbaf commit e477c08

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,11 @@ target_link_libraries(${PROJECT_NAME}_static PUBLIC NetCDF::NetCDF_Fortran)
227227
#Fortran module output directory for build and install interfaces
228228
set(MODULE_DIR module/${PROJECT_NAME}/${CMAKE_Fortran_COMPILER_ID}/${CMAKE_Fortran_COMPILER_VERSION})
229229
set_target_properties(${PROJECT_NAME} PROPERTIES Fortran_MODULE_DIRECTORY ${CMAKE_BINARY_DIR}/${MODULE_DIR})
230+
set_source_files_properties(
231+
${CMAKE_CURRENT_SOURCE_DIR}/CRTM_K_Matrix_Module.f90
232+
PROPERTIES COMPILE_FLAGS "-cpp"
233+
)
234+
230235
install(DIRECTORY ${CMAKE_BINARY_DIR}/${MODULE_DIR}/ DESTINATION ${MODULE_DIR})
231236
target_include_directories(${PROJECT_NAME} INTERFACE
232237
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/${MODULE_DIR}>

0 commit comments

Comments
 (0)