diff --git a/build.sh b/build.sh index 78e62986e..6945a2468 100755 --- a/build.sh +++ b/build.sh @@ -12,6 +12,7 @@ jobs=$(nproc) ######### # VARs and Links ######## +CMAKE_EXTRA_FLAGS="" SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) SVFHOME="${SCRIPT_DIR}" sysOS=$(uname -s) @@ -222,10 +223,11 @@ BUILD_DIR="./${BUILD_TYPE}-build" rm -rf "${BUILD_DIR}" mkdir "${BUILD_DIR}" +[ "${BUILD_WITH_CLANG}" != "" ] && CMAKE_EXTRA_FLAGS="-DCMAKE_CXX_COMPILER=$LLVM_DIR/bin/clang++ -DLLVM_DIR=$LLVM_DIR" cmake -D CMAKE_BUILD_TYPE:STRING="${BUILD_TYPE}" \ -DSVF_ENABLE_ASSERTIONS:BOOL=true \ -DSVF_SANITIZE="${SVF_SANITIZER}" \ - -S "${SVFHOME}" -B "${BUILD_DIR}" + -S "${SVFHOME}" -B "${BUILD_DIR}" ${CMAKE_EXTRA_FLAGS} cmake --build "${BUILD_DIR}" -j ${jobs} ########