Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Issue NOAA-EMC/GSI#302. Removal of libsrc from the authoritative repository #329

Merged
merged 1 commit into from
Mar 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
[submodule "fix"]
path = fix
url = gerrit:GSI-fix

[submodule "libsrc"]
path = libsrc
url = gerrit:GSI-libsrc
2 changes: 0 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,6 @@ project(GSI)
# build the WRF I/O libraries
if(DEFINED ENV{WRF_IO_LIB})
set(wrflib "$ENV{WRF_IO_LIB}" CACHE INTERNAL "WRFIO library" )
elseif(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/libsrc/wrflib)
add_subdirectory(libsrc/wrflib)
else()
message("libsrc/wrflib not pulled from git, looking for WRF dependencies locally")
find_package( WRF )
Expand Down
43 changes: 5 additions & 38 deletions cmake/Modules/FindBACIO.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,53 +3,20 @@
# List of include file paths for all required modules for GSI
# CORE_LIBRARIES
# Full list of libraries required to link GSI executable
include(findHelpers)
if(DEFINED ENV{BACIO_VER})
set(BACIO_VER $ENV{BACIO_VER})
STRING(REGEX REPLACE "v" "" BACIO_VER ${BACIO_VER})
endif()
if(NOT BUILD_BACIO )
if(DEFINED ENV{BACIO_LIB4})
set(BACIO_LIBRARY $ENV{BACIO_LIB4} )
else()
find_library( BACIO_LIBRARY
NAMES libbacio.a libbacio_4.a libbacio_v${BACIO_VER}_4.a
HINTS $ENV{COREPATH}/lib /usr/local/jcsda/nwprod_gdas_2014/lib
${COREPATH}/bacio/v${BACIO_VER}
${COREPATH}/bacio/v${BACIO_VER}/intel
${COREPATH}/bacio/v${BACIO_VER}/ips/${COMPILER_VERSION}
PATH_SUFFIXES
lib
${NO_DEFAULT_PATH}
)
message("Found BACIO library ${BACIO_LIBRARY}")
endif()
endif()
if( NOT BACIO_LIBRARY ) # didn't find the library, so build it from source
message("Could not find BACIO library, so building from libsrc")
if( DEFINED ENV{BACIO_SRC} )
set( BACIO_DIR $ENV{BACIO_SRC} CACHE STRING "BACIO Source Directory" )
else()
findSrc( "bacio" BACIO_VER BACIO_DIR )
set(BACIOINC "${CMAKE_BINARY_DIR}/include")
endif()
set( libsuffix "_v${BACIO_VER}${debug_suffix}" )
set( bacio "bacio${libsuffix}")
set( BUILD_BACIO "ON" CACHE INTERNAL "Build Bacio library" )
add_subdirectory(${CMAKE_SOURCE_DIR}/libsrc/bacio)
set( BACIO_LIBRARY ${bacio} )
if( CORE_BUILT )
list( APPEND CORE_BUILT ${BACIO_LIBRARY} )
else()
set( CORE_BUILT ${BACIO_LIBRARY} )
endif()
else( NOT BACIO_LIBRARY )
if( CORE_LIBRARIES )
list( APPEND CORE_LIBRARIES ${BACIO_LIBRARY} )
else()
set( CORE_LIBRARIES ${BACIO_LIBRARY} )
endif()
endif( NOT BACIO_LIBRARY )
if( CORE_LIBRARIES )
list( APPEND CORE_LIBRARIES ${BACIO_LIBRARY} )
else()
set( CORE_LIBRARIES ${BACIO_LIBRARY} )
endif()

set( BACIO_LIBRARY_PATH ${BACIO_LIBRARY} CACHE STRING "BACIO Library Location" )

44 changes: 4 additions & 40 deletions cmake/Modules/FindBUFR.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# List of include file paths for all required modules for GSI
# CORE_LIBRARIES
# Full list of libraries required to link GSI executable
include(findHelpers)
if(DEFINED ENV{BUFR_VER})
set(BUFR_VER $ENV{BUFR_VER})
STRING(REGEX REPLACE "v" "" BUFR_VER ${BUFR_VER})
Expand All @@ -14,47 +13,12 @@ if(NOT BUILD_BUFR )
if(DEFINED ENV{BUFR_LIBd_DA} )
set(BUFR_LIBRARY $ENV{BUFR_LIBd_DA} )
message("BUFR library ${BUFR_LIBRARY} set via Environment variable")
else()
find_library( BUFR_LIBRARY
NAMES libbufr.a libbufr_d_64.a libbufr_i4r8.a libbufr_v${BUFR_VER}_d_64.a
HINTS
$ENV{COREPATH}/lib
/usr/local/jcsda/nwprod_gdas_2014/lib
${COREPATH}/bufr/v${BUFR_VER}
${COREPATH}/bufr/v${BUFR_VER}/intel
${COREPATH}/bufr/v${BUFR_VER}/ips/${COMPILER_VERSION}
PATH_SUFFIXES
lib
${NO_DEFAULT_PATH})
set( bufr "bufr_v${BUFR_VER}")
message("Found BUFR library ${BUFR_LIBRARY}")
endif()
endif()
if( NOT BUFR_LIBRARY ) # didn't find the library, so build it from source
message("Could not find BUFR library, so building from libsrc")
if( NOT DEFINED ENV{BUFR_SRC} )
findSrc( "bufr" BUFR_VER BUFR_DIR )
else()
set( BUFR_DIR "$ENV{BUFR_SRC}/libsrc" CACHE STRING "BUFR Source Location")
endif()
set( libsuffix "_v${BUFR_VER}${debug_suffix}" )
set( BUFR_LIBRARY "${LIBRARY_OUTPUT_PATH}/libbufr${libsuffix}.a" CACHE STRING "BUFR Library" )
set( bufr "bufr${libsuffix}")
set( BUILD_BUFR "ON" CACHE INTERNAL "Build the BUFR library")
add_subdirectory(${CMAKE_SOURCE_DIR}/libsrc/bufr)
set( BUFR_LIBRARY ${bufr} )

if( CORE_BUILT )
list( APPEND CORE_BUILT ${BUFR_LIBRARY} )
else()
set( CORE_BUILT ${BUFR_LIBRARY} )
endif()
else( NOT BUFR_LIBRARY )
if( CORE_LIBRARIES )
list( APPEND CORE_LIBRARIES ${BUFR_LIBRARY} )
else()
set( CORE_LIBRARIES ${BUFR_LIBRARY} )
endif()
if( CORE_LIBRARIES )
list( APPEND CORE_LIBRARIES ${BUFR_LIBRARY} )
else()
set( CORE_LIBRARIES ${BUFR_LIBRARY} )
endif()
set( BUFR_LIBRARY_PATH ${BUFR_LIBRARY} CACHE STRING "BUFR Library Location" )

Loading