From a8b688c734d6dac677f7c68a2d915f85baf41b2b Mon Sep 17 00:00:00 2001 From: Tony Kelman Date: Sun, 8 Mar 2015 15:33:27 -0700 Subject: Minimal cmake build script move flags for MSVC rename lump.txt to lump.md, add data/*.txt to .gitignore --- utils.cmake | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 utils.cmake (limited to 'utils.cmake') diff --git a/utils.cmake b/utils.cmake new file mode 100644 index 0000000..63fc426 --- /dev/null +++ b/utils.cmake @@ -0,0 +1,20 @@ + +function (disallow_intree_builds) + # Adapted from LLVM's toplevel CMakeLists.txt file + if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE ) + message(FATAL_ERROR " + In-source builds are not allowed. CMake would overwrite the + makefiles distributed with utf8proc. Please create a directory + and run cmake from there. Building in a subdirectory is + fine, e.g.: + + mkdir build + cd build + cmake .. + + This process created the file `CMakeCache.txt' and the + directory `CMakeFiles'. Please delete them. + + ") + endif() +endfunction() -- cgit v1.2.3