Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

add extra warnings, also recreate the build directory if

cmake didn't complete.
  • Loading branch information...
commit 5caa0768fb9ee6ea1bd0a874b38c12ca4cbb5c6d 1 parent f76e992
@tienex tienex authored
Showing with 9 additions and 2 deletions.
  1. +7 −0 CMakeLists.txt
  2. +2 −2 Makefile
View
7 CMakeLists.txt
@@ -46,6 +46,13 @@ MACRO(TARGET_LINK_LLVM TARGET)
TARGET_LINK_LIBRARIES(${TARGET} ${LLVM_LDFLAGS} ${LLVM_LIBS_CORE} ${LLVM_LIBS_JIT} ${LLVM_LIBS_JIT_OBJECTS})
ENDMACRO(TARGET_LINK_LLVM)
+#
+# Add extra warnings for gcc/g++.
+#
+IF(CMAKE_COMPILER_IS_GNUCXX)
+ ADD_DEFINITIONS(-W -Wall -Wextra)
+ENDIF()
+
FOREACH(ARCHITECTURE ${GUEST_ARCHITECTURES})
IF(EXISTS ${PROJECT_SOURCE_DIR}/arch/${ARCHITECTURE})
MESSAGE("** Building Guest Architecture: ${ARCHITECTURE}")
View
4 Makefile
@@ -2,8 +2,8 @@ NCPU=`../CMake/GetCPUCount.sh`
all:
@cmake --version &> /dev/null || (echo Please install "cmake" before running "make". ; exit 1)
- @if [ ! -d build ]; \
- then rm -f build; mkdir build; cd build; cmake ..; cd ..; \
+ @if [ ! -d build ] || [ ! -f build/Makefile ]; \
+ then rm -fr build; mkdir build; cd build; cmake ..; cd ..; \
fi
@cd build; make -j${NCPU}
Please sign in to comment.
Something went wrong with that request. Please try again.