cmake function examples

Signatures

function(<name> [<arg1> ...])
  <commands>
endfunction()

Examples

timi-liuliang/echo editor/Qt/5.10.0/msvc2017_64/lib/cmake/Qt5Core/Qt5CTestMacros.cmake :127

function(test_module_includes)

abellgithub/delaunator-cpp cmake/mason.cmake :70

function(mason_use _PACKAGE)

geodynamics/aspect tests/CMakeLists.txt :105

function(SHOULD_ENABLE_TEST _filename)

u3d-community/U3D Source/ThirdParty/Assimp/cmake-modules/HunterGate.cmake :71

function(hunter_gate_fatal_error)

PieKing1215/FallingSandSurvival CMake/Default.cmake :48

function(set_config_specific_property NAME VALUE)

oceancx/CXEngine cmake/cotire.cmake :296

function (cotire_get_source_file_property_values _valuesVar _property)

alicevision/AliceVision src/cmake/CodeCoverage.cmake :736

function(append_coverage_compiler_flags)

f3d-app/f3d application/testing/CMakeLists.txt :2

function(f3d_test)

o3de/o3de AutomatedTesting/CMakeLists.txt :13

function(get_engine_finder_cmake_path project_json_file_path path_value)

prusa3d/PrusaSlicer build-utils/CMakeLists.txt :26

function(encoding_check TARGET)

FreeCAD/FreeCAD cMake/FreeCAD_Helpers/PrintFinalReport.cmake :41

function(section_begin name)

OGRECave/ogre CMake/Utils/OgreConfigTargets.cmake :315

function(ogre_config_sample_exe SAMPLENAME)

godlikepanos/anki-3d-engine ThirdParty/Reproc/cmake/reproc.cmake :195

function(reproc_library TARGET LANGUAGE)

prusa3d/Prusa-Firmware cmake/GetGitRevisionDescription.cmake :179

function(git_describe _var)

bambulab/BambuStudio cmake/modules/FindGLEW.cmake :95

function(__glew_set_find_library_suffix shared_or_static)

tinyobjloader/tinyobjloader cmake/sanitizers/FindMSan.cmake :51

function (add_sanitize_memory TARGET)

SoftFever/OrcaSlicer cmake/modules/Catch2/ParseAndAddCatchTests.cmake :78

function(ParseAndAddCatchTests_RemoveComments CppCode)

anhttran/3dmm_basic lib/3rdParty/Eigen/cmake/EigenDetermineOSVersion.cmake :28

function(DetermineOSVersion OS_VERSION)

DragonJoker/Castor3D source/Core/CMakeLists.txt :6

function( CoreInit )

cadaver/turso3d ThirdParty/SDL/cmake/3rdparty.cmake :1

function(get_clang_tidy_ignored_files OUTVAR)

Hork-Engine/Hork-Source hork_config.cmake :201

function(make_source_list_for_directory DIR SRC)

STORM-IRIT/Radium-Engine cmake/CodeCoverage.cmake :758

function(append_coverage_compiler_flags_to_target name)

RavEngine/RavEngine deps/assimp/cmake-modules/HunterGate.cmake :44

function(hunter_gate_status_debug)

cnr-isti-vclab/meshlab unsupported/plugins_unsupported/external/CoMISo/cmake/ACGCommon.cmake :594

function (acg_add_translations _target _languages _sources)

bmwcarit/ramses examples/logic/CMakeLists.txt :9

function(add_example)

zenustech/zeno CMakeLists.txt :183

function (zeno_add_asset_dir dir)

Vhonowslend/StreamFX-Public CMakeLists.txt :925

function(streamfx_add_component_dependency _NAME)

curv3d/curv extern/googletest/googletest/cmake/internal_utils.cmake :171

function(cxx_library name cxx_flags)

overte-org/overte launchers/win32/CMakeLists.txt :43

function(set_from_env _RESULT_NAME _ENV_VAR_NAME _DEFAULT_VALUE)

stuntrally/stuntrally cmake/Macros.cmake :94

function(compile_mo)

stuntrally/stuntrally3 CMake/Macros.cmake :12

function(recursive_zip_folder in_dir out_dir)

gan74/Yave CMakeLists.txt :65

function(add_slang_shader SHADER_TARGET SHADER_FILE SHADER_DEFINES)

PDAL/PDAL vendor/gtest/cmake/internal_utils.cmake :277

function(py_test name)

