* All Tools:

- Change: Using more Bootstrap macros. Simpler way of setting the
        CMAKE_MODULE_PATH.
This commit is contained in:
Jean-Paul Chaput 2010-07-15 14:31:23 +00:00
parent 75df67f391
commit 765ba00f60
1 changed files with 38 additions and 55 deletions

View File

@ -1,58 +1,41 @@
PROJECT(KATABATIC)
OPTION(BUILD_DOC "Build the documentation (doxygen)" OFF) project(KATABATIC)
OPTION(CHECK_DATABASE "Run database in full check mode (very slow)" OFF)
CMAKE_MINIMUM_REQUIRED(VERSION 2.4.0) option(BUILD_DOC "Build the documentation (doxygen)" OFF)
option(CHECK_DATABASE "Run database in full check mode (very slow)" OFF)
cmake_minimum_required(VERSION 2.4.0)
# This macro has to be included in all the tools CMakeLists.txt as it's list(INSERT CMAKE_MODULE_PATH 0 "$ENV{BOOTSTRAP_TOP}/share/cmake/Modules/")
# the sole means of localizing other tools/projects. find_package(Bootstrap REQUIRED)
MACRO(SETUP_PROJECT_PATHS project) setup_project_paths(VLSISAPD)
IF( NOT("$ENV{${project}_TOP}" STREQUAL "") ) setup_project_paths(CORIOLIS)
MESSAGE("-- ${project}_TOP is set to $ENV{${project}_TOP}")
SET(PROJECT_MODULE_PATH "${DESTDIR}$ENV{${project}_TOP}/share/cmake/Modules/") set_cmake_policies()
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}") set_lib_link_mode()
ENDIF( NOT("$ENV{${project}_TOP}" STREQUAL "") ) setup_boost(program_options filesystem python regex)
IF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") ) set(QT_USE_QTXML "true")
MESSAGE("-- ${project}_USER_TOP is set to $ENV{${project}_USER_TOP}") find_package(Qt4 REQUIRED)
SET(PROJECT_MODULE_PATH "${DESTDIR}$ENV{${project}_USER_TOP}/share/cmake/Modules/") find_package(VLSISAPD REQUIRED)
LIST(INSERT CMAKE_MODULE_PATH 0 "${PROJECT_MODULE_PATH}") find_package(HURRICANE REQUIRED)
ENDIF( NOT("$ENV{${project}_USER_TOP}" STREQUAL "") ) find_package(CORIOLIS REQUIRED)
find_package(KNIK REQUIRED)
LIST(REMOVE_DUPLICATES CMAKE_MODULE_PATH) if(BUILD_DOC)
ENDMACRO(SETUP_PROJECT_PATHS project) find_package(Doxygen)
ENDIF(BUILD_DOC)
SETUP_PROJECT_PATHS(BOOTSTRAP)
SETUP_PROJECT_PATHS(VLSISAPD) add_subdirectory(src)
SETUP_PROJECT_PATHS(CORIOLIS) add_subdirectory(cmake_modules)
if(BUILD_DOC AND DOXYGEN_FOUND)
FIND_PACKAGE(Bootstrap REQUIRED) add_subdirectory(doc)
SET_CMAKE_POLICIES() endif(BUILD_DOC AND DOXYGEN_FOUND)
SET_LIB_LINK_MODE()
SETUP_BOOST(program_options filesystem python regex) if(CHECK_DATABASE)
add_definitions(-DCHECK_DATABASE)
IF(BUILD_DOC) message(STATUS "Checking database enabled (very slow).")
FIND_PACKAGE(Doxygen) endif(CHECK_DATABASE)
ENDIF(BUILD_DOC) if(CHECK_DETERMINISM)
SET(QT_USE_QTXML "true") add_definitions(-DCHECK_DETERMINISM)
FIND_PACKAGE(Qt4 REQUIRED) # find and setup Qt4 for this project message(STATUS "Checking determinism enabled.")
FIND_PACKAGE(VLSISAPD REQUIRED) endif(CHECK_DETERMINISM)
FIND_PACKAGE(HURRICANE REQUIRED)
FIND_PACKAGE(CORIOLIS REQUIRED)
FIND_PACKAGE(KNIK REQUIRED)
ADD_SUBDIRECTORY(src)
ADD_SUBDIRECTORY(cmake_modules)
IF(BUILD_DOC AND DOXYGEN_FOUND)
ADD_SUBDIRECTORY(doc)
ENDIF(BUILD_DOC AND DOXYGEN_FOUND)
IF(CHECK_DATABASE)
ADD_DEFINITIONS(-DCHECK_DATABASE)
MESSAGE(STATUS "Checking database enabled (very slow).")
ENDIF(CHECK_DATABASE)
IF(CHECK_DETERMINISM)
ADD_DEFINITIONS(-DCHECK_DETERMINISM)
MESSAGE(STATUS "Checking determinism enabled.")
ENDIF(CHECK_DETERMINISM)