Skip to content

Commit

Permalink
Fix problem building hphpi when there is a stale CMakeCache file.
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott MacVicar committed Jul 30, 2010
1 parent e1043d4 commit 1609cd4
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/hphp/CMakeLists.txt
Expand Up @@ -4,16 +4,21 @@ list(APPEND CXX_SOURCES ${files})

add_executable(hphp ${CXX_SOURCES})
find_library(DL_LIBRARY dl)
if (DL_LIBRARY)

IF(DL_LIBRARY)
target_link_libraries(hphp ${DL_LIBRARY})
endif(DL_LIBRARY)
ENDIF()

target_link_libraries(hphp hphp_analysis hphp_runtime_static)

IF(EXISTS "${HPHP_HOME}/src/hphpi/gen/CMakeCache.txt")
file(REMOVE "${HPHP_HOME}/src/hphpi/gen/CMakeCache.txt")
ENDIF()

add_custom_command(TARGET hphp
POST_BUILD
COMMAND hphp ARGS -t cpp -f exe --input-dir . -i hphpi.php -o gen -c hphpi_build.hdf --log=1
COMMAND mv ARGS gen/program hphpi
COMMAND mv ARGS gen/program hphpi
WORKING_DIRECTORY ${HPHP_HOME}/src/hphpi
COMMENT "Building hphpi"
)
Expand Down

0 comments on commit 1609cd4

Please sign in to comment.