Skip to content

Commit

Permalink
Draft
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshInnis committed May 14, 2024
1 parent 6786394 commit 71f5031
Show file tree
Hide file tree
Showing 10 changed files with 18,074 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ enable_testing()

include_directories(${PostgreSQL_INCLUDE_DIRS} ${PostgreSQL_SERVER_INCLUDE_DIRS})

include_directories(".")

find_package(PostgreSQL REQUIRED)

add_postgresql_extension(
Expand All @@ -21,4 +23,10 @@ add_postgresql_extension(
VERSION 0.0.1
SHARED_PRELOAD ON
SOURCES postgraph.c
graphmaster.c
pgraphcomm.c
pgraph_bootstrap.c
pgraph_miscinit.c
postgraph_tcop.c
postgraph_postinit.c
)
8 changes: 8 additions & 0 deletions cmake/FindPostgreSQL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,14 @@ if(NOT DEFINED PG_CONFIG)
string(APPEND extra_configure_args " --enable-debug --enable-cassert")
endif()

if(BUILD_TYPE STREQUAL "RelWithDebInfo")
set(ENV{CFLAGS} "$ENV{CFLAGS} ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
elseif(BUILD_TYPE STREQUAL "Release")
set(ENV{CFLAGS} "$ENV{CFLAGS} ${CMAKE_C_FLAGS_RELEASE}")
else()
set(ENV{CFLAGS} "-ggdb -O0")
endif()

execute_process(
COMMAND bash -c "./configure ${extra_configure_args} --prefix \"${PGDIR_VERSION}/build\" --without-icu --with-ssl=openssl"
WORKING_DIRECTORY "${PGDIR_VERSION}/postgresql-${PGVER_ALIAS}"
Expand Down
Loading

0 comments on commit 71f5031

Please sign in to comment.