Skip to content

Commit 5036f9f

Browse files
authored
Merge pull request #9 from mccaffers/dev/gitignore
Dev/gitignore
2 parents f4522ac + c602203 commit 5036f9f

8 files changed

Lines changed: 28 additions & 30 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 postgresql # Check and install PostgreSQL (which includes 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

.github/workflows/sonarcloud.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
-derivedDataPath "${RUNNER_TEMP}/Build/DerivedData"
6363
HEADER_SEARCH_PATHS="./external/libpqxx/include/pqxx/internal ./external/libpqxx/include/ ./external/libpqxx/build/include/ ./external/"
6464
LIBRARY_SEARCH_PATHS="./external/libpqxx/src/ ./external/libpqxx/build/src/"
65-
OTHER_LDFLAGS="-L./external/libpqxx/build/src -lpqxx -lpq -L/opt/homebrew/Cellar/pkgconf/2.3.0_1/lib -L/opt/homebrew/Cellar/pkgconf/2.3.0_1/lib/pkgconfig -L/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14 -L/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14/pgxs -L/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14/pkgconfig"
65+
OTHER_LDFLAGS="-L./external/libpqxx/build/src -lpqxx -lpq -L$(brew --prefix pkgconf)/lib -L$(brew --prefix pkgconf)/lib/pkgconfig -L$(brew --prefix postgresql@18)/lib/postgresql -L$(brew --prefix postgresql@18)/lib/postgresql/pgxs -L$(brew --prefix postgresql@18)/lib/postgresql/pkgconfig"
6666
clean build test
6767
| xcpretty -r junit && exit ${PIPESTATUS[0]}
6868
- name: Convert coverage report to sonarqube format

.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

backtesting-engine-cpp.xcodeproj/project.pbxproj

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3785,9 +3785,8 @@
37853785
);
37863786
INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "";
37873787
LIBRARY_SEARCH_PATHS = (
3788-
"\"$(SRCROOT)/external/libpqxx/src\"",
3789-
"$(SRCROOT)/build/external/libpqxx/src",
3790-
"/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14",
3788+
"\"$(SRCROOT)/external/libpqxx/build/src\"",
3789+
"/opt/homebrew/Cellar/postgresql@18/18.3/lib/postgresql",
37913790
);
37923791
OTHER_LDFLAGS = "";
37933792
OTHER_LIBTOOLFLAGS = "";
@@ -3808,9 +3807,8 @@
38083807
);
38093808
INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES = "";
38103809
LIBRARY_SEARCH_PATHS = (
3811-
"\"$(SRCROOT)/external/libpqxx/src\"",
3812-
"$(SRCROOT)/build/external/libpqxx/src",
3813-
"/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14",
3810+
"\"$(SRCROOT)/external/libpqxx/build/src\"",
3811+
"/opt/homebrew/Cellar/postgresql@18/18.3/lib/postgresql",
38143812
);
38153813
OTHER_LDFLAGS = "";
38163814
OTHER_LIBTOOLFLAGS = "";
@@ -3831,9 +3829,8 @@
38313829
"\"$(SRCROOT)/external/",
38323830
);
38333831
LIBRARY_SEARCH_PATHS = (
3834-
"\"$(SRCROOT)/external/libpqxx/src\"",
3835-
"$(PROJECT_DIR)/build/external/libpqxx/src",
3836-
"/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14",
3832+
"\"$(SRCROOT)/external/libpqxx/build/src\"",
3833+
"/opt/homebrew/Cellar/postgresql@18/18.3/lib/postgresql",
38373834
);
38383835
MARKETING_VERSION = 1.0;
38393836
PRODUCT_BUNDLE_IDENTIFIER = com.mccaffers.tests;
@@ -3854,9 +3851,8 @@
38543851
"\"$(SRCROOT)/external/",
38553852
);
38563853
LIBRARY_SEARCH_PATHS = (
3857-
"\"$(SRCROOT)/external/libpqxx/src\"",
3858-
"$(PROJECT_DIR)/build/external/libpqxx/src",
3859-
"/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14",
3854+
"\"$(SRCROOT)/external/libpqxx/build/src\"",
3855+
"/opt/homebrew/Cellar/postgresql@18/18.3/lib/postgresql",
38603856
);
38613857
MARKETING_VERSION = 1.0;
38623858
PRODUCT_BUNDLE_IDENTIFIER = com.mccaffers.tests;

backtesting-engine-cpp.xcodeproj/xcshareddata/xcschemes/source.xcscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
</BuildableProductRunnable>
5959
<CommandLineArguments>
6060
<CommandLineArgument
61-
argument = "100.85.44.114"
61+
argument = "localhost"
6262
isEnabled = "YES">
6363
</CommandLineArgument>
6464
<CommandLineArgument

scripts/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,5 @@ output=$(echo "$json" | base64)
4949

5050
# Step 6: Run the tests for now (/executable) from the root directory
5151
# Passing two arguements, the destination of the QuestDB and the Strategy JSON (in base64)
52-
./"$BUILD_DIR/$EXECUTABLE_NAME" 100.85.44.114 "$output"
52+
./"$BUILD_DIR/$EXECUTABLE_NAME" localhost "$output"
5353

scripts/test.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
xcodebuild \
44
-project backtesting-engine-cpp.xcodeproj \
55
-scheme tests \
6-
HEADER_SEARCH_PATHS="./external/libpqxx/include/pqxx/internal ./external/libpqxx/include/ ./external/libpqxx/build/include/ ./external/" \
7-
LIBRARY_SEARCH_PATHS="./external/libpqxx/src/ ./external/libpqxx/build/src/" \
8-
OTHER_LDFLAGS="-L./external/libpqxx/build/src -lpqxx -lpq -L/opt/homebrew/Cellar/pkgconf/2.3.0_1/lib -L/opt/homebrew/Cellar/pkgconf/2.3.0_1/lib/pkgconfig -L/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14 -L/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14/pgxs -L/opt/homebrew/Cellar/postgresql@14/14.15/lib/postgresql@14/pkgconfig" \
9-
clean build test
6+
clean build test
7+
# HEADER_SEARCH_PATHS="./external/libpqxx/include/pqxx/internal ./external/libpqxx/include/ ./external/libpqxx/build/include/ ./external/" \
8+
# LIBRARY_SEARCH_PATHS="./external/libpqxx/src/ ./external/libpqxx/build/src/" \
9+
# OTHER_LDFLAGS="-L./external/libpqxx/build/src -lpqxx -lpq -L$(brew --prefix pkgconf)/lib -L$(brew --prefix pkgconf)/lib/pkgconfig -L$(brew --prefix postgresql@18)/lib/postgresql -L$(brew --prefix postgresql@18)/lib/postgresql/pgxs -L$(brew --prefix postgresql@18)/lib/postgresql/pkgconfig" \
10+
11+
12+

0 commit comments

Comments
 (0)