BasisTools.cmake
Go to the documentation of this file.
1 # ============================================================================
2 # Copyright (c) 2011-2012 University of Pennsylvania
3 # Copyright (c) 2013-2016 Andreas Schuh
4 # All rights reserved.
5 #
6 # See COPYING file for license information or visit
7 # https://cmake-basis.github.io/download.html#license
8 # ============================================================================
9 
10 ##############################################################################
11 # @file BasisTools.cmake
12 # @brief Definition of functions and macros used by BASIS project.
13 #
14 # This is the main module that is included by BASIS projects. Most of the other
15 # BASIS CMake modules are included by this main module and hence do not need
16 # to be included separately. In particular, all CMake modules which are part
17 # of BASIS and whose name does not include the prefix "Basis" are not
18 # supposed to be included directly by a project that makes use of BASIS.
19 # Only the modules with the prefix "Basis" should be included directly.
20 #
21 # @ingroup CMakeAPI
22 ##############################################################################
23 
24 # ----------------------------------------------------------------------------
25 # include guard
27  return ()
28 else ()
29  set (__BASIS_TOOLS_INCLUDED TRUE)
30 endif ()
31 
32 # ----------------------------------------------------------------------------
33 # externally developed modules
34 
35 # ExternalData.cmake module - yet only part of ITK, not CMake
36 include ("${CMAKE_CURRENT_LIST_DIR}/ExternalData.cmake")
37 
38 # the module for the topological sort of modules according to their
39 # inter-dependencies was copied from the ITK v4 project
40 include ("${CMAKE_CURRENT_LIST_DIR}/TopologicalSort.cmake")
41 
42 # ----------------------------------------------------------------------------
43 # BASIS modules
44 include ("${CMAKE_CURRENT_LIST_DIR}/CommonTools.cmake")
45 include ("${CMAKE_CURRENT_LIST_DIR}/DocTools.cmake")
46 include ("${CMAKE_CURRENT_LIST_DIR}/InterpTools.cmake")
47 include ("${CMAKE_CURRENT_LIST_DIR}/InstallationTools.cmake")
48 include ("${CMAKE_CURRENT_LIST_DIR}/MatlabTools.cmake")
49 include ("${CMAKE_CURRENT_LIST_DIR}/ProjectTools.cmake")
50 include ("${CMAKE_CURRENT_LIST_DIR}/RevisionTools.cmake")
51 include ("${CMAKE_CURRENT_LIST_DIR}/SlicerTools.cmake")
52 include ("${CMAKE_CURRENT_LIST_DIR}/TargetTools.cmake")
53 include ("${CMAKE_CURRENT_LIST_DIR}/ExportTools.cmake")
54 include ("${CMAKE_CURRENT_LIST_DIR}/UtilitiesTools.cmake")
55 
56 # Issues/limitations of CMake's "function" command complicate the definition
57 # of a custom set_target_properties function which can be used to collect
58 # "global" information about targets imported from the CMake package
59 # configuration of project dependencies. The workaround in the custom
60 # set_target_properties function defined in the ImportTools.cmake is
61 # extremely inefficient and slows down the configuration step a lot
62 # (cf. https://github.com/cmake-basis/BASIS/issues/494).
63 #
64 # The only need for collecting this information for all (executable)
65 # targets imported from dependencies is for generating the executable
66 # target info table for the BASIS Utilities (cf. UtilitiesTools.cmake).
67 # Hence, when these are not used, the ImportTools.cmake are not needed.
68 # Further, when a project does not consist of modules, the imported
69 # targets are available in the scope of the project.
70 #
71 # A project has to set BASIS_IMPORT_TARGETS to TRUE in its root CMakeLists.txt
72 # file before basis_project_begin() or basis_project_impl(), respectively.
cmake __BASIS_TOOLS_INCLUDED