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

turned on AEC option in CI #110

Closed
wants to merge 7 commits into from
Closed
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
13 changes: 12 additions & 1 deletion .github/workflows/Linux_options.yml
Original file line number Diff line number Diff line change
@@ -30,16 +30,27 @@ jobs:
- {
options: "-DUSE_IPOLATES=1"
}
- {
options: "-DUSE_AEC=ON"
}

steps:

- name: install
run: |
sudo apt-get update
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config
sudo apt-get install libpng-dev autotools-dev autoconf
sudo apt-get install libpng-dev autotools-dev autoconf libaec-dev

- name: cache-jasper
id: cache-jasper
uses: actions/cache@v3
with:
path: ~/jasper
key: jasper-${{ runner.os }}-1.900.1

- name: checkout-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: jasper-software/jasper
8 changes: 8 additions & 0 deletions .github/workflows/developer.yml
Original file line number Diff line number Diff line change
@@ -30,7 +30,15 @@ jobs:
sudo apt-get install libnetcdf-dev libnetcdff-dev netcdf-bin pkg-config
sudo apt-get install libpng-dev autotools-dev autoconf gcovr

- name: cache-jasper
id: cache-jasper
uses: actions/cache@v3
with:
path: ~/jasper
key: jasper-${{ runner.os }}-1.900.1

- name: checkout-jasper
if: steps.cache-jasper.outputs.cache-hit != 'true'
uses: actions/checkout@v4
with:
repository: jasper-software/jasper
9 changes: 7 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -127,8 +127,13 @@ if(USE_PNG)
find_package(PNG REQUIRED)
endif()

# write config.h. This is used internally by wgrib2 code and is not
# installed.
# Find required packages to use AEC.
message(STATUS "Checking of the user wants to use AEC...")
if(USE_AEC)
find_package(libaec 1.0.6 REQUIRED)
endif()

# write config.h
message(STATUS "Writing config.h...")
FILE(WRITE "wgrib2/config.h" "/* config.h generated by cmake */\n")
FILE(APPEND "wgrib2/config.h" "#ifndef _CONFIG_H\n")
31 changes: 31 additions & 0 deletions cmake/Findlibaec.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Find libaec
#
# LIBAEC_FOUND - if false, do not try to use libaec
# LIBAEC_INCLUDE_DIRS - the libaec include directories
# LIBAEC_LIBRARIES - the libraries to link against to use libaec
#
# This file is part of NCEPLIBS-g2c. Distributed under the LGPL v3.0.

find_package(PkgConfig QUIET)
pkg_check_modules(LIBAEC_PKGCONF QUIET libaec aec)
set(LIBAEC_VERSION ${LIBAEC_PKGCONF_VERSION})

find_path(LIBAEC_INCLUDE_DIRS
NAMES libaec.h
HINTS ${LIBAEC_PKGCONF_INCLUDEDIR} ${LIBAEC_PKGCONF_INCLUDE_DIRS}
)

find_library(LIBAEC_LIBRARIES
NAMES libaec aec
HINTS ${LIBAEC_PKGCONF_LIBDIR} ${LIBAEC_PKGCONF_LIBRARY_DIRS}
)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(libaec
FOUND_VAR LIBAEC_FOUND
REQUIRED_VARS LIBAEC_LIBRARIES LIBAEC_INCLUDE_DIRS
VERSION_VAR LIBAEC_VERSION
)

mark_as_advanced(LIBAEC_INCLUDE_DIRS LIBAEC_LIBRARIES)