blob: 064fde0afe38fcfb848ce1dd872288a0deebb70e [file] [log] [blame]
Edward O'Callaghand9046352009-08-03 01:08:25 +00001# See docs/CMake.html for instructions about how to build Compiler-RT with CMake.
2
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +00003PROJECT( CompilerRT C )
Edward O'Callaghan880cafc2009-08-03 02:15:06 +00004CMAKE_MINIMUM_REQUIRED( VERSION 2.6 )
Edward O'Callaghand9046352009-08-03 01:08:25 +00005
6set(PACKAGE_NAME compiler-rt)
7set(PACKAGE_VERSION 1.0svn)
8set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
9set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu")
10
Edward O'Callaghan6c307f02009-08-03 05:59:48 +000011SET( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules )
12
Edward O'Callaghan0e4ad9c2009-08-05 01:47:29 +000013# add definitions
14include(DefineCompilerFlags)
15
Edward O'Callaghan6c307f02009-08-03 05:59:48 +000016# Disallow in-source build
17INCLUDE( MacroEnsureOutOfSourceBuild )
18MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
19 "${PROJECT_NAME} requires an out of source build. Please create a separate build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there."
20 )
Edward O'Callaghand9046352009-08-03 01:08:25 +000021
Edward O'Callaghan0e4ad9c2009-08-05 01:47:29 +000022INCLUDE( ConfigureChecks.cmake )
23CONFIGURE_FILE( config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h )
24
Edward O'Callaghand4048aa2009-09-12 16:44:57 +000025INCLUDE_DIRECTORIES(
26 ${CMAKE_CURRENT_BINARY_DIR}
27)
28
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +000029SET( Achitectures
Edward O'Callaghan7b268dc2009-09-14 12:45:07 +000030 i386 x86_64 ppc arm
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +000031 )
32
33SET( Configurations
34 Debug Release Profile
35 )
36
Edward O'Callaghand9046352009-08-03 01:08:25 +000037# BlocksRuntime - some random cruft that got thrown in at the last minute, ignoring for now.
Edward O'Callaghana4688082009-09-12 17:13:35 +000038ADD_SUBDIRECTORY( BlocksRuntime )
Edward O'Callaghand9046352009-08-03 01:08:25 +000039
Edward O'Callaghan0e4ad9c2009-08-05 01:47:29 +000040ADD_SUBDIRECTORY( lib )
41
42# Tests are being ignored for until the very basics are working.
Edward O'Callaghan8bf1e092009-08-09 18:41:02 +000043#INCLUDE( MacroAddCheckTest )
44#ADD_SUBDIRECTORY( test )