prevent in-source builds

This commit is contained in:
Dennis Luxen 2014-07-14 16:21:16 +02:00
parent 2b33fcd92d
commit 3de98f7a9d

View File

@ -1,4 +1,11 @@
cmake_minimum_required(VERSION 2.8)
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE )
message(FATAL_ERROR "In-source builds are not allowed.
Please create a directory and run cmake from there, passing the path to this source directory as the last argument.
This process created the file `CMakeCache.txt' and the directory `CMakeFiles'. Please delete them.")
endif()
project(OSRM)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
include(CheckCXXCompilerFlag)