Skip to content

Commit

Permalink
Prepend postgres compiler flags to cmake flags
Browse files Browse the repository at this point in the history
Prepend postgres compiler flags instead of appending to allow
overwriting flags used for compilation with CFLAGS.
  • Loading branch information
svenklemm committed Oct 28, 2024
1 parent 59871c0 commit a1839cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/build-defs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ if(UNIX)
set(CMAKE_C_STANDARD 11)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L${PG_LIBDIR}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -L${PG_LIBDIR}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PG_CFLAGS} ${PG_CPPFLAGS}")
set(CMAKE_C_FLAGS "${PG_CFLAGS} ${PG_CPPFLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
endif()

Expand Down
2 changes: 1 addition & 1 deletion tsl/src/build-defs.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if(UNIX)
set(CMAKE_C_STANDARD 11)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -L${PG_LIBDIR}")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -L${PG_LIBDIR}")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${PG_CFLAGS} ${PG_CPPFLAGS}")
set(CMAKE_C_FLAGS "${PG_CFLAGS} ${PG_CPPFLAGS} ${CMAKE_C_FLAGS}")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g")
endif()

Expand Down

0 comments on commit a1839cc

Please sign in to comment.