kokkos/kokkos algorithms/perf_test/CMakeLists.txt :36

function(KOKKOS_ADD_BENCHMARK NAME)

alpaka-group/alpaka thirdParty/catch2/CMake/Findcodecov.cmake :52

function (coverage_evaluate)

eclipse-ecal/ecal cmake/helper_functions/ecal_add_functions.cmake :61

function(ecal_add_app_gui TARGET_NAME)

meganz/MEGAcmd build/cmake/modules/megacmd_utility_functions.cmake :32

function(generate_src_file_list base_folder OUTPUT_VAR)

LLNL/zfp python/scikit-build-cmake/FindPythonExtensions.cmake :453

function(python_standalone_executable _target)

nextcloud/desktop cmake/modules/AddCMockaTest.cmake :20

function (ADD_CMOCKA_TEST _testName _testSource)

ZDoom/gzdoom libraries/cppdap/CMakeLists.txt :168

function(cppdap_set_target_options target)

ElyPrismLauncher/ElyPrismLauncher cmake/GetGitRevisionDescription.cmake :244

function(git_get_exact_tag _var)

ANTsX/ANTs CMake/ITKSetStandardCompilerFlags.cmake :43

function(check_cxx_compiler_flags cxx_flag_var)

AcademySoftwareFoundation/OpenShadingLanguage src/cmake/dependency_utils.cmake :76

function (print_package_notfound_report)

etternagame/etterna extern/fmt/test/compile-error-test/CMakeLists.txt :35

function (expect_compile_error code)

supercollider/supercollider tools/cmake_gen/SuperColliderServerPlugin.cmake :32

function(sc_add_server_plugin_properties target is_supernova)

Morwenn/cpp-sort cmake/DownloadProject.cmake :96

function(download_project)

gadomski/cpd vendor/googletest-1.14.0/googletest/cmake/internal_utils.cmake :209

function(cxx_library name cxx_flags)

Kitware/kwiver CMake/kwiver-cmake-future.cmake :2

function(kwiver_import_cmake_future BASE_PATH)

liminchen/OptCuts ext/libigl/external/cgal/src/CGAL_Project/cmake/modules/CGAL_add_test.cmake :27

function(expand_list_with_globbing list_name)

SCOREC/core cdash/nightly.cmake :82

function(git_exec CMD ACTION)

nv-legate/legate src/cmake/Modules/debug_symbols.cmake :10

function(_legate_install_debug_syms_macos target install_dir)

MaaAssistantArknights/MaaAssistantArknights cmake/utils.cmake :1

function(download_and_decompress url filename sha256_checksum decompress_dir)

rheit/zdoom CreateLaunchers.cmake :314

function(guess_runtime_library_dirs _var)

bareos/bareos cmake/BareosTargetTools.cmake :92

function(debug_deps targets outfile)

WerWolv/Fenestra cmake/build_helpers.cmake :60

function(addDefineToSource SOURCE DEFINE)

maidsafe-archive/MaidSafe cmake_modules/add_gtests.cmake :405

function(add_maidsafe_test GtestFixtureName GtestName FullGtestName)

Patoke/re-plants-vs-zombies CMake/Utils.cmake :214

function(source_file_compile_options SOURCE_FILE)

MultiMC/Launcher cmake/BundleUtilities.cmake :471

function(copy_resolved_item_into_bundle resolved_item resolved_embedded_item)

PrismLauncher/PrismLauncher cmake/QtVersionlessBackport.cmake :35

function(qt_generate_moc)

PolyMC/PolyMC cmake/QtVersionlessBackport.cmake :60

function(qt_add_resources outfiles)

RichieSams/FiberTaskingLib third_party/catch2/CMake/FindLcov.cmake :300

function (lcov_capture)

facebook/folly build/fbcode_builder/CMake/FBPythonBinary.cmake :103

function(add_fb_python_executable TARGET)

mariadb-corporation/MaxScale cmake/install_layout.cmake :71

function(install_executable target component)

openvinotoolkit/openvino cmake/developer_package/version.cmake :7

function(ov_branch_name VAR REPO_ROOT)

ezEngine/ezEngine Code/BuildSystem/CMake/ezUtils.cmake :313

function(ez_glob_source_files ROOT_DIR RESULT_ALL_SOURCES)

JSBSim-Team/jsbsim tests/unit_tests/CMakeModules/Findcodecov.cmake :52

function (coverage_evaluate)

