File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
1515check_and_install pkg-config # Check and install pkg-config
Original file line number Diff line number Diff line change @@ -11,15 +11,13 @@ cd ./external/libpqxx
1111mkdir -p build
1212cd ./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
2523make
Original file line number Diff line number Diff line change @@ -39,4 +39,5 @@ TestResult
3939xcuserdata /
4040xcuserstate /
4141TestResult.xcresult /
42- sonarqube-generic-coverage.xml
42+ sonarqube-generic-coverage.xml
43+ external /libpqxx
You can’t perform that action at this time.
0 commit comments