Skip to content

Commit

Permalink
add build type
Browse files Browse the repository at this point in the history
# Conflicts:
#	cmake_dev.sh
  • Loading branch information
owent committed Nov 25, 2017
1 parent 7899a09 commit af717dc
Show file tree
Hide file tree
Showing 2 changed files with 676 additions and 672 deletions.
10 changes: 7 additions & 3 deletions cmake_dev.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ CMAKE_CLANG_TIDY="";
CMAKE_CLANG_ANALYZER=0;
CMAKE_CLANG_ANALYZER_PATH="";
BUILD_DIR=$(echo "build_$SYS_NAME" | tr '[:upper:]' '[:lower:]');
CMAKE_BUILD_TYPE=Debug;
CPPCHECK_PLATFORM=unix64;

if [ ! -z "$MSYSTEM" ]; then
Expand All @@ -19,7 +20,7 @@ else
CHECK_MSYS="";
fi

while getopts "ac:e:htusp:-" OPTION; do
while getopts "ab:c:e:htusp:-" OPTION; do
case $OPTION in
a)
echo "Ready to check ccc-analyzer and c++-analyzer, please do not use -c to change the compiler when using clang-analyzer.";
Expand Down Expand Up @@ -56,6 +57,9 @@ while getopts "ac:e:htusp:-" OPTION; do
CMAKE_CLANG_ANALYZER=1;
BUILD_DIR="${BUILD_DIR}_analyzer";
;;
b)
CMAKE_BUILD_TYPE="$OPTARG";
;;
c)
CC="$OPTARG";
CXX="${CC/clang/clang++}";
Expand Down Expand Up @@ -132,9 +136,9 @@ elif [ ! -z "$CC" ]; then
fi

if [ "$CHECK_MSYS" == "mingw" ] && [ ! -z "$CC" ] ; then
cmake .. -G "MSYS Makefiles" $CMAKE_OPTIONS "$@";
cmake .. -G "MSYS Makefiles" -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE $CMAKE_OPTIONS "$@";
else
cmake .. $CMAKE_OPTIONS "$@";
cmake .. -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE $CMAKE_OPTIONS "$@";
fi


Expand Down
Loading

0 comments on commit af717dc

Please sign in to comment.