mirror of
https://github.com/timescale/timescaledb.git
synced 2025-05-16 18:43:18 +08:00
Moving the build system to CMake allows easy cross-platform compiles, dependency checks, and more. In particular, CMake allows us to easily build on Windows, and Visual Studio now has native CMake support.
17 lines
397 B
Bash
Executable File
17 lines
397 B
Bash
Executable File
#!/bin/bash
|
|
|
|
BUILD_TYPE=${1:-Release}
|
|
BUILD_DIR=${BUILD_DIR:-./build}
|
|
|
|
if [ -d ${BUILD_DIR} ]; then
|
|
echo "Build system already initialized in ${BUILD_DIR}"
|
|
exit
|
|
fi
|
|
|
|
mkdir -p ${BUILD_DIR} && \
|
|
cd ${BUILD_DIR} && \
|
|
cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE}
|
|
|
|
echo "TimescaleDB build system initialized in ${BUILD_DIR}. To compile, do:"
|
|
echo -e "\033[1mcd ${BUILD_DIR} && make\033[0m"
|