Skip to content

Commit 908566e

Browse files
committed
add possibility to build in nested folders
1 parent 7400573 commit 908566e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

configure

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,13 @@ echo ""
106106
# Create build directory
107107
if [ ! -d "./$BUILD_DIR" ]
108108
then
109-
mkdir $BUILD_DIR
109+
mkdir -p "$BUILD_DIR"
110110
fi
111111

112112
# Configure project
113+
PREVIOUS_DIR=$(pwd)
113114
cd $BUILD_DIR
114-
cmake -G "$CMAKE_GENERATOR" "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" $CMAKE_OPTIONS ..
115+
cmake -G "$CMAKE_GENERATOR" "-DCMAKE_BUILD_TYPE=$BUILD_TYPE" $CMAKE_OPTIONS "$PREVIOUS_DIR"
115116
if [ $? == 0 ]
116117
then
117118
echo ""
@@ -123,4 +124,4 @@ else
123124
echo "Configuration failed.";
124125
fi
125126

126-
cd ..
127+
cd "$PREVIOUS_DIR"

0 commit comments

Comments
 (0)