diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-04-25 19:17:08 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2003-04-25 19:17:08 (GMT) |
commit | d5e46fa947faef40f170943b25f2705eebf0bfc2 (patch) | |
tree | 1a505c483b9550f7945770e12c29ef94bdc08d7f /Source/CMakeLists.txt | |
parent | 05ce4afb3e777c276759c8cbc21ee0fce8299dab (diff) | |
download | CMake-d5e46fa947faef40f170943b25f2705eebf0bfc2.zip CMake-d5e46fa947faef40f170943b25f2705eebf0bfc2.tar.gz CMake-d5e46fa947faef40f170943b25f2705eebf0bfc2.tar.bz2 |
ENH: Enable CTest to be build as a part of CMake
Diffstat (limited to 'Source/CMakeLists.txt')
-rw-r--r-- | Source/CMakeLists.txt | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index 9160932..423be68 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -1,4 +1,4 @@ -CMAKE_MINIMUM_REQUIRED(VERSION 1.3) +CMAKE_MINIMUM_REQUIRED(VERSION 1.5) SET(SRCS cmake.cxx @@ -102,7 +102,8 @@ LINK_DIRECTORIES(${CMake_BINARY_DIR}/Source) ADD_EXECUTABLE(cmake cmakemain.cxx) ADD_EXECUTABLE(DumpDocumentation cmDumpDocumentation) -ADD_EXECUTABLE(ctest ctest.cxx cmCTest.cxx) + +SET(CMTEST_SRCS ctest.cxx cmCTest.cxx) IF (UNIX) TARGET_LINK_LIBRARIES(CMakeLib ${CMAKE_DL_LIBS}) @@ -110,7 +111,24 @@ ENDIF (UNIX) TARGET_LINK_LIBRARIES(cmake CMakeLib) TARGET_LINK_LIBRARIES(DumpDocumentation CMakeLib) -TARGET_LINK_LIBRARIES(ctest CMakeLib) + +OPTION(CMAKE_WITH_CURL "Build CMake with Curl support" OFF) +MARK_AS_ADVANCED(CMAKE_WITH_CURL) +IF(CMAKE_WITH_CURL) + SUBDIRS(CTest) + SET(CMTEST_SRCS ${CMTEST_SRCS} CTest/cmCTestSubmit.cxx) + ADD_DEFINITIONS(-DHAVE_CURL) + INCLUDE_DIRECTORIES( + ${CMAKE_SOURCE_DIR}/Source/CTest/Curl + ${CMAKE_SOURCE_DIR}/Source/CTest + ) +ENDIF(CMAKE_WITH_CURL) + +ADD_EXECUTABLE(cmtest ${CMTEST_SRCS}) +TARGET_LINK_LIBRARIES(cmtest CMakeLib) +IF(CMAKE_WITH_CURL) + TARGET_LINK_LIBRARIES(cmtest Curl) +ENDIF(CMAKE_WITH_CURL) IF (UNIX) INCLUDE (${CMake_SOURCE_DIR}/Modules/FindCurses.cmake OPTIONAL) |