Skip to content
This repository has been archived by the owner on Sep 15, 2021. It is now read-only.

Commit

Permalink
add extra warnings, also recreate the build directory if
Browse files Browse the repository at this point in the history
cmake didn't complete.
  • Loading branch information
tienex committed Nov 28, 2009
1 parent f76e992 commit 5caa076
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}

Expand Down

0 comments on commit 5caa076

Please sign in to comment.