Skip to content
This repository has been archived by the owner on May 31, 2023. It is now read-only.

Switch to using pcre::regex instead of boost::regex #190

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 2 additions & 19 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ jobs:

packages="$packages wine32"
else
packages="$packages libunwind-dev libdw-dev libgtk-3-dev"
packages="$packages libunwind-dev libdw-dev libpcre2-dev libgtk-3-dev"
fi

if [ "${{ matrix.compiler }}" = clang ]; then
Expand Down Expand Up @@ -204,23 +204,6 @@ jobs:
if: steps.cache-local.outputs.cache-hit != 'true'
run: ./install_wxpdfdoc.sh

- name: Build Boost.Regex
if: matrix.autotools
run: |
# Define flags to avoid warnings in Boost code we don't care about.
boost_cxxflags="-Wno-deprecated-declarations -Wno-register -DBOOST_NO_AUTO_PTR -DBOOST_NO_STD_ALLOCATOR"
if [ "${{ matrix.compiler }}" = clang ]; then
boost_cxxflags="${boost_cxxflags} -Wno-parentheses-equality"
fi

for lib in regex; do
cd /opt/lmi/third_party/src/boost/libs/${lib}/src
echo "Compiling $lib sources"
${CXX-${LMI_COMPILER}} -std=c++17 -fPIC $(echo ${boost_cxxflags}) -I../../.. -c *.cpp
echo "Creating libboost_${lib}.a from" *.o
ar rc /opt/lmi/local/${LMI_COMPILER}_${LMI_TRIPLET}/lib/libboost_${lib}.a *.o
done

- name: Configure lmi
if: matrix.autotools
run: |
Expand Down Expand Up @@ -310,7 +293,7 @@ jobs:
fi

- name: Check concinnity and physical closure
if: matrix.autotools != true
if: matrix.mingw != true && matrix.autotools != true
run: |
# Somehow these files are executable and this triggers complaints
# from check_script.sh, so avoid them by fixing permissions.
Expand Down
19 changes: 15 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -431,12 +431,23 @@ uninstall:

# Custom tools built from source.

TEST_CODING_RULES := $(build_dir)/test_coding_rules$(EXEEXT)
# Always build host (i.e. Linux) version of this tool, as it depends on PCRE
# library only available on POSIX systems and it is preferable to run it on
# the host, rather than the target, system in any case.
#
# Note that this implies that the tool binary doesn't need to use EXEEXT and
# that PERFORM should _not_ be used when running it.
host_triplet := x86_64-pc-linux-gnu
host_exec_prefix := $(prefix)/$(LMI_COMPILER)_$(host_triplet)
host_build_dir := $(host_exec_prefix)/build/$(build_type)
host_localbindir := $(prefix)/local/$(LMI_COMPILER)_$(host_triplet)/bin

TEST_CODING_RULES := $(host_build_dir)/test_coding_rules

.PHONY: custom_tools
custom_tools:
@$(MAKE) test_coding_rules$(EXEEXT)
@$(INSTALL) -c -m 0775 $(TEST_CODING_RULES) $(localbindir)
@$(MAKE) LMI_TRIPLET=$(host_triplet) test_coding_rules
@$(INSTALL) -c -m 0775 $(TEST_CODING_RULES) $(host_localbindir)

################################################################################

Expand Down Expand Up @@ -501,7 +512,7 @@ check_concinnity: source_clean custom_tools
|| $(ECHO) "... in file $$z"; \
done;
@$(ECHO) " Miscellaneous problems:"
@-cd $(prefascicle_dir) && $(PERFORM) $(TEST_CODING_RULES) *
@cd $(prefascicle_dir) && $(TEST_CODING_RULES) *

################################################################################

Expand Down