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

Issue #82/replace libpopt in rbcavity #89

Merged
merged 24 commits into from
May 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
fa37265
cxxopts proof of concept with rbcavity
ggutierrez-sunbright Feb 10, 2024
2fe9b19
refactor rbcavity for readability and common code
ggutierrez-sunbright Feb 10, 2024
a7e2f13
decouple main from rbcavity procedure
ggutierrez-sunbright Feb 10, 2024
7691566
lint
ggutierrez-sunbright Feb 10, 2024
b345117
change add option to templated version
ggutierrez-sunbright Feb 10, 2024
a0fff89
move ValidationError to RbtArgParser
ggutierrez-sunbright Feb 10, 2024
9ef274a
lint
ggutierrez-sunbright Feb 10, 2024
40fec17
move common parser logic to libRbt
ggutierrez-sunbright Feb 11, 2024
19571a2
fix compiler warning, remove debug messages
ggutierrez-sunbright Feb 11, 2024
7bd1b68
cosmetic modifications on rbcavity
ggutierrez-sunbright Feb 11, 2024
538c021
inline add function
ggutierrez-sunbright Feb 11, 2024
e94f0dd
lint
ggutierrez-sunbright Feb 11, 2024
416181f
change cxxopts to original fork latest version
ggutierrez-sunbright Feb 13, 2024
e82be83
prepare legacy versions of executables
ggutierrez-sunbright Feb 15, 2024
5d51fae
improve includes
ggutierrez-sunbright Feb 15, 2024
fc2ea36
put back lpopt in general dependencies
ggutierrez-sunbright Feb 15, 2024
2504571
Merge branch 'main' into issue-#82/replace-libpopt-in-rbcavity
ggutierrez-sunbright Apr 16, 2024
05a63ee
remove legacy options
ggutierrez-sunbright Apr 20, 2024
c563c16
remove unnecessary inlines
ggutierrez-sunbright Apr 20, 2024
c9feee1
upgrade gcc version for centos7
ggutierrez-sunbright Apr 27, 2024
09ddcc7
enable devtoolset-11 on centos7
ggutierrez-sunbright Apr 28, 2024
b27c816
simplify argument extraction api
ggutierrez-sunbright May 3, 2024
30e7d51
Merge branch 'main' into issue-#82/replace-libpopt-in-rbcavity
ggutierrez-sunbright May 3, 2024
3a950f7
Merge branch 'issue-#82/replace-libpopt-in-rbcavity' of github.com:CB…
ggutierrez-sunbright May 3, 2024
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
8 changes: 6 additions & 2 deletions .github/docker/Dockerfile.centos-centos7
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
FROM centos:centos7 as base

# Install dependencies
RUN yum install -y popt-devel gcc-c++ make
ENV LEGACY_BUILD=YES
RUN yum install -y centos-release-scl && yum install -y devtoolset-11-gcc devtoolset-11-gcc-c++ devtoolset-11-make devtoolset-11-binutils
RUN yum install -y popt-devel
RUN echo "source /opt/rh/devtoolset-11/enable" >> /etc/profile.d/devtoolset-11.sh
RUN chmod +x /etc/profile.d/devtoolset-11.sh

ENTRYPOINT ["/bin/bash", "-l", "-c"]
28 changes: 12 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,25 +39,15 @@
#
# CXX_EXTRA_FLAGS: extra flags to pass to the compiler. Default: empty
#
# LEGACY_BUILD: set to YES for legacy systems that do not support modern c++ standards (like centos7)
# this will enable the -fpermissive and -Wno-deprecated options too.
# legacy build is deprecated, disabled by default, and will be removed in future
# releases.
#

PREFIX ?= /usr
CONFIG ?= RELEASE
RBT_VERSION ?= v$(shell date +%y.%m-alpha)
CXX ?= g++

LEGACY_BUILD ?= NO
ifeq ($(LEGACY_BUILD),YES)
CXX_STD ?= c++11
CXX_BASE_FLAGS += -Wno-deprecated -fpermissive
else
CXX_BASE_FLAGS += -Wall
CXX_STD ?= c++14
endif
CXX_BASE_FLAGS += -Wall
CXX_STD ?= c++17
EXE_FOLDER = src/exe

CXX_EXTRA_FLAGS ?=
CXX_BASE_FLAGS += -pipe -std=$(CXX_STD) -fPIC
Expand All @@ -68,6 +58,10 @@ CXX_WARNING_FLAGS +=
DEBUG_DEFINES := -D_DEBUG
RELEASE_DEFINES := -D_NDEBUG

ifeq ($(LEGACY_BUILD),YES)
_ := $(error This option has been removed. If you really need it, checkout the rdock-legacy branch and try again.)
endif

ifeq ($(CONFIG),DEBUG)
CXX_CONFIG_FLAGS += $(CXX_DEBUG_CONFIG_FLAGS)
DEFINES += $(DEBUG_DEFINES)
Expand All @@ -79,7 +73,7 @@ endif
DEFINES += -DRBT_VERSION=\"$(RBT_VERSION)\"
CXX_FLAGS := $(CXX_BASE_FLAGS) $(CXX_CONFIG_FLAGS) $(CXX_WARNING_FLAGS) $(CXX_EXTRA_FLAGS) $(DEFINES)
LINK_FLAGS := -shared
LIB_DEPENDENCIES := -lpopt -lm -lstdc++
LIB_DEPENDENCIES += -lm -lpopt
LIBS += $(LIB_DEPENDENCIES) -lRbt
INCLUDE := $(addprefix -I./, $(shell find include/ -type d )) $(addprefix -I./, $(shell find import/ -type d ))
LIBRARY := ./lib
Expand All @@ -101,7 +95,6 @@ $(shell mkdir -p $(objdirs) ./lib ./bin)

bin_names = rbdock rbcavity rbmoegrid rblist rbcalcgrid
bins = $(addprefix bin/, $(bin_names))
bin_sources = $(addprefix src/exe/, $(addsuffix .cxx $(bins)))


.PHONY: \
Expand Down Expand Up @@ -135,6 +128,10 @@ build_bin: build_directories
build_lib: build_directories
$(MAKE) lib

retest: build
$(MAKE) clean_tests
$(MAKE) test

test: build ## run the tests suite
$(MAKE) test_rbcavity test_dock_run

Expand Down Expand Up @@ -163,7 +160,6 @@ veryclean: clean clean_bin clean_lib clean_tests ## equivalent to clean clean_bi
lint: ## format the code using clang-format. Requires clang-format to be installed
@clang-format --style=file -i $(shell find src/ include/ -iname '*.cxx' -o -iname '*.h')


## Internal targets

target_folders:
Expand Down
1 change: 0 additions & 1 deletion import/cxxopts/LICENSE
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Copyright (c) 2014 Jarryd Beck
Copyright (c) 2021 Pavel Artemkin

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
Loading
Loading