Skip to content

Commit

Permalink
Fix clang compilation for tests dep 'cppdotenv'
Browse files Browse the repository at this point in the history
  • Loading branch information
JavierJF committed Mar 11, 2024
1 parent f60df66 commit 8a36705
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/tap/tap/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ cpp-dotenv/static/cpp-dotenv/libcpp_dotenv.a:
cd cpp-dotenv/static && tar -zxf ../cpp-dotenv-*.tar.gz
cd cpp-dotenv/static/cpp-dotenv && patch src/dotenv.cpp < ../../dotenv.cpp.patch
cd cpp-dotenv/static/cpp-dotenv && patch include/dotenv.h < ../../dotenv.h.patch
cd cpp-dotenv/static/cpp-dotenv && patch -p0 < ../../nm_clang_fix.patch
cd cpp-dotenv/static/cpp-dotenv && cmake . -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_BUILD_TYPE=Debug
cd cpp-dotenv/static/cpp-dotenv && CC=${CC} CXX=${CXX} ${MAKE}

Expand All @@ -112,6 +113,7 @@ cpp-dotenv/dynamic/cpp-dotenv/libcpp_dotenv.so:
cd cpp-dotenv/dynamic && tar -zxf ../cpp-dotenv-*.tar.gz
cd cpp-dotenv/dynamic/cpp-dotenv && patch src/dotenv.cpp < ../../dotenv.cpp.patch
cd cpp-dotenv/dynamic/cpp-dotenv && patch include/dotenv.h < ../../dotenv.h.patch
cd cpp-dotenv/dynamic/cpp-dotenv && patch -p0 < ../../nm_clang_fix.patch
cd cpp-dotenv/dynamic/cpp-dotenv && cmake . -DBUILD_TESTING=OFF -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_RPATH="../tap:../../tap" -DCMAKE_BUILD_TYPE=Debug
cd cpp-dotenv/dynamic/cpp-dotenv && CC=${CC} CXX=${CXX} ${MAKE}

Expand Down
12 changes: 12 additions & 0 deletions test/tap/tap/cpp-dotenv/nm_clang_fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
diff --git src/dotenv.cpp src/dotenv.cpp
index 89bd3c1..1dcaf5a 100644
--- src/dotenv.cpp
+++ src/dotenv.cpp
@@ -8,7 +8,6 @@


using namespace std;
-using namespace dotenv;


dotenv::dotenv& dotenv::dotenv::load_dotenv(const string& dotenv_path, const bool overwrite, const bool interpolate)

0 comments on commit 8a36705

Please sign in to comment.