Skip to content

Instantly share code, notes, and snippets.

@skim0119
Forked from tp5uiuc/build_elastica.sh
Created August 29, 2022 22:08
Show Gist options
  • Select an option

  • Save skim0119/65b4bc658b0d35b3a081debcb4e88ad1 to your computer and use it in GitHub Desktop.

Select an option

Save skim0119/65b4bc658b0d35b3a081debcb4e88ad1 to your computer and use it in GitHub Desktop.
Build Elastica on systems
#!/usr/bin/env bash
declare -A compilers
# compilers[gcc]="/home/linuxbrew/.linuxbrew/opt/gcc@8/bin/g++-8"
compilers[gcc10]=g++-10
# compilers[gcc11]=g++-11
# compilers[clang]=clang++-8
declare -A cmake_build_types
# cmake_build_types[debug]="Debug"
cmake_build_types[release]="Release"
# cmake_build_types[relwithdebuginfo]="RelWithDebInfo"
CMAKE="cmake"
for compiler in "${!compilers[@]}"; do
for cmake_build_type in "${!cmake_build_types[@]}"; do
BUILD_PATH="build_${compiler}_${cmake_build_type}"
mkdir -p "${BUILD_PATH}" && cd "$_" || exit
CXX=${compilers[$compiler]}
CMAKE_BUILD_TYPE=${cmake_build_types[$cmake_build_type]}
${CMAKE} .. -DCMAKE_CXX_COMPILER="${CXX}"\
-DELASTICA_BUILD_DOCUMENTATION=OFF\
-DELASTICA_BUILD_TESTS=OFF\
-DELASTICA_BUILD_EXAMPLES=ON\
-DELASTICA_BUILD_BENCHMARKS=OFF\
-DELASTICA_BUILD_PYTHON_BINDINGS=OFF\
-DCMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE}"
cd ..
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment