Functions | Variables
ProjectTools.cmake File Reference

Definition of main project tools. More...

#include "/TopologicalSort.cmake"
+ Include dependency graph for ProjectTools.cmake:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

macro basis_add_module (in MODULE)
 Add a project module. More...
 
macro basis_add_module_info (in MODULE_NAME, in F)
 Manually add project module to list of modules. More...
 
macro basis_add_subdirectory (in SUBDIR)
 Add subdirectory or ignore it if it does not exist. More...
 
function basis_buildtree_asserts (in ARGN)
 Ensure certain requirements on build tree. More...
 
function basis_check_if_module_depends_on_package (out result, in module, in package)
 Check if named project module depends on the specified package. More...
 
function basis_check_if_package_is_needed_by_modules (out result, in package, in ARGN)
 Check if any of the named/enabled modules depends on the specified package. More...
 
macro basis_check_or_set_source_paths (in _VAR)
 Auxiliary macro used by basis_project_check_metadata. More...
 
function basis_configure_public_headers ()
 Configure public header files. More...
 
macro basis_configure_root_documentation_files ()
 Configure root documentation files. More...
 
function basis_configure_script_libraries ()
 Add library targets for the public modules in PROJECT_LIBRARY_DIR. More...
 
function basis_find_logo (in OUTPUT_VARIABLE, in SPECIFIED_LOGO, in DEFAULT_NAME)
 Find standard project logo files with standardized PROJECT_${LOGO_TYPE}_LOGO variable names This is an internal function not designed for general use. More...
 
macro basis_find_packages ()
 Find packages this project depends on. More...
 
function basis_get_build_timestamp (in TIMESTAMP)
 Get build time stamp. More...
 
function basis_get_module_info (in MODULE_NAME, in F, in ARGN)
 
macro basis_initialize_settings ()
 Initialize project settings. More...
 
macro basis_install_public_headers ()
 Add installation rules for public header files. More...
 
function basis_installtree_asserts (in ARGN)
 Ensure certain requirements on install tree. More...
 
macro basis_module_enable (in MODULE, in NEEDED_BY)
 
macro basis_name_check (in INPUT_PROJECT_NAME)
 Check if a project name fits the BASIS standards. More...
 
macro basis_project (in ARGN)
 Sets basic project information including the name, version, and dependencies. More...
 
macro basis_project_begin ()
 Marks the begining of a BASIS project. More...
 
macro basis_project_check_metadata ()
 Check meta-data and set defaults. More...
 
macro basis_project_end ()
 Marks the end of a BASIS project. More...
 
macro basis_project_impl ()
 Implementation of root CMakeLists.txt file of BASIS project. More...
 
macro basis_project_initialize ()
 Initialize project, calls CMake's project() command. More...
 
macro basis_project_modules ()
 Initialize project modules. More...
 
macro basis_use_module (in MODULE)
 Use a previously added project module. More...
 

Variables

cmake __BASIS_PROJECTTOOLS_INCLUDED
 
option BUILD_ALL_MODULES = OFF
 
cmake msg
 
cmake PROJECT_MODULES_DISABLED
 
cmake PROJECT_MODULES_ENABLED
 
cmake PROJECT_MODULES_SORTED
 

Detailed Description

Definition of main project tools.

Definition in file ProjectTools.cmake.

Function Documentation

§ basis_add_module()

macro basis_add_module ( in  MODULE)

Add a project module.

Returns
Nothing.

§ basis_add_subdirectory()

macro basis_add_subdirectory ( in  SUBDIR)

Add subdirectory or ignore it if it does not exist.

Returns
Nothing.

§ basis_check_or_set_source_paths()

macro basis_check_or_set_source_paths ( in  _VAR)

Auxiliary macro used by basis_project_check_metadata.

Used by basis_project_check_metadata to check the existence of each project source directory specified in the given list variable and to report an error otherwise. As a side effect, this macro makes all relative paths absolute with respect to PROJECT_SOURCE_DIR or sets the directory variable to the default value (ARGN).

Returns
Nothing.

§ basis_name_check()

macro basis_name_check ( in  INPUT_PROJECT_NAME)

Check if a project name fits the BASIS standards.

Returns
Nothing.

§ basis_project_check_metadata()

macro basis_project_check_metadata ( )

Check meta-data and set defaults.

This command sets PROJECT_IS_SUBPROJECT and PROJECT_IS_SUBMODULE. A project is a (loosely coupled) "subproject" when it uses the SUBPROJECT option of basis_project to define the name of the subproject. It then also must specify the name of the PACKAGE this subproject belongs to. When a project uses the NAME option instead to declare its name, it can be either an independent project or a (tighly coupled) "submodule" of another project. A project is regarded a "submodule" when it is not a subproject but specifies a PACKAGE it belongs to. Otherwise, when a project has only a NAME but no PACKAGE, the PACKAGE name is set equal the project NAME and the project is regarded as neither a subproject nor a submodule. When either a subproject or submodule is built as part of a top-level project (usually the PACKAGE it belongs to), the CMake variable PROJECT_IS_MODULE is furthermore set to TRUE by the basis_add_module and basis_add_subdirectory command, respectively. The boolean PROJECT_IS_SUBPROJECT and PROJECT_IS_SUBMODULE variables are used by the BASIS commands to decide to which "namespace" the targets of a project belong to and what components to install.

See also
basis_project()
basis_slicer_module()
Returns
Nothing.

§ basis_use_module()

macro basis_use_module ( in  MODULE)

Use a previously added project module.

Returns
Nothing.

Variable Documentation

§ __BASIS_PROJECTTOOLS_INCLUDED

cmake __BASIS_PROJECTTOOLS_INCLUDED

Definition at line 17 of file ProjectTools.cmake.