Skip to content

Instantly share code, notes, and snippets.

@d
Last active October 26, 2017 22:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d/b2af36025b85bdd4cec4a41d51a2df90 to your computer and use it in GitHub Desktop.
Save d/b2af36025b85bdd4cec4a41d51a2df90 to your computer and use it in GitHub Desktop.
Postgres/Greenplum CMakeLists.txt
cmake_minimum_required(VERSION 3.0)
project(gpdb5 LANGUAGES C CXX)
include_directories(src/include)
include_directories(/usr/local/opt/openssl/include)
file(GLOB_RECURSE HEADERS
src/include/*.h
)
file(GLOB_RECURSE SRC_FILES
src/backend/*.c
src/port/*.c
src/common/*.c
src/backend/*.cpp
src/backend/*.y
)
add_executable(
postgres
${SRC_FILES}
${HEADERS}
)
file(GLOB_RECURSE LIBPQ_SOURCES
src/interfaces/libpq/*.h
src/interfaces/libpq/*.c
)
add_library(
pq
${LIBPQ_SOURCES}
)
target_include_directories(
pq
INTERFACE
src/interfaces/libpq
)
file(GLOB_RECURSE PSQL_FILES
src/bin/psql/*.c
src/bin/psql/*.h
)
add_executable(
psql
${PSQL_FILES}
${HEADERS}
)
target_link_libraries(
psql
pq
)
target_include_directories(
psql
PRIVATE
src/bin/pg_dump
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment