Skip to content

Commit 408e6a4

Browse files
authored
Merge pull request #391 from ESCOMP/hotfix/build
add code to set CPRGNU and CPRINTEL ### Description of changes This adds CPRGNU and CPRINTEL CPP flags automatically based on the selected compiler. ### Specific notes Contributors other than yourself, if any: No CDEPS Issues Fixed (include github issue #): N/A Are there dependencies on other component PRs (if so list): No Are changes expected to change answers (bfb, different to roundoff, more substantial): No Any User Interface Changes (namelist or namelist defaults changes): No Testing performed (e.g. aux_cdeps, CESM prealpha, etc): No Hashes used for testing:
2 parents 5f7f239 + 588278e commit 408e6a4

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

share/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,12 @@ add_library(cdeps_share ${GenF90_SRCS}
2525

2626
target_include_directories (cdeps_share PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${ESMF_F90COMPILEPATHS} ${PIO_Fortran_INCLUDE_DIRS})
2727

28+
if(CMAKE_Fortran_COMPILER_ID MATCHES "GNU")
29+
target_compile_definitions(cdeps_share PRIVATE "CPRGNU")
30+
elseif(CMAKE_Fortran_COMPILER_ID MATCHES "Intel")
31+
target_compile_definitions(cdeps_share PRIVATE "CPRINTEL")
32+
endif()
33+
2834
install(TARGETS cdeps_share
2935
LIBRARY DESTINATION lib)
3036
#===== genf90 =====

0 commit comments

Comments
 (0)