-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetupLinux.sh
More file actions
executable file
·34 lines (30 loc) · 901 Bytes
/
setupLinux.sh
File metadata and controls
executable file
·34 lines (30 loc) · 901 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
# Check if the script is being executed at the same level as CMakeLists.txt
if [ ! -f "CMakeLists.txt" ]; then
echo "Error: This script must be executed in the same directory level as CMakeLists.txt."
exit 1
fi
# Create and configure the build debug and release directory
mkdir -p build/debug
cd build/debug
cmake -DCMAKE_BUILD_TYPE=Debug ../..
cd ../..
mkdir -p build/release
cd build/release
cmake -DCMAKE_BUILD_TYPE=Release ../..
cd ../..
# Check if there is a CMakeLists.txt file inside the test folder
if [ ! -f "test/CMakeLists.txt" ]; then
echo "Error: The test folder must contain a CMakeLists.txt file."
exit 1
fi
# Create and configure the test build debug and release directory
cd test
mkdir -p build/debug
cd build/debug
cmake -DCMAKE_BUILD_TYPE=Debug ../..
cd ../..
mkdir -p build/release
cd build/release
cmake -DCMAKE_BUILD_TYPE=Release ../..
cd ../../..