Skip to content

Commit

Permalink
Stop caching variables when we find its not the library we're looking…
Browse files Browse the repository at this point in the history
… for
  • Loading branch information
Scott MacVicar committed Feb 21, 2010
1 parent 44211ea commit 3d9c41e
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions CMake/HPHPFindLibs.cmake
Expand Up @@ -42,13 +42,13 @@ set(CMAKE_REQUIRED_LIBRARIES "${LIBEVENT_LIB}")
CHECK_FUNCTION_EXISTS("evhttp_bind_socket_with_fd" HAVE_CUSTOM_LIBEVENT)
if (NOT HAVE_CUSTOM_LIBEVENT)
message(SEND_ERROR "Custom libevent is required with HipHop patches")
unset(HAVE_CUSTOM_LIBEVENT CACHE)
unset(LIBEVENT_INCLUDE_DIR CACHE)
unset(LIBEVENT_LIB CACHE)
unset(LibEvent_FOUND CACHE)
endif ()
set(CMAKE_REQUIRED_LIBRARIES)

# libafdt checks
#find_package(LibAfdt REQUIRED)
#include_directories(${LibAfdt_INCLUDE_DIR})

# GD checks
find_package(GD REQUIRED)

Expand Down Expand Up @@ -76,6 +76,10 @@ set(CMAKE_REQUIRED_LIBRARIES "${CURL_LIBRARIES}")
CHECK_FUNCTION_EXISTS("curl_multi_select" HAVE_CUSTOM_CURL)
if (NOT HAVE_CUSTOM_CURL)
message(SEND_ERROR "Custom libcurl is required with HipHop patches ${HAVE_CUSTOM_CURL}")
unset(HAVE_CUSTOM_CURL CACHE)
unset(CURL_INCLUDE_DIR CACHE)
unset(CURL_LIBRARIES CACHE)
unset(CURL_FOUND CACHE)
endif ()
set(CMAKE_REQUIRED_LIBRARIES)

Expand All @@ -99,6 +103,9 @@ find_package(ICU REQUIRED)
if (ICU_FOUND)
if (ICU_VERSION VERSION_LESS "4.2")
message(SEND_ERROR "ICU is too old, found ${ICU_VERSION} and we need 4.2")
unset(ICU_FOUND CACHE)
unset(ICU_INCLUDE_DIRS CACHE)
unset(ICU_LIBRARIES CACHE)
endif (ICU_VERSION VERSION_LESS "4.2")
include_directories(${ICU_INCLUDE_DIRS})
endif (ICU_FOUND)
Expand Down

1 comment on commit 3d9c41e

@h4ck3rm1k3
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To git@github.com:h4ck3rm1k3/hiphop-php.git
4645028..2c2a798 master -> master
partial patch.

Please sign in to comment.