CMake Modules¶
This section describes the CMake functionailty of Dawn and it’s subprojects.
Installation¶
Add the <dawn>/cmake/modules directory to the CMAKE_MODULE_PATH to use the functions, macros and modules:
list(APPEND CMAKE_MODULE_PATH "<dawn>/cmake/modules")
Note that all Dawn projects contain a dawn_cmake_init macro which tries to find the CMake modules of Dawn.
include(DawnCMakeInit)
dawn_cmake_init()
Functions & Macros¶
Each function and macro uses a snake-case identifier and is defined in a spereate file using he corresponding camel-case filename. For example, to use the function dawn_add_target_clean_all include the file DawnAddTargetCleanAll.
include(DawnAddTargetCleanAll)
dawn_add_target_clean_all()
- dawn_get_compiler_info
- dawn_add_executable
- dawn_add_library
- dawn_add_target_clang_format
- dawn_add_target_clean_all
- dawn_add_unittest
- dawn_check_and_set_cxx_flag
- dawn_check_cxx_flag
- dawn_check_in_source_build
- dawn_combine_libraries
- dawn_configure_file
- dawn_create_package_string
- dawn_export_options
- dawn_export_package
- dawn_find_python_module
- dawn_get_architecture_info
- dawn_get_compiler_info
- dawn_get_git_head_revision
- dawn_get_platform_info
- dawn_get_script_dir
- dawn_include_guard
- dawn_make_string_pair
- dawn_report_result
- dawn_set_cxx_standard
Modules¶
Load settings for an external project via find_package.