diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 423be68f4..4581e62f9 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -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) diff --git a/Source/CTest/CMakeLists.txt b/Source/CTest/CMakeLists.txt index 677615d4c..e262727ee 100644 --- a/Source/CTest/CMakeLists.txt +++ b/Source/CTest/CMakeLists.txt @@ -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)