Skip to content

Commit

Permalink
just hard code it
Browse files Browse the repository at this point in the history
  • Loading branch information
paleolimbot committed Jun 5, 2024
1 parent 6071543 commit c243729
Showing 1 changed file with 22 additions and 26 deletions.
48 changes: 22 additions & 26 deletions tools/build_absl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,30 +35,26 @@ LDFLAGS=`"${R_HOME}/bin/R" CMD config LDFLAGS`
CMAKE_INSTALL_PREFIX="`pwd`/tools/dist"
CMAKE_PREFIX_PATH="`pwd`/tools/dist/lib/cmake:${CMAKE_PREFIX_PATH}"

build_cmake () {
if [ ! -d "tools/build/$1" ]; then
mkdir -p "tools/build/$1"
fi

cd "tools/build/$1"

${CMAKE} \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_FLAGS_RELEASE="${R_CPPFLAGS} ${R_CXXFLAGS}" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 \
-DCMAKE_CXX_STANDARD=14 \
-DABSL_PROPAGATE_CXX_STD=ON \
"../../vendor/$1" &&
${MAKE} ${MAKEVARS} &&
${CMAKE} --install .

cd ../../..
}
if [ ! -d "tools/build/abseil-cpp" ]; then
mkdir -p "tools/build/abseil-cpp"
fi

build_cmake abseil-cpp
cd "tools/build/abseil-cpp"

${CMAKE} \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DCMAKE_CXX_FLAGS_RELEASE="${R_CPPFLAGS} ${R_CXXFLAGS}" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DCMAKE_INSTALL_PREFIX="${CMAKE_INSTALL_PREFIX}" \
-DCMAKE_PREFIX_PATH="${CMAKE_PREFIX_PATH}" \
-DCMAKE_OSX_DEPLOYMENT_TARGET=11.3 \
-DCMAKE_CXX_STANDARD=14 \
-DABSL_PROPAGATE_CXX_STD=ON \
"../../vendor/abseil-cpp" &&
${MAKE} ${MAKEVARS} &&
${CMAKE} --install .

cd ../../..

0 comments on commit c243729

Please sign in to comment.