1 # ============================================================================ 2 # Copyright (c) 2011-2012 University of Pennsylvania 3 # Copyright (c) 2013-2016 Andreas Schuh 6 # See COPYING file for license information or visit 7 # https://cmake-basis.github.io/download.html#license 8 # ============================================================================ 10 ############################################################################## 11 # @file BasisSettings.cmake 12 # @brief Default project-independent settings. 14 # This module defines global CMake constants and variables which are used 15 # by the BASIS CMake functions and macros. Hence, these values can be used 16 # to configure the behavior of these functions to some extent without the 17 # need to modify the functions themselves. 19 # @note As this file also sets the CMake policies to be used, it has to 20 # be included using the @c NO_POLICY_SCOPE in order for these policies 21 # to take effect also in the including file and its subdirectories. 23 # @attention Be careful when caching any of the variables. Usually, this 24 # file is included in the root CMake configuration file of the 25 # project which may also be a module of another project and hence 26 # may overwrite this project's settings. 28 # @attention Keep in mind that this file is included before any other 29 # BASIS module. Further, project-specific information such as 30 # the project name are not defined yet. 32 # @ingroup BasisSettings 33 ############################################################################## 41 ## @addtogroup BasisSettings 45 # ============================================================================ 46 # CMake version and policies 47 # ============================================================================ 49 cmake_minimum_required (
VERSION 2.8.12 FATAL_ERROR)
51 # Add policies introduced with CMake versions newer than the one specified 52 # above. These policies would otherwise trigger a policy not set warning by 53 # newer CMake versions. 56 cmake_policy (SET CMP0016 NEW)
60 cmake_policy (SET CMP0017 NEW)
64 cmake_policy (SET CMP0042 NEW)
67 # ============================================================================ 69 # ============================================================================ 71 include (
"${CMAKE_CURRENT_LIST_DIR}/CommonTools.cmake")
73 # ============================================================================ 74 # generator expressions 75 # ============================================================================ 77 ## @brief Name of build configuration ("$<CONFIG>") generator expression 78 if (CMAKE_MAJOR_VERSION LESS 3)
84 # ============================================================================ 86 # ============================================================================ 88 ## @brief Names of project meta-data switches. 94 ## @brief Names of project meta-data with only one argument.
97 BASIS_METADATA_LIST_SINGLE
101 PACKAGE #
short alias
for PACKAGE_NAME
102 WEBSITE #
short alias
for PACKAGE_WEBSITE
103 VENDOR #
short alias
for PACKAGE_VENDOR
104 PROVIDER #
short alias
for PACKAGE_VENDOR (not PROVIDER_NAME, see
basis_project!)
106 PACKAGE_VENDOR
# package vendor ID used for installation path 120 TEMPLATE # used by basisproject tool
121 INCLUDE_DIR # alias
for INCLUDE_DIRS
122 CODE_DIR # alias
for CODE_DIRS
123 TOOLS_DIR # alias
for TOOLS_DIRS
124 MODULES_DIR # single directory containing multiple modules, see also MODULE_DIRS
125 CONFIG_DIR # directory containing the CMake/BASIS configuration
126 DATA_DIR # directory containing the auxiliary program data
127 DOC_DIR # directory containing the documentation
128 DOCRES_DIR # directory containing the ressource files such as a project logo
129 EXAMPLE_DIR # directory containing some example files
130 LIBRARY_DIR # directory containing script libraries such as Perl or Python modules
131 TESTING_DIR # directory containing the source code and data of the software tests
134 ## @brief Names of project meta-data with multiple arguments.
137 BASIS_METADATA_LIST_MULTI
141 DEFAULT_MODULES # list of modules to be enabled by
default 142 EXTERNAL_MODULES # list of external project modules
146 OPTIONAL_TOOLS_DEPENDS
148 OPTIONAL_TEST_DEPENDS
149 INCLUDE_DIRS # list of directories containing
public header files
150 CODE_DIRS # list of directories containing source code files, see also CODE_DIR
151 TOOLS_DIRS # list of directories containing source code files of applications, see also TOOLS_DIR
152 MODULE_DIRS # list of separate module directories, see also MODULES_DIR
153 OTHER_DIRS # list of additional (
generic) project subdirectories
154 SUBDIRS
# deprecated option name for OTHER_DIRS 157 ## @brief Names of project meta-data.
162 ${BASIS_METADATA_LIST_SINGLE}
163 ${BASIS_METADATA_LIST_MULTI}
166 ## @brief Names of additional meta-data
for Slicer modules with only one argument.
168 BASIS_SLICER_METADATA_LIST_SINGLE
175 ## @brief Names of additional meta-data for Slicer modules with multiple arguments. 177 BASIS_SLICER_METADATA_LIST_MULTI
181 LICENSE_SHORT_DESCRIPTION
184 ## @brief Names of additional meta-data
for Slicer modules.
186 BASIS_SLICER_METADATA_LIST
187 ${BASIS_SLICER_METADATA_LIST_SINGLE}
188 ${BASIS_SLICER_METADATA_LIST_MULTI}
191 # ============================================================================ 192 # constants and global settings 193 # ============================================================================ 195 ## @brief List of name patterns used for special purpose targets. 197 # Contains a list of target name patterns that are used by the BASIS functions 198 # for special purposes and are hence not to be used for project targets. 200 BASIS_RESERVED_TARGET_NAMES
217 ## @brief Names of recognized properties on targets.
219 # Unfortunately, the @c ARGV and @c ARGN arguments of a CMake
function()
220 # or macro() does not preserve values which themselves are lists. Therefore, 221 # it is not possible to distinguish between property names and their values 222 # in the arguments passed to set_target_properties() or 223 # basis_set_target_properties(). To overcome this problem, this list specifies 224 # all the possible property names. Everything else is considered to be a 225 # property value except the first argument follwing right after the 226 # @c PROPERTIES keyword. Alternatively, basis_set_property() can be used 227 # as here no disambiguity exists. 229 # @note Placeholders such as <CONFIG> are allowed. These are treated 230 # as the regular expression "[^ ]+". See basis_list_to_regex(). 232 # @sa https://cmake.org/cmake/help/v3.4/manual/cmake-properties.7.html#properties-on-targets 233 set (BASIS_PROPERTIES_ON_TARGETS
238 ANDROID_ANT_ADDITIONAL_OPTIONS
242 ANDROID_ASSETS_DIRECTORIES
244 ANDROID_JAR_DEPENDENCIES
245 ANDROID_JAR_DIRECTORIES
246 ANDROID_JAVA_SOURCE_DIR
247 ANDROID_NATIVE_LIB_DEPENDENCIES
248 ANDROID_NATIVE_LIB_DIRECTORIES
251 ANDROID_PROGUARD_CONFIG_PATH
252 ANDROID_SECURE_PROPS_PATH
253 ANDROID_SKIP_ANT_STEP
255 ARCHIVE_OUTPUT_DIRECTORY
256 ARCHIVE_OUTPUT_DIRECTORY_<CONFIG>
258 ARCHIVE_OUTPUT_NAME_<CONFIG>
259 AUTOGEN_TARGET_DEPENDS
266 BUILD_WITH_INSTALL_RPATH
272 COMPATIBLE_INTERFACE_BOOL
273 COMPATIBLE_INTERFACE_NUMBER_MAX
274 COMPATIBLE_INTERFACE_NUMBER_MIN
275 COMPATIBLE_INTERFACE_STRING
277 COMPILE_DEFINITIONS_<CONFIG>
282 COMPILE_PDB_NAME_<CONFIG>
285 CROSSCOMPILING_EMULATOR
288 CXX_STANDARD_REQUIRED
294 EXCLUDE_FROM_DEFAULT_BUILD
295 EXCLUDE_FROM_DEFAULT_BUILD_<CONFIG>
299 Fortran_MODULE_DIRECTORY
305 IMPLICIT_DEPENDS_INCLUDE_TRANSFORM
307 IMPORTED_CONFIGURATIONS
309 IMPORTED_IMPLIB_<CONFIG>
310 IMPORTED_LINK_DEPENDENT_LIBRARIES
311 IMPORTED_LINK_DEPENDENT_LIBRARIES_<CONFIG>
312 IMPORTED_LINK_INTERFACE_LANGUAGES
313 IMPORTED_LINK_INTERFACE_LANGUAGES_<CONFIG>
314 IMPORTED_LINK_INTERFACE_LIBRARIES
315 IMPORTED_LINK_INTERFACE_LIBRARIES_<CONFIG>
316 IMPORTED_LINK_INTERFACE_MULTIPLICITY
317 IMPORTED_LINK_INTERFACE_MULTIPLICITY_<CONFIG>
319 IMPORTED_LOCATION_<CONFIG>
321 IMPORTED_NO_SONAME_<CONFIG>
323 IMPORTED_SONAME_<CONFIG>
329 INSTALL_RPATH_USE_LINK_PATH
330 INTERFACE_AUTOUIC_OPTIONS
331 INTERFACE_COMPILE_DEFINITIONS
332 INTERFACE_COMPILE_FEATURES
333 INTERFACE_COMPILE_OPTIONS
334 INTERFACE_INCLUDE_DIRECTORIES
335 INTERFACE_LINK_LIBRARIES
336 INTERFACE_POSITION_INDEPENDENT_CODE
338 INTERFACE_SYSTEM_INCLUDE_DIRECTORIES
339 INTERPROCEDURAL_OPTIMIZATION
340 INTERPROCEDURAL_OPTIMIZATION_<CONFIG>
344 <LANG>_COMPILER_LAUNCHER
345 <LANG>_INCLUDE_WHAT_YOU_USE
346 <LANG>_VISIBILITY_PRESET
347 LIBRARY_OUTPUT_DIRECTORY
348 LIBRARY_OUTPUT_DIRECTORY_<CONFIG>
350 LIBRARY_OUTPUT_NAME_<CONFIG>
353 LINK_DEPENDS_NO_SHARED
356 LINK_INTERFACE_LIBRARIES
357 LINK_INTERFACE_LIBRARIES_<CONFIG>
358 LINK_INTERFACE_MULTIPLICITY
359 LINK_INTERFACE_MULTIPLICITY_<CONFIG>
361 LINK_SEARCH_END_STATIC
362 LINK_SEARCH_START_STATIC
366 MACOSX_BUNDLE_INFO_PLIST
367 MACOSX_FRAMEWORK_INFO_PLIST
369 MAP_IMPORTED_CONFIG_<CONFIG>
372 NO_SYSTEM_FROM_IMPORTED
374 OSX_ARCHITECTURES_<CONFIG>
380 PDB_OUTPUT_DIRECTORY_<CONFIG>
381 POSITION_INDEPENDENT_CODE
392 RUNTIME_OUTPUT_DIRECTORY
393 RUNTIME_OUTPUT_DIRECTORY_<CONFIG>
395 RUNTIME_OUTPUT_NAME_<CONFIG>
401 STATIC_LIBRARY_FLAGS_<CONFIG>
405 VISIBILITY_INLINES_HIDDEN
406 VS_DESKTOP_EXTENSIONS_VERSION
408 VS_DOTNET_TARGET_FRAMEWORK_VERSION
410 VS_GLOBAL_PROJECT_TYPES
411 VS_GLOBAL_ROOTNAMESPACE
413 VS_IOT_EXTENSIONS_VERSION
416 VS_MOBILE_EXTENSIONS_VERSION
421 VS_WINDOWS_TARGET_PLATFORM_MIN_VERSION
426 WINDOWS_EXPORT_ALL_SYMBOLS
427 XCODE_ATTRIBUTE_<an-attribute>
430 BASIS_INCLUDE_DIRECTORIES # include directories
431 BASIS_LINK_DIRECTORIES # link directories
432 BASIS_LINK_DEPENDS # link libraries
433 BASIS_TYPE # BASIS type of target
435 BUNDLED # whether target belongs to same bundle/superbuild
436 SCRIPT_DEFINITIONS # script configuration code
437 SCRIPT_DEFINITIONS_FILE # script configuration file
439 COMPILE # enable/disable compilation of script
440 EXPORT # whether to export target
441 LIBEXEC # whether the target
is an auxiliary executable
442 TEST # whether the target
is a test
443 MFILE # documentation file of MEX-file
444 COMPONENT #
package component of build target
445 LIBRARY_COMPONENT # package component of the library component
446 RUNTIME_COMPONENT # package component of the runtime component
447 ARCHIVE_INSTALL_DIRECTORY # installation directory of library
448 LIBRARY_HEADER_DIRECTORY # output directory of generated header files
449 LIBRARY_INSTALL_DIRECTORY # installation directory of library
450 RUNTIME_INSTALL_DIRECTORY # installation directory of runtime
451 OUTPUT_DIRECTORY # output directory for generated files
452 INSTALL_DIRECTORY # installation directory for generated files
453 HTML_OUTPUT_DIRECTORY # Doxygen/Sphinx HTML output directory
454 HTML_INSTALL_DIRECTORY # Doxygen/Sphinx HTML installation directory
455 DIRHTML_OUTPUT_DIRECTORY # Sphinx HTML output directory
456 DIRHTML_INSTALL_DIRECTORY # Sphinx HTML installation directory
457 SINGLEHTML_OUTPUT_DIRECTORY # Sphinx HTML output directory
458 SINGLEHTML_INSTALL_DIRECTORY # Sphinx HTML installation directory
459 LINKCHECK_OUTPUT_DIRECTORY # Sphinx linkcheck output directory
460 LINKCHECK_INSTALL_DIRECTORY # Sphinx linkcheck installation directory
461 XML_OUTPUT_DIRECTORY # Doxygen XML output directory
462 XML_INSTALL_DIRECTORY # Doxygen XML installation directory
463 MAN_OUTPUT_DIRECTORY # Doxygen/Sphinx MAN output directory
464 MAN_INSTALL_DIRECTORY # Doxygen/Sphinx MAN installation directory
465 TEXT_OUTPUT_DIRECTORY # Sphinx text output directory
466 TEXT_INSTALL_DIRECTORY # Sphinx text installation directory
467 TEXINFO_OUTPUT_DIRECTORY # Sphinx Texinfo output directory
468 TEXINFO_INSTALL_DIRECTORY # Sphinx Texinfo installation directory
469 LATEX_OUTPUT_DIRECTORY # Doxygen/Sphinx LaTeX output directory
470 LATEX_INSTALL_DIRECTORY # Doxygen/Sphinx LaTeX installation directory
471 PDF_OUTPUT_DIRECTORY # Doxygen/Sphinx PDF output directory
472 PDF_INSTALL_DIRECTORY # Doxygen/Sphinx PDF installation directory
473 RTF_OUTPUT_DIRECTORY # Doxygen RTF output directory
474 RTF_INSTALL_DIRECTORY # Doxygen RTF installation directory
475 DOXYFILE # Doxygen configuration file
476 OUTPUT # Doxygen output formats
477 TAGFILE # Doxygen tag file
478 BUILD_DIRECTORY # CMakeFiles build directory of target
479 CONFIG_DIRECTORY # Sphinx configuration directory
480 BINARY_DIRECTORY # CMake build tree directory
481 SOURCE_DIRECTORY # CMake or Sphinx source directory
482 BUILDERS # Sphinx builders
485 # convert list of property names into regular expression
486 basis_list_to_regex (BASIS_PROPERTIES_ON_TARGETS_RE ${BASIS_PROPERTIES_ON_TARGETS})
488 ## @brief Whether BASIS shall use target UIDs.
490 # If this option is OFF, target UIDs are idential to the target names
491 # given as arguments to the "basis_add_*" functions.
493 # The target UIDs ensure that no name conflict between the targets
494 # of this project and those of an external library which are imported
495 # occurs. Another reason for using these target UIDs is to avoid
496 # target name conflicts between modules or subprojects which may
497 # be developed by different teams.
499 # The downside of using target UIDs is, however, a slower configuration
500 # of the build system because every target name must be mapped to its
501 # target UID and possibly vice versa. Moreover, the use of target UIDs
502 # is less intuitive for those new to BASIS but experienced with CMake.
503 basis_set_if_not_set (BASIS_USE_TARGET_UIDS OFF)
505 ## @brief Whether BASIS shall use fully-qualified target UIDs.
507 # If this option is OFF, the namespace of the top-level BASIS project is
508 # not prepended to the actual CMake build target names.
510 # For example, instead of the fully-qualified target UID
511 # "@PROJECT_NAME_L@.target", the CMake target name will simply
512 # be "target". Only when the target is referenced from another project,
513 # the fully-qualified target UID is usually required.
514 basis_set_if_not_set (BASIS_USE_FULLY_QUALIFIED_UIDS OFF)
516 ## @brief Default component used for library targets when no component is specified.
518 # The default component a library target and its auxiliary files
519 # are associated with if no component was specified, explicitly.
520 set (BASIS_LIBRARY_COMPONENT "Development")
522 ## @brief Default component used for executables when no component is specified.
524 # The default component an executable target and its auxiliary files
525 # are associated with if no component was specified, explicitly.
526 set (BASIS_RUNTIME_COMPONENT "Runtime")
528 ## @brief Enable the automatic detection of the use of the BASIS utilities.
530 # If @c TRUE, the basis_add_executable() and basis_add_library() commands will try to
531 # automatically detect whether a given executable or library makes use of the
532 # BASIS utilities. If so, it configures the utilities for this project and adds
533 # a respective library build target as well as a link dependency on this target.
534 # This was the default until BASIS v3.1. Since this version, it is recommended
535 # to either use the @c USE_BASIS_UTILITIES option of basis_add_executable() and
536 # basis_add_library() or to add a link dependency on "basis" (recommended):
539 # basis_add_executable(foo.cxx)
540 # basis_target_link_libraries(foo basis)
542 set (BASIS_UTILITIES FALSE)
544 ## @brief Whether to always build the BASIS C++ utilities even if not required by any target
545 option (BUILD_BASIS_UTILITIES_FOR_CXX "Force the build of the BASIS C++ Utilities even if not used by this project" OFF)
546 ## @brief Whether to always build the BASIS Python utilities even if not required by any target
547 option (BUILD_BASIS_UTILITIES_FOR_PYTHON "Force the build of the BASIS Python Utilities even if not used by this project" OFF)
548 ## @brief Whether to always build the BASIS Perl utilities even if not required by any target
549 option (BUILD_BASIS_UTILITIES_FOR_PERL "Force the build of the BASIS Perl Utilities even if not used by this project" OFF)
550 ## @brief Whether to always build the BASIS Bash utilities even if not required by any target
551 option (BUILD_BASIS_UTILITIES_FOR_BASH "Force the build of the BASIS Bash Utilities even if not used by this project" OFF)
553 mark_as_advanced (BUILD_BASIS_UTILITIES_FOR_CXX
554 BUILD_BASIS_UTILITIES_FOR_PYTHON
555 BUILD_BASIS_UTILITIES_FOR_PERL
556 BUILD_BASIS_UTILITIES_FOR_BASH)
558 ## @brief Whether to export targets by default.
560 # This global variable specifies the default for the export of build targets if the
561 # @c EXPORT or @c NO_EXPORT options of the basis_add_executable and basis_add_library
562 # commands are not given.
563 set (BASIS_EXPORT_DEFAULT TRUE)
565 ## @brief Suffix used for target exports file "<Package><ExportSuffix>.cmake"
566 set (BASIS_EXPORT_SUFFIX "Exports")
568 ## @brief Whether to create "<Package><ExportSuffix>.cmake" file so other projects can import the exported targets.
570 # @sa GenerateConfig.cmake, ExportTools.cmake, http:
571 set (BASIS_EXPORT_ENABLED ON)
573 basis_is_cached (BASIS_DEPRECATED_CREATE_EXPORTS_FILE_OPTION BASIS_CREATE_EXPORTS_FILE)
574 if (BASIS_DEPRECATED_CREATE_EXPORTS_FILE_OPTION)
575 set (BASIS_EXPORT_ENABLED "${BASIS_CREATE_EXPORTS_FILE}")
578 ## @brief Disable use of the revision information obtained from the revision
579 # control software such as Subversion or Git.
581 # If this option is @c TRUE, the revision information is not included in the
582 # @c PROJECT_RELEASE information.
583 option (BASIS_REVISION_INFO "Enable use of the revision information of the revision control software." ON)
584 mark_as_advanced (BASIS_REVISION_INFO)
586 ## @brief Enable compilation of scripts if supported by the language.
588 # In particular, Python modules are compiled if this option is enabled and
589 # only the compiled modules are installed.
591 # @sa basis_add_script_target()
592 option (BASIS_COMPILE_SCRIPTS "Enable compilation of scripts if supported by the language." OFF)
593 mark_as_advanced (BASIS_COMPILE_SCRIPTS)
596 ## @brief Enable the installation of scripted modules in site specific default directories.
598 # If this option is @c ON, scripted modules such as Python and Perl modules, in particular,
599 # are installed in the default installation directories for site packages of the respective
600 # interpreter. This means that these modules may be installed outside the installation
601 # root directory as specified by the @c CMAKE_INSTALL_PREFIX. When this option is set to
602 # @c OFF, all modules are installed in subdirectories of the @c CMAKE_INSTALL_PREFIX.
603 # These directories may have to be added to the search path for modules manually as they
604 # might not be in the default search path of the respective interpreter.
606 # The installation directories for public modules which are intended for external use
607 # can further be set using the -D option of CMake or be modified by editing the respective
608 # advanced CMake cache variables named <tt>INSTALL_<LANG%gt;_SITE_DIR</tt>.
610 # @note Even though it is more convenient for the user of a package to have the modules 611 # being installed in the default directories, this option is set to @c OFF by default. 612 # The reasons are that it is in first place expected that the installation will copy 613 # files only to directories within the @c CMAKE_INSTALL_PREFIX. Moreover, it is not 614 # guaranteed that the user has write permissions for the default site packages directories. 615 # Last but not least, when installing public modules located in the @c PROJECT_LIBRARY_DIR 616 # source directory, BASIS does not set a default module @c PREFIX which reduces the risk 617 # of overwriting existing modules of other packages. If the developer of a BASIS package 618 # was not thorough enough and did not follow the guidelines, setting this option to @c ON 619 # has the potential risk of overwriting other packages' modules. Therefore, 620 # modules are only installed in system default locations if explicitly requested. 624 ## @brief Script used to execute a process in CMake script mode. 626 # In order to be able to assign a timeout to the execution of a custom command 627 # and to add some error message parsing, this script is used by some build 628 # rules to actually perform the build step. See for example, the build of 629 # executables using the MATLAB Compiler. 632 ## @brief File used by
default as <tt>--authors</tt> file to <tt>svn2cl</tt>.
634 # This file lists all Subversion users at SBIA and
is used by
default for 635 # the mapping of Subversion user names to real names during the generation
639 ## @brief Force installation of public header files of BASIS C++ utilities. 641 # If this variable is set to FALSE, each header file in the @c PROJECT_INCLUDE_DIR 642 # is scanned for an include statement which includes one of the public header 643 # files of the BASIS C++ utilities. If such include statement was found in 644 # a public header file of the project, the public header files of the BASIS 645 # C++ utilities are also installed as the project's public header files depend 646 # on them. You can set this variable to TRUE in the Settings.cmake file of your 647 # project to force the installation of the public header files of the 648 # project-specific BASIS C++ utilities. 650 # @sa basis_install_public_headers() 653 ## @brief Whether BASIS should configure any public header file with the .in file name suffix. 655 # If a project does not contain any such public header file (typically one named config.h.in), 656 # this option can be set to @c FALSE in the @c "config/Settings.cmake" file of the project. 657 # For better performance, if only one header file needs to be configured, this can be done 658 # manually by adding a corresponding configure_file() call to the root CMakeLists.txt file 659 # right after basis_project_begin(). The configured files should be written to the 660 # @c BINARY_INCLUDE_DIR which is located in the build tree of the project. 663 ## @brief Whether
basis_project_begin() should support the configuration of Slicer modules.
665 # This option must be set to @c TRUE in @c "config/Settings.cmake" of a project 666 # which either itself or one of its modules is a 3D Slicer Extension. 668 # @sa http://www.slicer.org 671 ## @brief Enable/disable registration of installed package in CMake registry.
672 option (
BASIS_REGISTER "Request registration of installed package in CMake package registry." ON)
675 ## @brief EXPERIMENTAL - Build project modules as separate external projects. 677 # This may improve performance of the initial configure step but comes with the caveats 678 # inherent to the superbuild approach as implemented by the ExternalProject module. 682 ## @brief Enable/disable import of targets using the BASIS ImportTools. 684 # Issues/limitations of CMake's "function" command complicate the definition 685 # of a custom set_target_properties function which can be used to collect 686 # "global" information about targets imported from the CMake package 687 # configuration of project dependencies. The workaround in the custom 688 # set_target_properties function defined in the ImportTools.cmake is 689 # extremely inefficient and slows down the configuration step a lot 690 # (cf. https://github.com/cmake-basis/BASIS/issues/494). 692 # The only need for collecting this information for all (executable) 693 # targets imported from dependencies is for generating the executable 694 # target info table for the BASIS Utilities (cf. UtilitiesTools.cmake). 695 # Hence, when these are not used, the ImportTools.cmake are not needed. 696 # Further, when a project does not consist of modules, the imported 697 # targets are available in the scope of the project. 699 # A project has to set BASIS_IMPORT_TARGETS to TRUE in its root CMakeLists.txt 700 # file before basis_project_begin() or basis_project_impl(), respectively, 701 # which in turn include the BASISUse.cmake file. This file includes the 702 # BASIS ImportTools module when BASIS_IMPORT_TARGETS is true. 705 # ============================================================================ 706 # programming language specific settings 707 # ============================================================================ 709 ## @brief List of programming languages explicitly supported by BASIS. 711 # @todo Add full support for Java. 714 string (TOLOWER
"${BASIS_LANGUAGES}" BASIS_LANGUAGES_L)
715 string (TOUPPER
"${BASIS_LANGUAGES}" BASIS_LANGUAGES_U)
717 # ---------------------------------------------------------------------------- 718 # namespace delimiters 719 # ---------------------------------------------------------------------------- 721 ## @brief Namespace delimiter used in CMake. 723 ## @brief Namespace delimiter used in C++. 725 ## @brief Namespace delimiter used in Python. 727 ## @brief Namespace delimiter used in Jython. 729 ## @brief Namespace delimiter used in Perl. 731 ## @brief Namespace delimiter used in MATLAB.
733 ## @brief Namespace delimiter used in Bash. 735 # @note Bash itself has no concept of namespaces. This namespace delimiter is 736 # used by the import() function of the BASIS Utilities for Bash. 738 # @sa BasisBashUtilities 741 # ---------------------------------------------------------------------------- 742 # public libraries of script modules 743 # ---------------------------------------------------------------------------- 745 ## @brief Name of library target which builds Python modules in @c PROJECT_LIBRARY_DIR. 747 # This variable is used by basis_configure_script_libraries() which is called 748 # by basis_project_begin() to add a library target of the given name for the 749 # build of the Python modules found in the @c PROJECT_LIBRARY_DIR. 751 # @note The given target name is argument to the basis_add_library() command. 752 # Overwrite default value in Settings.cmake file of project if desired. 758 # by basis_project_begin() to add a library target of the given name for the 759 # build of the Jython modules found in the @c PROJECT_LIBRARY_DIR. 761 # @note The given target name is argument to the basis_add_library() command. 762 # Overwrite default value in Settings.cmake file of project if desired. 768 # by basis_project_begin() to add a library target of the given name for the 769 # build of the Perl modules found in the @c PROJECT_LIBRARY_DIR. 771 # @note The given target name is argument to the basis_add_library() command. 772 # Overwrite default value in Settings.cmake file of project if desired. 778 # by basis_project_begin() to add a library target of the given name for the 779 # build of the MATLAB modules found in the @c PROJECT_LIBRARY_DIR. 781 # @note The given target name is argument to the basis_add_library() command. 782 # Overwrite default value in Settings.cmake file of project if desired. 788 # by basis_project_begin() to add a library target of the given name for the 789 # build of the Bash modules found in the @c PROJECT_LIBRARY_DIR. 791 # @note The given target name is argument to the basis_add_library() command. 792 # Overwrite default value in Settings.cmake file of project if desired. 795 # ============================================================================
797 # ============================================================================
799 ## @brief Advanced non-cached variable to request build of documentation targets as part of ALL target.
802 ## @brief Default Doxygen configuration. 805 ## @brief Default Sphinx configuration.
808 ## @brief Default Sphinx theme. 811 ## @brief Default Sphinx theme options.
812 set (BASIS_SPHINX_HTML_THEME_OPTIONS
817 #ROOT_RELLINKS
"[('home', 'index')]" 820 # ============================================================================ 822 # ============================================================================ 824 ## @brief Request verbose messages from BASIS functions. 825 option (
BASIS_VERBOSE "Request BASIS functions to output verbose messages." OFF)
828 ## @brief Request debugging messages from BASIS functions. 829 option (
BASIS_DEBUG "Request BASIS functions to help debugging." OFF)
832 ## @brief Request configuration of software build only, skipping steps related to packaging and installation. 833 option (
BASIS_BUILD_ONLY "Request configuration of software build only, skipping steps related to packaging and installation." OFF)
836 # ============================================================================ 837 # build configuration 838 # ============================================================================ 843 CACHE STRING
"Choose the type of build, options are: None (CMAKE_C_FLAGS and CMAKE_CXX_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." 848 # the following Mac OS specific variables are yet not further used 849 # hide them from the normal user, as they are usually not required (yet) 850 if (DEFINED CMAKE_OSX_ARCHITECTURES)
851 mark_as_advanced (CMAKE_OSX_ARCHITECTURES)
853 if (DEFINED CMAKE_OSX_DEPLOYMENT_TARGET)
854 mark_as_advanced (CMAKE_OSX_DEPLOYMENT_TARGET)
856 if (DEFINED CMAKE_OSX_SYSROOT)
857 mark_as_advanced (CMAKE_OSX_SYSROOT)
860 ## @brief Whether to have BASIS set the RPATH of binaries rather than CMake 862 # @sa http://www.cmake.org/Wiki/CMake_RPATH_handling for details on how CMake 863 # itself handles the RPATH setting of executables and shared libraries. 864 option (BASIS_INSTALL_RPATH
"Whether to have BASIS set the RPATH of binaries rather than CMake" ON)
865 mark_as_advanced (BASIS_INSTALL_RPATH)
867 # use INSTALL_RPATH set by BASIS instead of CMake 868 if (BASIS_INSTALL_RPATH)
877 # end of Doxygen group
cmake BASIS_PERL_LIBRARY_TARGET
Name of library target which builds Perl modules in PROJECT_LIBRARY_DIR.
cmake LIBRARY_DIR
Directory of shared and module libraries relative to script location.
cmake BASIS_GE_CONFIG
Name of build configuration ("$<CONFIG>") generator expression.
cmake BASIS_DOXYGEN_DOXYFILE
Default Doxygen configuration.
cmake BASIS_UTILITIES
Enable the automatic detection of the use of the BASIS utilities.
cmake BASIS_SPHINX_HTML_THEME
Default Sphinx theme.
cmake BASIS_BASH_LIBRARY_TARGET
Name of library target which builds Bash modules in PROJECT_LIBRARY_DIR.
function is(in result, in expected, in name)
Test whether a given result is equal to the expected result.
def which(command, path=None, verbose=0, exts=None)
option BASIS_INSTALL_SITE_PACKAGES
Enable the installation of scripted modules in site specific default directories. ...
cmake BASIS_CONFIGURE_PUBLIC_HEADERS
Whether BASIS should configure any public header file with the .in file name suffix.
cmake BASIS_PYTHON_LIBRARY_TARGET
Name of library target which builds Python modules in PROJECT_LIBRARY_DIR.
option BASIS_REGISTER
Enable/disable registration of installed package in CMake registry.
cmake PROJECT_LIBRARY_DIR
Absolute path to directory of public scripted packages.
cmake BASIS_NAMESPACE_DELIMITER_CXX
Namespace delimiter used in C++.
cmake BASIS_JYTHON_LIBRARY_TARGET
Name of library target which builds Jython modules in PROJECT_LIBRARY_DIR.
cmake BASIS_NAMESPACE_DELIMITER_JYTHON
Namespace delimiter used in Jython.
macro basis_set_if_not_set(out VAR, in ARGN)
Set value of variable only if variable is not defined yet.
cmake BASIS_IMPORT_TARGETS
Enable/disable import of targets using the BASIS ImportTools.
cmake CMAKE_SKIP_BUILD_RPATH
cmake BASIS_NAMESPACE_DELIMITER_MATLAB
Namespace delimiter used in MATLAB.
string COPYRIGHT
Default copyright of executables.
function basis_configure_script_libraries()
Add library targets for the public modules in PROJECT_LIBRARY_DIR.
BASIS_METADATA_LIST_SWITCH
Names of project meta-data switches.
cmake BASIS_NAMESPACE_DELIMITER_CMAKE
Namespace delimiter used in CMake.
cmake BASIS_LANGUAGES
List of programming languages explicitly supported by BASIS.
cmake CMAKE_BUILD_WITH_INSTALL_RPATH
string VERSION
Project version.
cmake BASIS_ALL_DOC
Advanced non-cached variable to request build of documentation targets as part of ALL target...
cmake BASIS_SPHINX_CONFIG
Default Sphinx configuration.
cmake BASIS_NAMESPACE_DELIMITER_PYTHON
Namespace delimiter used in Python.
macro basis_project_begin()
Marks the begining of a BASIS project.
cmake BASIS_SUPPORT_SLICER_MODULES
Whether basis_project_begin() should support the configuration of Slicer modules. ...
cmake BASIS_INSTALL_PUBLIC_HEADERS_OF_CXX_UTILITIES
Force installation of public header files of BASIS C++ utilities.
cmake CMAKE_INSTALL_RPATH_USE_LINK_PATH
cmake DATA_DIR
Directory of auxiliary data files relative to script location.
macro basis_project(in ARGN)
Sets basic project information including the name, version, and dependencies.
option BASIS_SUPERBUILD_MODULES
EXPERIMENTAL - Build project modules as separate external projects.
option BASIS_DEBUG
Request debugging messages from BASIS functions.
string LICENSE
Default license of executables.
cmake __BASIS_SETTINGS_INCLUDED
cmake BASIS_NAMESPACE_DELIMITER_BASH
Namespace delimiter used in Bash.
cmake BASIS_SCRIPT_EXECUTE_PROCESS
Script used to execute a process in CMake script mode.
option BASIS_VERBOSE
Default Sphinx theme options.
cmake LANGUAGE
Detected scripting language or UNKNOWN.
cmake BASIS_NAMESPACE_DELIMITER_PERL
Namespace delimiter used in Perl.
option BASIS_BUILD_ONLY
Request configuration of software build only, skipping steps related to packaging and installation...
cmake BASIS_MATLAB_LIBRARY_TARGET
Name of library target which builds MATLAB modules in PROJECT_LIBRARY_DIR.
cmake BASIS_SVN_USERS_FILE
File used by default as –authors file to svn2cl.
string CONTACT
Default contact to use for help output of executables.