Skip to content

Commit cc87cf0

Browse files
committed
fixing build script
1 parent c6a399b commit cc87cf0

3 files changed

Lines changed: 10 additions & 11 deletions

File tree

.github/workflows/brew.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ check_and_install() {
1111
}
1212

1313
# Install packages if they don't exist
14-
check_and_install postgresql # Check and install PostgreSQL
14+
check_and_install libpq # Changed from postgresql to libpq
1515
check_and_install pkg-config # Check and install pkg-config

.github/workflows/build.sh

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,13 @@ cd ./external/libpqxx
1111
mkdir -p build
1212
cd ./build
1313

14-
# Generate build system files using CMake
15-
# '..' points to the libpqxx root directory containing CMakeLists.txt
16-
cmake ..
14+
# Expose paths so CMake finds libpq
15+
export PATH="$(brew --prefix libpq)/bin:$PATH"
16+
export PKG_CONFIG_PATH="$(brew --prefix libpq)/lib/pkgconfig:$PKG_CONFIG_PATH"
17+
export PostgreSQL_ROOT="$(brew --prefix libpq)"
1718

18-
# Configure the build with specific C++ compiler flags:
19-
# -std=c++20: Use C++20 standard
20-
# -O3: Enable maximum optimization
21-
# --enable-silent-rules: Reduce build output verbosity
22-
./configure CXXFLAGS="-std=c++20 -O3" --enable-silent-rules
19+
# 1. Generate build files (Passing your CXX flags directly to CMake instead of configure)
20+
cmake .. -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=Release
2321

24-
# Compile libpqxx using generated build files
22+
# 2. Compile libpqxx
2523
make

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,4 +39,5 @@ TestResult
3939
xcuserdata/
4040
xcuserstate/
4141
TestResult.xcresult/
42-
sonarqube-generic-coverage.xml
42+
sonarqube-generic-coverage.xml
43+
external/libpqxx

0 commit comments

Comments
 (0)