Skip to content

Commit

Permalink
Review configure setup
Browse files Browse the repository at this point in the history
  • Loading branch information
scheibel committed Oct 30, 2023
1 parent d5516f3 commit d39eb5d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,6 +14,7 @@

# Build dir
build*
*-build*
debug_build
release_build
/bin
Expand Down
14 changes: 10 additions & 4 deletions configure
@@ -1,6 +1,7 @@
#!/bin/bash

# Default options

BUILD_DIR="build"
CMAKE_GENERATOR="Unix Makefiles"
BUILD_TYPE="Release"
Expand Down Expand Up @@ -105,8 +106,12 @@ then
CMAKE_GENERATOR="$CMAKE_GENERATOR_OVERRIDE"
fi

if [ -n "$BUILD_DIR_PREFIX" ]; then
BUILD_DIR="${BUILD_DIR_PREFIX}-${BUILD_DIR}"
fi

# Configure build
echo "Configuring in $BUILD_DIR..."
echo "Configuring in \"$BUILD_DIR\""
echo ""

# Create build directory
Expand All @@ -116,8 +121,10 @@ then
fi

# Configure project

PREVIOUS_DIR=$(pwd)
cd $BUILD_DIR

pushd $BUILD_DIR
echo cmake -G "$CMAKE_GENERATOR" "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" $CMAKE_OPTIONS "$PREVIOUS_DIR"
cmake -G "$CMAKE_GENERATOR" "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" $CMAKE_OPTIONS "$PREVIOUS_DIR"
if [ $? == 0 ]
Expand All @@ -130,5 +137,4 @@ else
echo ""
echo "Configuration failed.";
fi

cd "$PREVIOUS_DIR"
popd

0 comments on commit d39eb5d

Please sign in to comment.