Fix crash when trying to change staticness of a property
[hiphop-php.git] / CMakeLists.txt
blobeee2d88b951504faa4aca02e59e8a6a579f8e6ff
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7 FATAL_ERROR)
2 PROJECT(hphp C CXX ASM)
4 IF(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
5         message(FATAL_ERROR "HHVM requires a 64bit OS")
6 ENDIF()
8 set(HPHP_HOME "$ENV{HPHP_HOME}")
9 if (NOT HPHP_HOME)
10         set(HPHP_HOME "${CMAKE_CURRENT_SOURCE_DIR}")
11 endif()
12 message("Using HPHP_HOME == ${HPHP_HOME}")
14 IF(NOT EXISTS "${HPHP_HOME}/CMake/HPHPSetup.cmake")
15         message(FATAL_ERROR "Invalid HPHP_HOME. Set it to the root of your hhvm tree, or run `cmake .` from there.")
16 ENDIF()
18 SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
20 if (NOT EXISTS "${HPHP_HOME}/third-party/CMakeLists.txt")
21         message(FATAL_ERROR "third-party/CMakeLists.txt missing. Try updating your submodule with:
22 rm -r third-party
23 git submodule update --init --recursive
25 endif()
27 include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/HPHPFunctions.cmake")
28 include(CheckFunctionExists)
30 add_subdirectory(third-party)
31 add_subdirectory(hphp)