[llvm-commits] [llvm] r59292 - /llvm/trunk/CMakeLists.txt

Oscar Fuentes ofv at wanadoo.es
Thu Nov 13 19:43:19 PST 2008


Author: ofv
Date: Thu Nov 13 21:43:18 2008
New Revision: 59292

URL: http://llvm.org/viewvc/llvm-project?rev=59292&view=rev
Log:
CMake: Disallow in-source builds except when building with the Visual
Studio IDE. CMake would overwrite the makefiles distributed with LLVM.

Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=59292&r1=59291&r2=59292&view=diff

==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Thu Nov 13 21:43:18 2008
@@ -5,6 +5,15 @@
 set(PACKAGE_VERSION svn)
 set(PACKAGE_BUGREPORT "llvmbugs at cs.uiuc.edu")
 
+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 LLVM.
+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()
+
 include(FindPerl)
 
 set(LLVM_MAIN_SRC_DIR ${CMAKE_CURRENT_SOURCE_DIR})





More information about the llvm-commits mailing list