Browse Source

Disable CMake in-source build

ObjPtr
Michael Uleysky 9 years ago
parent
commit
60e557a711
  1. 13
      CMakeLists.txt

13
CMakeLists.txt

@ -1,5 +1,18 @@
cmake_minimum_required(VERSION 2.8.5)
# Make sure the user doesn't play dirty with symlinks
get_filename_component(srcdir "${CMAKE_SOURCE_DIR}" REALPATH)
get_filename_component(bindir "${CMAKE_BINARY_DIR}" REALPATH)
# Disallow in-source builds
if(${srcdir} STREQUAL ${bindir})
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' in ${srcdir}."
" Please remove them.")
endif()
project(gmt_makemap CXX)
if(NOT CMAKE_BUILD_TYPE)

Loading…
Cancel
Save