| Edward O'Callaghan | d904635 | 2009-08-03 01:08:25 +0000 | [diff] [blame] | 1 | # See docs/CMake.html for instructions about how to build Compiler-RT with CMake. |
| 2 | |
| Edward O'Callaghan | 880cafc | 2009-08-03 02:15:06 +0000 | [diff] [blame] | 3 | PROJECT( CompilerRT ) |
| 4 | CMAKE_MINIMUM_REQUIRED( VERSION 2.6 ) |
| Edward O'Callaghan | d904635 | 2009-08-03 01:08:25 +0000 | [diff] [blame] | 5 | |
| 6 | set(PACKAGE_NAME compiler-rt) |
| 7 | set(PACKAGE_VERSION 1.0svn) |
| 8 | set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") |
| 9 | set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu") |
| 10 | |
| Edward O'Callaghan | 6c307f0 | 2009-08-03 05:59:48 +0000 | [diff] [blame^] | 11 | SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules ) |
| 12 | |
| 13 | # Disallow in-source build |
| 14 | INCLUDE( MacroEnsureOutOfSourceBuild ) |
| 15 | MACRO_ENSURE_OUT_OF_SOURCE_BUILD( |
| 16 | "${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there." |
| 17 | ) |
| Edward O'Callaghan | d904635 | 2009-08-03 01:08:25 +0000 | [diff] [blame] | 18 | |
| 19 | install(DIRECTORY include |
| 20 | DESTINATION . |
| 21 | PATTERN ".svn" EXCLUDE |
| 22 | PATTERN "*.cmake" EXCLUDE |
| 23 | PATTERN "*.in" EXCLUDE |
| 24 | ) |
| 25 | |
| 26 | # BlocksRuntime - some random cruft that got thrown in at the last minute, ignoring for now. |
| 27 | # ADD_SUBDIRECTORY( BlocksRuntime ) |
| 28 | ADD_SUBDIRECTORY( lib ) |
| 29 | # Tests are being ignored for until the very basics are working. |
| 30 | # ADD_SUBDIRECTORY( test ) |
| 31 | |
| Edward O'Callaghan | 6c307f0 | 2009-08-03 05:59:48 +0000 | [diff] [blame^] | 32 | INCLUDE( ConfigureChecks.cmake ) |
| 33 | CONFIGURE_FILE( config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h ) |