Remove the need to export HPHP_HOME when building
"Detect" HPHP_HOME as the location of the main CMakeLists.txt file and plumb it through to child scripts from there.
Esse commit está contido em:
+8
-12
@@ -5,18 +5,14 @@ IF(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||
message(FATAL_ERROR "HHVM requires a 64bit OS")
|
||||
ENDIF()
|
||||
|
||||
IF("$ENV{HPHP_HOME}" STREQUAL "")
|
||||
message(FATAL_ERROR "You should set the HPHP_HOME environmental")
|
||||
ENDIF()
|
||||
set(HPHP_HOME "$ENV{HPHP_HOME}")
|
||||
if (NOT HPHP_HOME)
|
||||
set(HPHP_HOME "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
endif()
|
||||
message("Using HPHP_HOME == ${HPHP_HOME}")
|
||||
|
||||
file(TO_CMAKE_PATH "$ENV{HPHP_HOME}" HPHP_HOME)
|
||||
|
||||
IF(NOT IS_DIRECTORY ${HPHP_HOME})
|
||||
message(FATAL_ERROR "The value of HPHP_HOME does not exist")
|
||||
ENDIF()
|
||||
|
||||
IF(NOT EXISTS "${HPHP_HOME}/LICENSE.PHP")
|
||||
message(FATAL_ERROR "The value of HPHP_HOME in incorrect")
|
||||
IF(NOT EXISTS "${HPHP_HOME}/CMake/HPHPSetup.cmake")
|
||||
message(FATAL_ERROR "Invalid HPHP_HOME. Set it to the root of your hhvm tree, or run `cmake .` from there.")
|
||||
ENDIF()
|
||||
|
||||
SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
|
||||
@@ -24,5 +20,5 @@ SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake" ${CMAKE_MODULE_PATH})
|
||||
include("${CMAKE_CURRENT_SOURCE_DIR}/CMake/HPHPFunctions.cmake")
|
||||
include(CheckFunctionExists)
|
||||
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/hphp)
|
||||
add_subdirectory(hphp)
|
||||
|
||||
|
||||
@@ -20,7 +20,6 @@ if [ "x${TRAVIS}" != "x" ]; then
|
||||
fi
|
||||
|
||||
export CMAKE_PREFIX_PATH=`/bin/pwd`/..
|
||||
export HPHP_HOME=`/bin/pwd`
|
||||
|
||||
# install python-software-properties before trying to add a PPA
|
||||
sudo apt-get -y update
|
||||
@@ -124,4 +123,4 @@ cmake .
|
||||
|
||||
echo "-------------------------------------------------------------------------"
|
||||
echo "Done. Now run:"
|
||||
echo " CMAKE_PREFIX_PATH=\`pwd\`/.. HPHP_HOME=\`pwd\` make"
|
||||
echo " CMAKE_PREFIX_PATH=\`pwd\`/.. make"
|
||||
|
||||
@@ -21,7 +21,8 @@ macro(EXT_HHVM_FILE SOURCES HEADERS REL EHHVM_OS EHHVM_ARCH)
|
||||
list(APPEND ${HEADERS} "${f_SRC}.ext_hhvm.h")
|
||||
add_custom_command(OUTPUT "${f_SRC}.ext_hhvm.cpp" "${f_SRC}.ext_hhvm.h"
|
||||
DEPENDS ${f_SRC} gen-ext-hhvm
|
||||
COMMAND "${HPHP_HOME}/hphp/tools/bootstrap/gen-ext-hhvm.sh"
|
||||
COMMAND "HPHP_HOME=${HPHP_HOME}"
|
||||
"${HPHP_HOME}/hphp/tools/bootstrap/gen-ext-hhvm.sh"
|
||||
ARGS ${EHHVM_OS} ${EHHVM_ARCH} ${f_OBJ}
|
||||
"${f_SRC}.ext_hhvm.cpp" "${f_SRC}.ext_hhvm.h"
|
||||
WORKING_DIRECTORY "${HPHP_HOME}/hphp/tools/bootstrap"
|
||||
|
||||
@@ -8,7 +8,9 @@ check_err()
|
||||
fi
|
||||
}
|
||||
|
||||
[ -z "$HPHP_HOME" ] && check_err 1 "HPHP_HOME environment variable not set"
|
||||
if [ -z "$HPHP_HOME" ]; then
|
||||
HPHP_HOME="`dirname $0`/../../"
|
||||
fi
|
||||
|
||||
VERBOSE=1
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ endforeach()
|
||||
add_custom_command(
|
||||
OUTPUT "${HPHP_HOME}/hphp/hphp-repo-schema.h"
|
||||
"${HPHP_HOME}/hphp/hphp-build-info.cpp"
|
||||
COMMAND "hphp/util/generate-buildinfo.sh"
|
||||
COMMAND "HPHP_HOME=${HPHP_HOME}" "hphp/util/generate-buildinfo.sh"
|
||||
DEPENDS ${CXX_SOURCES}
|
||||
WORKING_DIRECTORY ${HPHP_HOME}
|
||||
COMMENT "Generating Repo Schema ID and Compiler ID"
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário