ENH: Make Curl code to be built by default

This commit is contained in:
Andy Cedilnik 2003-04-29 17:23:56 -04:00
parent 565200b893
commit b216ced444
2 changed files with 10 additions and 11 deletions

View File

@ -112,9 +112,8 @@ ENDIF (UNIX)
TARGET_LINK_LIBRARIES(cmake CMakeLib)
TARGET_LINK_LIBRARIES(DumpDocumentation CMakeLib)
OPTION(CMAKE_WITH_CURL "Build CMake with Curl support" OFF)
MARK_AS_ADVANCED(CMAKE_WITH_CURL)
IF(CMAKE_WITH_CURL)
SET(CMAKE_BUILD_WITH_CURL 1)
IF(CMAKE_BUILD_WITH_CURL)
SUBDIRS(CTest)
SET(CMTEST_SRCS ${CMTEST_SRCS} CTest/cmCTestSubmit.cxx)
ADD_DEFINITIONS(-DHAVE_CURL)
@ -122,13 +121,13 @@ IF(CMAKE_WITH_CURL)
${CMAKE_SOURCE_DIR}/Source/CTest/Curl
${CMAKE_SOURCE_DIR}/Source/CTest
)
ENDIF(CMAKE_WITH_CURL)
ENDIF(CMAKE_BUILD_WITH_CURL)
ADD_EXECUTABLE(cmtest ${CMTEST_SRCS})
TARGET_LINK_LIBRARIES(cmtest CMakeLib)
IF(CMAKE_WITH_CURL)
IF(CMAKE_BUILD_WITH_CURL)
TARGET_LINK_LIBRARIES(cmtest Curl)
ENDIF(CMAKE_WITH_CURL)
ENDIF(CMAKE_BUILD_WITH_CURL)
IF (UNIX)
INCLUDE (${CMake_SOURCE_DIR}/Modules/FindCurses.cmake OPTIONAL)

View File

@ -10,14 +10,14 @@ ENDIF(CMAKE_SYSTEM MATCHES "AIX.*")
SUBDIRS(Curl)
IF(CMAKE_WITH_CURL)
IF(CMAKE_BUILD_WITH_CURL)
SET(CMAKE_LIBRARY CMakeLib)
ELSE(CMAKE_WITH_CURL)
ELSE(CMAKE_BUILD_WITH_CURL)
FIND_LIBRARY(CMAKE_LIBRARY NAMES CMakeLib PATHS
${CTEST_BINARY_DIR}/..
${CTEST_BINARY_DIR}/../Source
${CTEST_BINARY_DIR}/../../Source)
ENDIF(CMAKE_WITH_CURL)
ENDIF(CMAKE_BUILD_WITH_CURL)
SET(CTEST_SRCS
../ctest.cxx
@ -32,8 +32,8 @@ INCLUDE_DIRECTORIES(${CTEST_SOURCE_DIR}
${CMAKE_DIR}
${CMAKE_DIR}/..)
IF(NOT CMAKE_WITH_CURL)
IF(NOT CMAKE_BUILD_WITH_CURL)
ADD_DEFINITIONS(-DHAVE_CURL)
ADD_EXECUTABLE(cmtest ${CTEST_SRCS})
TARGET_LINK_LIBRARIES(cmtest ${CMAKE_LIBRARY} Curl)
ENDIF(NOT CMAKE_WITH_CURL)
ENDIF(NOT CMAKE_BUILD_WITH_CURL)