Skip to content

Commit

Permalink
CMake debugging on MacOS (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
zachasme authored Nov 18, 2024
1 parent 9ff27ec commit c6daef9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
linux:
strategy:
matrix:
config: [Release, Debug]
os: [ubuntu-24.04, ubuntu-22.04]
pg: [17, 16, 15, 14, 13]
config: [Release, Debug]

runs-on: ubuntu-22.04
runs-on: ${{ matrix.os }}

name: linux 🐘${{ matrix.pg }} (${{ matrix.config }})
name: ${{ matrix.os }} 🐘${{ matrix.pg }} (${{ matrix.config }})

steps:
- uses: actions/checkout@v4
Expand Down
12 changes: 8 additions & 4 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,13 @@ jobs:
macos:
strategy:
matrix:
config: [Release, Debug]
os: [macos-13]
pg: [17, 16, 15, 14, 13]
config: [Release, Debug]

runs-on: macos-13
runs-on: ${{ matrix.os }}

name: macos 🐘${{ matrix.pg }} (${{ matrix.config }})
name: ${{ matrix.os }} 🐘${{ matrix.pg }} (${{ matrix.config }})

steps:
- uses: actions/checkout@v4
Expand All @@ -42,7 +43,10 @@ jobs:
if: ${{ matrix.pg >= 15 }}

- name: Generate
run: VERBOSE=true cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }}
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ matrix.config }}
env:
# Fixes missing libintl.h on some runners
CFLAGS: "-I /usr/local/include"

- name: Build
run: cmake --build build --config ${{ matrix.config }}
Expand Down
2 changes: 0 additions & 2 deletions cmake/FindPostgreSQL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@ set(PostgreSQL_LINK_FLAGS "")
if(APPLE)
find_program(PostgreSQL_EXECUTABLE postgres REQUIRED NO_DEFAULT_PATH PATHS ${PostgreSQL_BIN_DIR})
set(PostgreSQL_LINK_FLAGS "-bundle_loader ${PostgreSQL_EXECUTABLE}")
# @TODO: Is it possible to remove this and use a cmake flag instead?
list(APPEND PostgreSQL_INCLUDE_DIRS "/usr/local/include")
endif()

# ----------------------------------------------------------------------------
Expand Down

0 comments on commit c6daef9

Please sign in to comment.