Skip to content
Snippets Groups Projects
Commit c05bb471 authored by Bienchen's avatar Bienchen
Browse files

Update CMakeLists.txt in docu

parent d5da2788
No related branches found
No related tags found
No related merge requests found
......@@ -18,9 +18,9 @@ set(PROMOD3_VERSION_MINOR 1)
set(PROMOD3_VERSION_PATCH 0)
set(PROMOD3_VERSION_STRING ${PROMOD3_VERSION_MAJOR}.${PROMOD3_VERSION_MINOR}.${PROMOD3_VERSION_PATCH})
option(DISABLE_DOCUMENTATION "whether to compile with shader support" OFF)
option(DISABLE_DISABLE_DOCTEST "whether to compile with shader support" OFF)
option(DISABLE_DISABLE_LINKCHECK "whether to compile with shader support" OFF)
option(DISABLE_DOCUMENTATION "Do not build documentation" OFF)
option(DISABLE_DISABLE_DOCTEST "Do not check examples in documentation" OFF)
option(DISABLE_DISABLE_LINKCHECK "Do not check links in the documentation" OFF)
if (CMAKE_COMPILER_IS_GNUCXX)
exec_program(gcc ARGS --version OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION)
......
......@@ -189,7 +189,7 @@ the Internet. Nevertheless, here is a short list of most important advices:
:file:`tests/data`
* If 'exotic' |python| modules are used, consider making the test aware of the
possibility that the module is not available
* Test do not fail on purpose
* Tests do not fail on purpose
* No failing tests, that are considered 'this does not affect anything'
To run the whole test suite, ``make check`` is enough. This will also trigger
......@@ -359,108 +359,130 @@ top level :file:`CMakeLists.txt`:
.. code-block:: cmake
:linenos:
:emphasize-lines: 83
#-------------------------------------------------------------------------------
# Author: Bienchen
#-------------------------------------------------------------------------------
# Options to CMake:
# DISABLE_DOCUMENTATION: Don't build documentation, don't search for Sphinx
# DISABLE_DOCTEST: Don't run example code from documentation on 'make check'
# DISABLE_LINKCHECK: Don't test links from documentation on 'make check'
# (if documentation is disabled, there is no doctest, linkcheck at all)
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake_support)
project(PROMOD3 CXX C)
include(PROMOD3)
set(PROMOD3_VERSION_MAJOR 0)
set(PROMOD3_VERSION_MINOR 1)
set(PROMOD3_VERSION_PATCH 0)
set(PROMOD3_VERSION_STRING ${PROMOD3_VERSION_MAJOR}.${PROMOD3_VERSION_MINOR}.${PROMOD3_VERSION_PATCH})
if (CMAKE_COMPILER_IS_GNUCXX)
exec_program(gcc ARGS --version OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION)
if(CMAKE_C_COMPILER_VERSION MATCHES ".*4\\.[5-9].*")
set(PROMOD_GCC_45 true)
else()
set(PROMOD_GCC_45 false)
endif()
endif()
if (OPTIMIZE)
set(CMAKE_BUILD_TYPE Release)
set(_OPT ON)
else()
set(CMAKE_BUILD_TYPE Debug)
set(_OPT OFF)
endif()
setup_stage()
file(MAKE_DIRECTORY ${STAGE_DIR}
${EXECUTABLE_OUTPUT_PATH}
${HEADER_STAGE_PATH}
${LIB_STAGE_PATH}
${LIBEXEC_STAGE_PATH})
setup_compiler_flags()
setup_boost()
find_package(Python 2.7 REQUIRED)
if(NOT DISABLE_DOCUMENTATION)
find_package(Sphinx ${PYTHON_VERSION} REQUIRED)
set(PYTHON_DOC_URL "https://docs.python.org/${PYTHON_VERSION}")
# set this to the URL corresponding to the version of OST you are using
set(OST_DOC_URL "http://www.openstructure.org/docs/1.3")
endif()
find_package(OPENSTRUCTURE 1.4 REQUIRED
COMPONENTS io mol seq seq_alg mol_alg conop)
find_package(QMEAN 1.0 REQUIRED)
if (CMAKE_COMPILER_IS_GNUCXX)
# do not write back into cache, otherwise the compile command line gets
# expanded with multiple -fno-strict-aliasing flags, triggering a complete
# rebuild whenever cmake is run
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing")
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.6")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
endif("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.6")
endif()
# basic environment
include_directories(${Boost_INCLUDE_DIRS}
${OST_INCLUDE_DIR}
${QMEAN_INCLUDE_DIR})
set(FILES_TO_BE_REMOVED ${PROJECT_BINARY_DIR}/stage)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
"${FILES_TO_BE_REMOVED}")
## sub dirs to be recognised by CMake
## e.g. add_subdirectory(src), subdirs have their own CMakeLists.txt
add_subdirectory(config)
add_subdirectory(core)
add_subdirectory(meld)
add_subdirectory(sidechains)
add_subdirectory(scripts)
add_subdirectory(actions)
add_subdirectory(extras)
if(NOT DISABLE_DOCUMENTATION)
add_changelog_to_doc(FILE "${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG")
add_subdirectory(doc)
endif()
## report setup
message(STATUS "PROMOD3 will be built with the following options:\n"
" OpenStructure (-DOST_ROOT) : ${OST_ROOT}\n"
" QMEAN (-DQMEAN_ROOT) : ${QMEAN_ROOT}\n"
" Optimized (-DOPTIMIZE) : ${_OPT}\n"
" Python : ${PYTHON_BINARY}\n")
:emphasize-lines: 103
#-------------------------------------------------------------------------------
# Author: Bienchen
#-------------------------------------------------------------------------------
# Options to CMake:
# DISABLE_DOCUMENTATION: Don't build documentation, don't search for Sphinx
# DISABLE_DOCTEST: Don't run example code from documentation on 'make check'
# DISABLE_LINKCHECK: Don't test links from documentation on 'make check'
# (if documentation is disabled, there is no doctest, linkcheck at all)
cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake_support)
project(ProMod3 CXX C)
include(PROMOD3)
set(PROMOD3_VERSION_MAJOR 0)
set(PROMOD3_VERSION_MINOR 1)
set(PROMOD3_VERSION_PATCH 0)
set(PROMOD3_VERSION_STRING ${PROMOD3_VERSION_MAJOR}.${PROMOD3_VERSION_MINOR}.${PROMOD3_VERSION_PATCH})
option(DISABLE_DOCUMENTATION "Do not build documentation" OFF)
option(DISABLE_DISABLE_DOCTEST "Do not check examples in documentation" OFF)
option(DISABLE_DISABLE_LINKCHECK "Do not check links in the documentation" OFF)
if (CMAKE_COMPILER_IS_GNUCXX)
exec_program(gcc ARGS --version OUTPUT_VARIABLE CMAKE_C_COMPILER_VERSION)
if(CMAKE_C_COMPILER_VERSION MATCHES ".*4\\.[5-9].*")
set(PROMOD_GCC_45 true)
else()
set(PROMOD_GCC_45 false)
endif()
endif()
if (OPTIMIZE)
set(CMAKE_BUILD_TYPE Release)
set(_OPT ON)
else()
set(CMAKE_BUILD_TYPE Debug)
set(_OPT OFF)
endif()
setup_stage()
file(MAKE_DIRECTORY ${STAGE_DIR}
${EXECUTABLE_OUTPUT_PATH}
${HEADER_STAGE_PATH}
${LIB_STAGE_PATH}
${LIBEXEC_STAGE_PATH})
setup_compiler_flags()
setup_boost()
find_package(Python 2.7 REQUIRED)
if(NOT DISABLE_DOCUMENTATION)
find_package(Sphinx ${PYTHON_VERSION} REQUIRED)
set(PYTHON_DOC_URL "https://docs.python.org/${PYTHON_VERSION}")
# set this to the URL corresponding to the version of OST you are using
set(OST_DOC_URL "http://www.openstructure.org/docs/1.3")
endif()
find_package(OPENSTRUCTURE 1.4 REQUIRED
COMPONENTS io mol seq seq_alg mol_alg conop)
find_package(QMEAN 1.0 REQUIRED)
#The KIC loop closing algorithm requires a solver for a generalized eigen
#problem. Eigen3 would provide such a solver, but only allows to extract
#the resulting eigenvalues and not the eigenvectors.
#As soon as there is an Eigen3 release with the required functionality,
#The Lapack dependency can be dropped.
find_package(LAPACK)
if (CMAKE_COMPILER_IS_GNUCXX)
# do not write back into cache, otherwise the compile command line gets
# expanded with multiple -fno-strict-aliasing flags, triggering a complete
# rebuild whenever cmake is run
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fno-strict-aliasing")
if("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.6")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-attributes")
endif("${CMAKE_CXX_COMPILER_VERSION}" VERSION_GREATER "4.6")
endif()
# additional packages/ headers/ etc.
# Eigen3 is mandatory right now but may vanish once OST switches to the same
# version.
find_package(Eigen3 3.2.1 REQUIRED)
if(NOT EIGEN3_FOUND)
message(FATAL_ERROR "Eigen3 is essential for building ${PROJECT_NAME}.")
endif()
# basic environment
include_directories(${Boost_INCLUDE_DIRS}
${OST_INCLUDE_DIR}
${QMEAN_INCLUDE_DIR}
${EIGEN3_INCLUDE_DIR})
set(FILES_TO_BE_REMOVED ${PROJECT_BINARY_DIR}/stage)
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
"${FILES_TO_BE_REMOVED}")
## sub dirs to be recognised by CMake
## e.g. add_subdirectory(src), subdirs have their own CMakeLists.txt
add_subdirectory(config)
add_subdirectory(core)
add_subdirectory(meld)
add_subdirectory(sidechains)
add_subdirectory(loop)
add_subdirectory(scripts)
add_subdirectory(actions)
add_subdirectory(extras)
if(NOT DISABLE_DOCUMENTATION)
add_changelog_to_doc(FILE "${CMAKE_CURRENT_SOURCE_DIR}/CHANGELOG")
add_subdirectory(doc)
endif()
## report setup
message(STATUS "${PROJECT_NAME} will be built with the following options:\n"
" OpenStructure (-DOST_ROOT) : ${OST_ROOT}\n"
" QMEAN (-DQMEAN_ROOT) : ${QMEAN_ROOT}\n"
" Optimized (-DOPTIMIZE) : ${_OPT}\n"
" Python : ${PYTHON_BINARY}\n"
" Eigen3 : ${EIGEN3_INCLUDE_DIR}\n")
All that needs to be done for |cmake| to recognise your module is adding its
directory as shown in line 83.
directory as shown in line 103.
This was the final step to set up the build system. Running |cmake| at this
point would create the build environment in place. But building software in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment