Skip to content

Commit

Permalink
Fix fastcgi build break on OS X
Browse files Browse the repository at this point in the history
Summary: Disable fastcgi compilation on OS X due to missing dependencies
for the moment.

Reviewed By: @julk
  • Loading branch information
scannell committed Nov 9, 2013
1 parent a596e67 commit 773a4cd
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 5 deletions.
14 changes: 11 additions & 3 deletions CMake/HPHPSetup.cmake
@@ -1,8 +1,9 @@
include(Options)

if (APPLE)
set(HHVM_ANCHOR_SYMS -Wl,-u,_register_libevent_server,_register_fastcgi_server)
set(HHVM_ANCHOR_SYMS -Wl,-u,_register_libevent_server)
else()
set(ENABLE_FASTCGI 1)
set(HHVM_ANCHOR_SYMS -Wl,-uregister_libevent_server,-uregister_fastcgi_server)
endif()

Expand All @@ -15,11 +16,14 @@ set(HHVM_LINK_LIBRARIES
hphp_zend
hphp_util
hphp_hhbbc
hphp_thrift
hphp_proxygen
vixl neo
${HHVM_ANCHOR_SYMS})

if(ENABLE_FASTCGI)
LIST(APPEND HHVM_LINK_LIBRARIES hphp_thrift)
LIST(APPEND HHVM_LINK_LIBRARIES hphp_proxygen)
endif()

if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release")
endif()
Expand Down Expand Up @@ -108,6 +112,10 @@ if(APPLE)
add_definitions(-DMACOSX_DEPLOYMENT_TARGET=10.6)
endif()

if(ENABLE_FASTCGI)
add_definitions(-DENABLE_FASTCGI=1)
endif ()

# enable the OSS options if we have any
add_definitions(-DHPHP_OSS=1)

Expand Down
6 changes: 4 additions & 2 deletions hphp/CMakeLists.txt
Expand Up @@ -32,8 +32,10 @@ add_subdirectory(third_party/timelib)
add_subdirectory(third_party/lz4)
add_subdirectory(third_party/double-conversion)
add_subdirectory(third_party/folly)
add_subdirectory(third_party/ti)
add_subdirectory(third_party/thrift)
if(ENABLE_FASTCGI)
add_subdirectory(third_party/ti)
add_subdirectory(third_party/thrift)
endif()

add_subdirectory(vixl)
add_subdirectory(neo)
Expand Down
8 changes: 8 additions & 0 deletions hphp/runtime/CMakeLists.txt
Expand Up @@ -25,6 +25,14 @@ foreach (file ${CXX_SOURCES})
endif()
endforeach(file ${CXX_SOURCES})

if(NOT ENABLE_FASTCGI)
foreach (file ${CXX_SOURCES})
if (${file} MATCHES "/fastcgi/")
list(REMOVE_ITEM CXX_SOURCES ${file})
endif()
endforeach(file ${CXX_SOURCES})
endif()

if(NOT HAVE_CUSTOM_LIBEVENT)
# Not working with off-the-shelf libevent
list(REMOVE_ITEM CXX_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/server/server-name-indication.cpp")
Expand Down
5 changes: 5 additions & 0 deletions hphp/test/CMakeLists.txt
Expand Up @@ -16,6 +16,11 @@ endif()

include_directories("${HPHP_HOME}/hphp/third_party")

if (NOT ENABLE_FASTCGI)
list(REMOVE_ITEM CXX_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ext/test_fastcgi.cpp")
list(REMOVE_ITEM CXX_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/ext/test_fastcgi_protocol.cpp")
endif()

add_executable(test ${CXX_SOURCES})
target_link_libraries(test ${HHVM_LINK_LIBRARIES})
embed_systemlib(test "${CMAKE_CURRENT_SOURCE_DIR}/test" ${HPHP_HOME}/hphp/system/systemlib.php)
Expand Down

0 comments on commit 773a4cd

Please sign in to comment.