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")
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")
14 IF(NOT EXISTS "${HPHP_HOME}/LICENSE.PHP")
15 message(FATAL_ERROR "The value of HPHP_HOME in incorrect")
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")
29 if ("$ENV{USE_HHVM}" STREQUAL "1")
30 message("Building for HHVM")
32 if ("$ENV{USE_HPHPC}" STREQUAL "1")
33 message(FATAL_ERROR "Building HPHPc is no longer supported")