Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
AlysonStahl-NOAA committed Jun 5, 2024
1 parent f77f40b commit 347ae03
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,16 @@ if (BUILD_D)
endif()

if (BUILD_4)
add_executable(cnvgrib cnv12.F90 cnv22.F90 gds2gdt.F90 makepdsens.F90
pds2pdtens.F90 putgbexn.F90 cnv21.F90 cnvgrib.F90 gdt2gds.F90
makepds.F90 pds2pdt.F90 setbit.F90)
target_link_libraries(cnvgrib PUBLIC ${PROJECT_NAME}_4)
target_link_libraries(cnvgrib PRIVATE bacio::bacio
${JASPER_LIBRARIES} PNG::PNG ${ZLIB_LIBRARY})

if (BUILD_WITH_W3EMC)
add_executable(cnvgrib cnv12.F90 cnv22.F90 gds2gdt.F90 makepdsens.F90
pds2pdtens.F90 putgbexn.F90 cnv21.F90 cnvgrib.F90 gdt2gds.F90
makepds.F90 pds2pdt.F90 setbit.F90)
target_link_libraries(cnvgrib PUBLIC ${PROJECT_NAME}_4)
target_link_libraries(cnvgrib PRIVATE bacio::bacio w3emc::w3emc_4
${JASPER_LIBRARIES} PNG::PNG ${ZLIB_LIBRARY})
install(TARGETS cnvgrib RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
endif()

add_executable(degrib2 degrib2.F90 prlevel.F90 prvtime.F90)
target_link_libraries(degrib2 PUBLIC ${PROJECT_NAME}_4)
Expand All @@ -57,7 +61,6 @@ if (BUILD_4)
target_link_libraries(tocgrib2super PRIVATE bacio::bacio ${JASPER_LIBRARIES}
PNG::PNG ${ZLIB_LIBRARY})


if(CMAKE_C_COMPILER_ID MATCHES "^(Intel|IntelLLVM)$")
set_target_properties(degrib2 PROPERTIES COMPILE_FLAGS "-convert big_endian -fpp")
set_target_properties(grb2index PROPERTIES COMPILE_FLAGS "-convert big_endian -fpp")
Expand All @@ -66,7 +69,6 @@ if (BUILD_4)
set_target_properties(grb2index PROPERTIES COMPILE_FLAGS "-fconvert=big-endian -cpp")
endif()

install(TARGETS cnvgrib RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS degrib2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS grb2index RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
install(TARGETS tocgrib2 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
Expand Down

0 comments on commit 347ae03

Please sign in to comment.