1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
PROJECT(DART_TEST)
CMAKE_MINIMUM_REQUIRED(VERSION 1.8)
#
# Output path
#
SET (LIBRARY_OUTPUT_PATH ${DART_TEST_BINARY_DIR}/bin/ CACHE PATH
"Single output directory for building all libraries.")
SET (EXECUTABLE_OUTPUT_PATH ${DART_TEST_BINARY_DIR}/bin/ CACHE PATH
"Single output directory for building all executables.")
#
# Options
#
OPTION(BUILD_SHARED_LIBS "Build with shared libraries." ON)
OPTION(BUILD_TESTING "Build the testing tree." ON)
#
# Subdirs and depends
#
SUBDIRS(Common)
#
# Get platform values used dtConfigure.h.in
#
INCLUDE (${CMAKE_ROOT}/Modules/TestBigEndian.cmake)
TEST_BIG_ENDIAN (DT_WORDS_BIGENDIAN)
INCLUDE (${CMAKE_ROOT}/Modules/CheckIncludeFileCXX.cmake)
CHECK_INCLUDE_FILE_CXX (iostream.h DT_EXISTS_IOSTREAM_H)
CHECK_INCLUDE_FILE_CXX (iostream DT_EXISTS_IOSTREAM)
#
# Common configuration settings
#
CONFIGURE_FILE(
${DART_TEST_SOURCE_DIR}/dtConfigure.h.in
${DART_TEST_BINARY_DIR}/dtConfigure.h
)
INCLUDE_DIRECTORIES(${DART_TEST_BINARY_DIR})
#
# Testing
#
IF(BUILD_TESTING)
INCLUDE (${CMAKE_ROOT}/Modules/Dart.cmake)
ENABLE_TESTING()
IF (EXECUTABLE_OUTPUT_PATH)
SET (CXX_TEST_PATH ${EXECUTABLE_OUTPUT_PATH})
ELSE (EXECUTABLE_OUTPUT_PATH)
SET (CXX_TEST_PATH .)
ENDIF (EXECUTABLE_OUTPUT_PATH)
ENDIF(BUILD_TESTING)
|