FIX: the current version of Perl is 5.8
[cmake.git] / CMakeLists.txt
blobf5b58e4674c656b9746d2c4a258a33844b4d2c45
1 PROJECT(CMake)
3 IF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
4   IF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
5     SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
6   ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 7")
7   IF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
8     SET(CMAKE_SKIP_COMPATIBILITY_TESTS 1)
9   ENDIF(CMAKE_GENERATOR MATCHES "Visual Studio 6")
10   INCLUDE (${CMAKE_ROOT}/Modules/CMakeBackwardCompatibilityCXX.cmake)
11 ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} GREATER 1.4)
13 IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
14   IF(NOT CMAKE_COMPILER_IS_GNUCXX)
15      SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -timplicit_local -no_implicit_include ")
16   ENDIF(NOT CMAKE_COMPILER_IS_GNUCXX)
17 ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
18 SUBDIRS(Source Modules Templates Utilities)
19 ENABLE_TESTING()
21 # Include the standard Dart testing module
22 INCLUDE (${CMake_SOURCE_DIR}/Modules/Dart.cmake)
23 INCLUDE (${CMake_BINARY_DIR}/Bootstrap/Source/InitialConfigureFlags.cmake
24          OPTIONAL)
26 IF(CMAKE_CONFIGURE_INSTALL_PREFIX)
27   SET(CMAKE_INSTALL_PREFIX ${CMAKE_CONFIGURE_INSTALL_PREFIX} )
28 ENDIF(CMAKE_CONFIGURE_INSTALL_PREFIX)
30 # use the ansi CXX compile flag for building cmake
32 IF (CMAKE_ANSI_CXXFLAGS)
33   SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_ANSI_CXXFLAGS}")  
34 ENDIF (CMAKE_ANSI_CXXFLAGS)
36 IF (CMAKE_ANSI_CFLAGS)
37   SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_ANSI_CFLAGS}")  
38 ENDIF (CMAKE_ANSI_CFLAGS)
40 # add some testing dependencies
41 IF(BUILD_TESTING)
42   IF (DART_ROOT)
43     CONFIGURE_FILE(${CMake_SOURCE_DIR}/CMakeLogo.gif ${CMake_BINARY_DIR}/Testing/HTML/TestingResults/Icons/Logo.gif COPYONLY)
44   ENDIF (DART_ROOT)
45 ENDIF(BUILD_TESTING)
47 SET(EXECUTABLE_OUTPUT_PATH ${CMake_BINARY_DIR}/Source CACHE PATH 
48   "Where to put the executables for CMake"
51 INCLUDE_REGULAR_EXPRESSION("^(\\.\\./)?(cm|CMake|form|ctest).*")
53 INSTALL_FILES(/man/man1 "^cmake\\.1$")
55 CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
56                ${CMake_BINARY_DIR}/Tests/.NoDartCoverage)
57 CONFIGURE_FILE(${CMake_SOURCE_DIR}/Tests/.NoDartCoverage
58                ${CMake_BINARY_DIR}/Modules/.NoDartCoverage)