make (array) of ArrayObject return the contents
[hiphop-php.git] / CMakeLists.txt
blobf9941145b52503ce6e78b03dacbf3a8403d0e63c
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.5 FATAL_ERROR)
2 PROJECT(hphp C CXX ASM)
4 IF("$ENV{HPHP_HOME}" STREQUAL "")
5         message(FATAL_ERROR "You should set the HPHP_HOME environmental")
6 ENDIF()
8 file(TO_CMAKE_PATH "$ENV{HPHP_HOME}" HPHP_HOME)
10 IF(NOT IS_DIRECTORY ${HPHP_HOME})
11         message(FATAL_ERROR "The value of HPHP_HOME does not exist")
12 ENDIF()
14 IF(NOT EXISTS "${HPHP_HOME}/LICENSE.PHP")
15         message(FATAL_ERROR "The value of HPHP_HOME in incorrect")
16 ENDIF()
18 SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
20 include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/HPHPFunctions.cmake")
21 include(CheckFunctionExists)
23 add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/hphp)
25 IF(CMAKE_SIZEOF_VOID_P EQUAL 4)
26         message(FATAL_ERROR "32-bit support is currently unsupported, check back with a later version of HipHop")
27 ENDIF()
29 if ("$ENV{USE_HHVM}" STREQUAL "1")
30         message("Building for HHVM")
31 endif()
32 if ("$ENV{USE_HPHPC}" STREQUAL "1")
33         message(FATAL_ERROR "Building HPHPc is no longer supported")
34 endif()