summaryrefslogtreecommitdiffstats
path: root/Source/CTest/CMakeLists.txt
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-04-25 19:17:08 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-04-25 19:17:08 (GMT)
commitd5e46fa947faef40f170943b25f2705eebf0bfc2 (patch)
tree1a505c483b9550f7945770e12c29ef94bdc08d7f /Source/CTest/CMakeLists.txt
parent05ce4afb3e777c276759c8cbc21ee0fce8299dab (diff)
downloadCMake-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/CTest/CMakeLists.txt')
-rw-r--r--Source/CTest/CMakeLists.txt36
1 files changed, 21 insertions, 15 deletions
diff --git a/Source/CTest/CMakeLists.txt b/Source/CTest/CMakeLists.txt
index cf7df78..677615d 100644
--- a/Source/CTest/CMakeLists.txt
+++ b/Source/CTest/CMakeLists.txt
@@ -4,30 +4,36 @@ PROJECT(CTEST CXX)
#silence duplicate symbol warnings on AIX
IF(CMAKE_SYSTEM MATCHES "AIX.*")
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
- SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
+ SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -bhalt:5 ")
ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
ENDIF(CMAKE_SYSTEM MATCHES "AIX.*")
SUBDIRS(Curl)
-FIND_LIBRARY(CMAKE_LIBRARY NAMES CMakeLib PATHS
- ${CTEST_BINARY_DIR}/..
- ${CTEST_BINARY_DIR}/../Source
- ${CTEST_BINARY_DIR}/../../Source)
+IF(CMAKE_WITH_CURL)
+ SET(CMAKE_LIBRARY CMakeLib)
+ELSE(CMAKE_WITH_CURL)
+ FIND_LIBRARY(CMAKE_LIBRARY NAMES CMakeLib PATHS
+ ${CTEST_BINARY_DIR}/..
+ ${CTEST_BINARY_DIR}/../Source
+ ${CTEST_BINARY_DIR}/../../Source)
+ENDIF(CMAKE_WITH_CURL)
SET(CTEST_SRCS
- ../ctest.cxx
- ../cmCTest.cxx
- cmCTestSubmit.cxx)
+ ../ctest.cxx
+ ../cmCTest.cxx
+ cmCTestSubmit.cxx)
GET_FILENAME_COMPONENT(CMAKE_DIR ${CMAKE_LIBRARY} PATH)
INCLUDE_DIRECTORIES(${CTEST_SOURCE_DIR}
- ${CTEST_SOURCE_DIR}/..
- ${CTEST_SOURCE_DIR}/Curl
- ${CMAKE_DIR}
- ${CMAKE_DIR}/..)
+ ${CTEST_SOURCE_DIR}/..
+ ${CTEST_SOURCE_DIR}/Curl
+ ${CMAKE_DIR}
+ ${CMAKE_DIR}/..)
-ADD_DEFINITIONS(-DHAVE_CURL)
-ADD_EXECUTABLE(ctest ${CTEST_SRCS})
-TARGET_LINK_LIBRARIES(ctest ${CMAKE_LIBRARY} Curl)
+IF(NOT CMAKE_WITH_CURL)
+ ADD_DEFINITIONS(-DHAVE_CURL)
+ ADD_EXECUTABLE(cmtest ${CTEST_SRCS})
+ TARGET_LINK_LIBRARIES(cmtest ${CMAKE_LIBRARY} Curl)
+ENDIF(NOT CMAKE_WITH_CURL)