mirror of
https://github.com/ttroy50/cmake-examples.git
synced 2025-12-18 20:24:35 +03:00
13 lines
333 B
Bash
Executable File
13 lines
333 B
Bash
Executable File
#!/bin/bash
|
|
# Make sure we have the minimum cmake version
|
|
cmake_version=`cmake --version | grep version | cut -d" " -f3`
|
|
|
|
[[ "$cmake_version" =~ ([3-9][.][5-9.][.][0-9]) ]] || exit 0
|
|
|
|
echo "correct version of cmake"
|
|
mkdir -p build && cd build && cmake .. && make
|
|
if [ $? -ne 0 ]; then
|
|
echo "Error running example"
|
|
exit 1
|
|
fi
|