Skip to content

Commit

Permalink
Merge pull request #427 from HDFGroup/chogan/glpk_docker
Browse files Browse the repository at this point in the history
Fix docker builds and make gflags optional
  • Loading branch information
ChristopherHogan committed Jun 15, 2022
2 parents 7fc529c + 3dec9ac commit 0ffc464
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ option(HERMES_ENABLE_MPIIO_ADAPTER "Build the Hermes MPI-IO adapter." ON)
option(HERMES_ENABLE_PUBSUB_ADAPTER "Build the Hermes pub/sub adapter." ON)
option(HERMES_ENABLE_VFD "Build the Hermes HDF5 Virtual File Driver" OFF)
option(HERMES_ENABLE_WRAPPER "Enable hermes C API wrapper." ON)
option(HERMES_ENABLE_GFLAGS "Enable GFLAGS support." ON)
option(HERMES_INSTALL_TESTS "Enable installation of tests." OFF)
# Calculate code coverage with debug mode
if(HERMES_ENABLE_COVERAGE)
Expand Down Expand Up @@ -279,12 +280,14 @@ find_path(GLOG_INCLUDE_DIRS NAME glog PATH_SUFFIXES include/)
include_directories(${GLOG_INCLUDE_DIRS})

# GFLAGS
find_package(gflags REQUIRED)
if(gflags_FOUND)
message(STATUS "found GFLAGS at ${gflags_DIR}")
if(HERMES_ENABLE_GFLAGS)
find_package(gflags REQUIRED)
if(gflags_FOUND)
message(STATUS "found GFLAGS at ${gflags_DIR}")
find_path(GFLAG_INCLUDE_DIRS NAME gflags PATH_SUFFIXES include/)
include_directories(${GFLAG_INCLUDE_DIRS})
endif()
endif()
find_path(GFLAG_INCLUDE_DIRS NAME gflags PATH_SUFFIXES include/)
include_directories(${GFLAG_INCLUDE_DIRS})

# GOTCHA
if(HERMES_INTERCEPT_IO)
Expand Down
7 changes: 4 additions & 3 deletions ci/hermes/packages/hermes/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ class Hermes(CMakePackage):
variant('vfd', default=False, description='Enable HDF5 VFD')
depends_on('mochi-thallium~cereal@0.8.3')
depends_on('catch2@2.13.3')
depends_on('gortools@7.7')
depends_on('glpk@4:')
depends_on('mpich@3.3.2:')
depends_on('hdf5@1.13.0:', when='+vfd')
depends_on('glog@0.4:')
depends_on('hdf5@1.13.0:', when='+vfd')

def cmake_args(self):
args = ['-DCMAKE_INSTALL_PREFIX={}'.format(self.prefix),
'-DHERMES_RPC_THALLIUM=ON',
'-DHERMES_INSTALL_TESTS=ON',
'-DBUILD_TESTING=ON']
if '+vfd' in self.spec:
args.append(self.define('HERMES_ENABLE_VFD', 'ON'))
args.append(self.define('HERMES_ENABLE_VFD', 'ON'))
return args

def set_include(self, env, path):
Expand Down

0 comments on commit 0ffc464

Please sign in to comment.