x64dbg/x64dbg cmake/cmkr.cmake :57

function(cmkr_exec)

gnss-sdr/gnss-sdr src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/cmake/Modules/XcodeRemoveWarningDuplicates.cmake :12

function(xcode_remove_warning_duplicates target)

openthread/openthread third_party/mbedtls/repo/pkgconfig/JoinPaths.cmake :15

function(join_paths joined_path first_path_segment)

CppMicroServices/CppMicroServices cmake/usFunctionCompileSnippets.cmake :1

function(usFunctionCompileSnippets snippet_path)

alexa/avs-device-sdk cmakeBuild/cmake/PrepareInstall.cmake :100

function(asdk_set_soname target)

SsageParuders/Android_Native_Surface my_android_opencv/cmake/OpenCVDetectCXXCompiler.cmake :35

function(access_CMAKE_COMPILER_IS_CLANGCXX)

ossia/score cmake/ScoreAvndHelper.cmake :11

function(avnd_score_plugin_finalize)

lizardfs/lizardfs cmake/CheckIncludes.cmake :3

function(check_includes INCLUDES)

moneymanagerex/moneymanagerex CMakeLists.txt :299

function(add_executable)

chdb-io/chdb cmake/utils.cmake :4

function(get_all_targets outvar)

NVIDIA/MatX cmake/rapids-cmake/rapids-cmake/cmake/build_type.cmake :43

function(rapids_cmake_build_type default_type)

v6d-io/v6d CMakeLists.txt :170

function(message)

stacksmashing/LPCClocklessAnalyzer cmake/ExternalAnalyzerSDK.cmake :41

function(add_analyzer_plugin TARGET)

AcademySoftwareFoundation/MaterialX CMakeLists.txt :309

function(assign_source_group prefix)

skaarj1989/SupernovaEngine cmake/GroupProjectFiles.cmake :1

function(GROUP_MSVC_PROJECT)

w111liang222/lidar-slam-detection slam/thirdparty/fast_gicp/thirdparty/Eigen/cmake/EigenDetermineVSServicePack.cmake :5

function(EigenDetermineVSServicePack _pack)

TheAssemblyArmada/Thyme cmake/modules/FindWindowsSDK.cmake :89

function(_winsdk_conditional_append _vername _build _path)

NVIDIA/DALI cmake/Utils.cmake :427

function(get_link_libraries OUTPUT_LIST TARGET)

milvus-io/knowhere cmake/libs/libcutlass.cmake :17

function(find_and_configure_cutlass)

asset-group/Sni5Gect-5GNR-sniffing-and-exploitation CMakeLists.txt :639

function(add_lte_test)

OpenMW/openmw cmake/LibFindMacros.cmake :34

function (libfind_pkg_detect PREFIX)

OSVR/SteamVR-OSVR cmake/CleanDirectoryList.cmake :22

function(clean_directory_list _var)

Kitware/ParaView .gitlab/ci/ctest_annotation.cmake :1

function (ctest_annotation_report file)

jacob-baines/elfparser lib/gtest-1.6.0/cmake/internal_utils.cmake :149

function(cxx_executable_with_flags name cxx_flags libs)

scanner-research/scanner cmake/Modules/FindSaneProtobuf.cmake :108

function(PROTOBUF_GENERATE_CPP SRCS HDRS USE_GRPC)

codilime/veles cmake/FindGMock.cmake :62

function(_gmock_append_debugs _endvar _library)

zeek/zeek CMakeLists.txt :333

function (zeek_target_link_libraries lib_target)

topology-tool-kit/ttk CMake/BaseCode.cmake :74

function(ttk_add_base_template_library library)

Amber-MD/cpptraj cmake-cpptraj/CopyTarget.cmake :136

function(remove_link_libraries TARGET)

sandialabs/InterSpec external_libs/Minuit2/copy_standalone.cmake :35

function(PREPEND_PATH OUTVAR ADDITION)

DIPlib/diplib tools/FindMatlab.cmake :749

function(matlab_get_version_from_matlab_run matlab_binary_program matlab_list_versions)

BRAINSia/BRAINSTools CMake/ExternalProjectDependency.cmake :160

function(mark_as_superbuild)

Tulip-Dev/tulip thirdparty/OGDF/cmake/ogdf.cmake :88

function (add_ogdf_extra_flags TARGET_NAME)

gismo/gismo CMakeLists.txt :72

function(message)