Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: spinicist/nanconvert
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.1
Choose a base ref
...
head repository: spinicist/nanconvert
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Jul 19, 2022

  1. Bump build system

    spinicist committed Jul 19, 2022
    Copy the full SHA
    ecc7a67 View commit details
Showing with 20 additions and 11 deletions.
  1. +19 −10 bootstrap.sh
  2. +1 −1 cmake
29 changes: 19 additions & 10 deletions bootstrap.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,25 @@
#!/bin/bash -eu

# This script will bootstrap an initial configure & build.
# On Linux and Mac a toolchain will be used which includes -march=native and
# ASan/UBSan support. Other platforms will use the default toolchain.
USAGE="Usage: $0 [options]
Bootstraps the riesling build system (specifies the toolchain for CMake)
Options:
-f FILE : Use a set of flags for dependency compilation. Currently provided
options are avx2, abi (for pre-C++11 ABI), and native
"

git submodule update --init --recursive

PLATFORM="$( uname -s )"
case "$PLATFORM" in
Linux*) TOOLCHAIN="../cmake/x64-linux-native.toolchain.cmake";;
Darwin*) TOOLCHAIN="../cmake/x64-osx-native.toolchain.cmake";;
*) TOOLCHAIN="../cmake/vcpkg/scripts/buildsystems/vcpkg.cmake";;
esac
FLAGS="base"
while getopts "f:h" opt; do
case $opt in
f) export FLAGS="$OPTARG";;
h) echo "$USAGE"
return;;
esac
done
shift $((OPTIND - 1))

# Use Ninja if available, otherwise CMake default
if [ -x "$( command -v ninja )" ]; then
@@ -24,5 +32,6 @@ mkdir -p build
cd build
cmake -S ../ $GEN \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_TOOLCHAIN_FILE="$TOOLCHAIN"
-DCMAKE_TOOLCHAIN_FILE="cmake/toolchain.cmake" \
-DFLAGS_FILE="${FLAGS}"
cmake --build .