Skip to content

Commit

Permalink
Use spaces in CMake files and pass Release explicitly when building f…
Browse files Browse the repository at this point in the history
…rom Dockerfile (#44)

* Use only spaces (never tabs) in CMake files

* Dockerfile: Set CMAKE_BUILD_TYPE as Release explicitly
  • Loading branch information
felipecrv authored Jul 12, 2024
1 parent 02d7de9 commit 9e08958
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 39 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ COPY --chown=app_user:app_user ./third_party ./third_party
COPY --chown=app_user:app_user ./src ./src

# Run the CMake build (then cleanup)
RUN cmake -S . -B build -G Ninja -DCMAKE_INSTALL_PREFIX=/usr/local && \
RUN cmake -S . -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/local && \
cmake --build build --target install && \
rm -rf build src third_party CMakeLists.txt

Expand Down
48 changes: 24 additions & 24 deletions third_party/Arrow_CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ set(CMAKE_CXX_STANDARD 17)
include(ExternalProject)

ExternalProject_Add(
arrow_project
PREFIX ${CMAKE_BINARY_DIR}/third_party
GIT_REPOSITORY https://github.com/apache/arrow.git
GIT_TAG apache-arrow-16.1.0
SOURCE_SUBDIR cpp
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/arrow
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_INSTALL_INCLUDEDIR=include
-DCMAKE_BUILD_TYPE=Release
-DARROW_BUILD_TESTS=OFF
-DARROW_BUILD_STATIC=ON
-DARROW_BUILD_SHARED=OFF
-DARROW_COMPUTE=ON
-DARROW_CSV=ON
-DARROW_JSON=ON
-DARROW_DATASET=ON
-DARROW_FILESYSTEM=ON
-DARROW_FLIGHT=ON
-DARROW_FLIGHT_SQL=ON
-DARROW_WITH_ZLIB=ON
-DARROW_DEPENDENCY_SOURCE=BUNDLED
-DARROW_DEPENDENCY_USE_SHARED=OFF
-Dxsimd_SOURCE=BUNDLED
arrow_project
PREFIX ${CMAKE_BINARY_DIR}/third_party
GIT_REPOSITORY https://github.com/apache/arrow.git
GIT_TAG apache-arrow-16.1.0
SOURCE_SUBDIR cpp
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/arrow
-DCMAKE_INSTALL_LIBDIR=lib
-DCMAKE_INSTALL_INCLUDEDIR=include
-DCMAKE_BUILD_TYPE=Release
-DARROW_BUILD_TESTS=OFF
-DARROW_BUILD_STATIC=ON
-DARROW_BUILD_SHARED=OFF
-DARROW_COMPUTE=ON
-DARROW_CSV=ON
-DARROW_JSON=ON
-DARROW_DATASET=ON
-DARROW_FILESYSTEM=ON
-DARROW_FLIGHT=ON
-DARROW_FLIGHT_SQL=ON
-DARROW_WITH_ZLIB=ON
-DARROW_DEPENDENCY_SOURCE=BUNDLED
-DARROW_DEPENDENCY_USE_SHARED=OFF
-Dxsimd_SOURCE=BUNDLED
)
12 changes: 6 additions & 6 deletions third_party/DuckDB_CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ set(CMAKE_CXX_STANDARD 17)
include(ExternalProject)

ExternalProject_Add(
duckdb_project
PREFIX ${CMAKE_BINARY_DIR}/third_party
GIT_REPOSITORY https://github.com/duckdb/duckdb
GIT_TAG v1.0.0
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/duckdb
duckdb_project
PREFIX ${CMAKE_BINARY_DIR}/third_party
GIT_REPOSITORY https://github.com/duckdb/duckdb
GIT_TAG v1.0.0
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/duckdb
)
16 changes: 8 additions & 8 deletions third_party/JWTCPP_CMakeLists.txt.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ set(CMAKE_CXX_STANDARD 17)
include(ExternalProject)

ExternalProject_Add(
jwt_cpp_project
PREFIX ${CMAKE_BINARY_DIR}/third_party
GIT_REPOSITORY https://github.com/Thalhammer/jwt-cpp.git
GIT_TAG v0.7.0
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/jwt-cpp
-DJWT_BUILD_EXAMPLES=OFF
BUILD_COMMAND "" # This is a header only library
jwt_cpp_project
PREFIX ${CMAKE_BINARY_DIR}/third_party
GIT_REPOSITORY https://github.com/Thalhammer/jwt-cpp.git
GIT_TAG v0.7.0
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/third_party/jwt-cpp
-DJWT_BUILD_EXAMPLES=OFF
BUILD_COMMAND "" # This is a header only library
)

0 comments on commit 9e08958

Please sign in to comment.