Skip to content

Commit

Permalink
Use quantlib-config in CI Linux builds
Browse files Browse the repository at this point in the history
  • Loading branch information
lballabio committed Jun 4, 2021
1 parent 48de77a commit 8555910
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/linux-full-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ jobs:
cc: gcc
cxx: g++
configureflags: --enable-thread-safe-observer-pattern
moreflags: -lboost_thread -lboost_system -pthread
container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -171,4 +170,4 @@ jobs:
echo "#include <ql/quantlib.hpp>" > test1.cpp && echo "int main() { return 0; }" >> test1.cpp
echo "#include <ql/quantlib.hpp>" > test2.cpp
make install
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} test1.cpp test2.cpp -lQuantLib ${{ matrix.moreflags }}
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs`
2 changes: 1 addition & 1 deletion .github/workflows/linux-nondefault.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,4 +139,4 @@ jobs:
echo "#include <ql/quantlib.hpp>" > test1.cpp && echo "int main() { return 0; }" >> test1.cpp
echo "#include <ql/quantlib.hpp>" > test2.cpp && echo "namespace QuantLib { ThreadKey sessionId() { return 0; } }" >> test2.cpp
make install
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} test1.cpp test2.cpp -lQuantLib -lboost_thread -lboost_system -pthread
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs`
5 changes: 2 additions & 3 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -154,15 +154,14 @@ jobs:
cc: gcc
cxx: g++
configureflags: --enable-thread-safe-observer-pattern
moreflags: -lboost_thread -lboost_system -pthread
tests: true
- name: "Parallel unit-test runner"
shortname: paralleltests
tag: rolling
cc: gcc
cxx: g++
configureflags: --enable-parallel-unit-test-runner
moreflags: -lboost_thread -lboost_system -pthread -lrt
moreflags: -lrt
container: ghcr.io/lballabio/quantlib-devenv:${{ matrix.tag }}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -195,4 +194,4 @@ jobs:
echo "#include <ql/quantlib.hpp>" > test1.cpp && echo "int main() { return 0; }" >> test1.cpp
echo "#include <ql/quantlib.hpp>" > test2.cpp
make install
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} test1.cpp test2.cpp -lQuantLib ${{ matrix.moreflags }}
${{ matrix.cxx }} -O2 -g0 -Wall -Wno-unknown-pragmas -Werror ${{ matrix.cxxflags }} `quantlib-config --cflags` test1.cpp test2.cpp `quantlib-config --libs` ${{ matrix.moreflags }}
1 change: 1 addition & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ AC_DEFUN([QL_CHECK_BOOST_TEST_THREAD_SIGNALS2_SYSTEM],
else
AC_MSG_RESULT([yes])
AC_SUBST([BOOST_THREAD_LIB],[$boost_thread_lib])
AC_SUBST([PTHREAD_CXXFLAGS],["-pthread"])
AC_SUBST([CXXFLAGS],["${CXXFLAGS} -pthread"])
fi
])
Expand Down
2 changes: 1 addition & 1 deletion quantlib-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ while test $# -gt 0; do
echo @PACKAGE_VERSION@
;;
--cflags)
echo -I@includedir@ @BOOST_INCLUDE@ @OPENMP_CXXFLAGS@
echo -I@includedir@ @BOOST_INCLUDE@ @OPENMP_CXXFLAGS@ @PTHREAD_CXXFLAGS@
;;
--libs)
echo -L@libdir@ @BOOST_LIB@ -lQuantLib @OPENMP_CXXFLAGS@ @BOOST_THREAD_LIB@
Expand Down

0 comments on commit 8555910

Please sign in to comment.