summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorEdward O'Callaghan <eocallaghan@auroraux.org>2009-08-03 05:59:48 +0000
committerEdward O'Callaghan <eocallaghan@auroraux.org>2009-08-03 05:59:48 +0000
commit6c307f0ec927c9eb8bfcee8a4b7f7b8e12ef56be (patch)
tree854c1f23f0ba5d2f643a571d082d53cffdceff5c /CMakeLists.txt
parent880cafccfc68095d42cb61de71d1d31db330b705 (diff)
Fix newlinew warning in floatundidf.c , Bulkout CMake system more, complete port to AuroraUX and Solaris.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@77958 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 9 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 49f21a099..791ed6fbd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,14 +8,13 @@ set(PACKAGE_VERSION 1.0svn)
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
set(PACKAGE_BUGREPORT "llvmbugs@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 Compiler-RT.
-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()
+SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules )
+
+# Disallow in-source build
+INCLUDE( MacroEnsureOutOfSourceBuild )
+MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
+ "${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there."
+ )
install(DIRECTORY include
DESTINATION .
@@ -30,3 +29,5 @@ ADD_SUBDIRECTORY( lib )
# Tests are being ignored for until the very basics are working.
# ADD_SUBDIRECTORY( test )
+INCLUDE( ConfigureChecks.cmake )
+CONFIGURE_FILE( config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )