cmake string examples

Signatures

string(FIND <string> <substring> <out-var> [...])
string(REPLACE <match-string> <replace-string> <out-var> <input>...)
string(REGEX MATCH <match-regex> <out-var> <input>...)
string(REGEX MATCHALL <match-regex> <out-var> <input>...)
string(REGEX REPLACE <match-regex> <replace-expr> <out-var> <input>...)
string(APPEND <string-var> [<input>...])
string(PREPEND <string-var> [<input>...])
string(CONCAT <out-var> [<input>...])
string(JOIN <glue> <out-var> [<input>...])
string(TOLOWER <string> <out-var>)
string(TOUPPER <string> <out-var>)
string(LENGTH <LENGTH_> <string> <out-var>)
string(SUBSTRING <string> <begin> <length> <out-var>)
string(STRIP <string> <out-var>)
string(GENEX_STRIP <string> <out-var>)
string(REPEAT <string> <count> <out-var>)
string(COMPARE <op> <string1> <string2> <out-var>)
string(<HASH> <out-var> <input>)
string(ASCII <number>... <out-var>)
string(HEX <string> <out-var>)
string(CONFIGURE <string> <out-var> [...])
string(MAKE_C_IDENTIFIER <string> <out-var>)
string(RANDOM [<option>...] <out-var>)
string(TIMESTAMP <out-var> [<format string>] [UTC])
string(UUID <out-var> ...)
string(JSON <out-var> [ERROR_VARIABLE <error-var>]
  {GET <JSON GET_> | TYPE <JSON TYPE_> | LENGTH <JSON LENGTH_> | REMOVE <JSON REMOVE_>}
<json-string> <member|index> [<member|index> ...])
string(JSON <out-var> [ERROR_VARIABLE <error-var>]
  MEMBER <JSON MEMBER_> <json-string>
[<member|index> ...] <index>)
string(JSON <out-var> [ERROR_VARIABLE <error-var>]
  SET <JSON SET_> <json-string>
<member|index> [<member|index> ...] <value>)
string(JSON <out-var> [ERROR_VARIABLE <error-var>]
  EQUAL <JSON EQUAL_> <json-string1> <json-string2>)

Examples

timi-liuliang/echo editor/Qt/5.10.0/msvc2017_64/lib/cmake/Qt5DBus/Qt5DBusMacros.cmake :80

string(TOLOWER ${_basename} _basename)

u3d-community/U3D cmake/Urho3D.cmake :54

string (TOLOWER ${URHO3D_TARGET} URHO3D_TARGET_LOWER)

o3de/o3de cmake/LYTestWrappers.cmake :467

string(TOLOWER "${ly_add_googlebenchmark_OUTPUT_FILE_FORMAT}" output_file_format_lower)

bambulab/BambuStudio cmake/modules/FindPackageHandleStandardArgs_SLIC3R.cmake :230

string(TOLOWER ${_NAME} _NAME_LOWER)

harfang3d/harfang3d CMakeLists.txt :230

string(TOLOWER ${CMAKE_SYSTEM_NAME} HG_TARGET_PREFIX)

anhttran/3dmm_basic lib/3rdParty/Eigen/CMakeLists.txt :475

string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_tolower)

AlizaMedicalImaging/AlizaMS mdcm/Utilities/mdcmopenjpeg/CMakeLists.txt :67

string(TOLOWER ${PROJECT_NAME} projectname)

kokkos/kokkos cmake/gnu.cmake :2

string(TOLOWER ${full_standard} FULL_LC_STANDARD)

nextcloud/desktop cmake/modules/DeployQt5.cmake :231

string(TOLOWER "${plugin_parent_dir_name}"
plugin_parent_dir_name)

liminchen/OptCuts ext/libigl/external/eigen/CMakeLists.txt :22

string(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type_tolower)

nv-legate/legate src/cmake/Modules/find_or_configure.cmake :107

string(TOLOWER "${_LEGATE_FOC_PACKAGE}" _LEGATE_FOC_PACKAGE_LOWER)

MultiMC/Launcher cmake/BundleUtilities.cmake :497

string(TOLOWER "${resolved_item}" resolved_item_compare)

PrismLauncher/PrismLauncher cmake/vcpkg-ports/vcpkg-tool-meson/vcpkg_configure_meson.cmake :249

string(TOLOWER "${VCPKG_CMAKE_SYSTEM_NAME}" meson_system_name)

SsageParuders/Android_Native_Surface my_android_opencv/cmake/OpenCVCompilerOptimizations.cmake :867

string(TOLOWER "${OPT}" OPT_LOWER)

NVIDIA/MatX cmake/rapids-cmake/rapids-cmake/export/write_dependencies.cmake :49

string(TOLOWER ${type} type)

Kitware/ParaView ThirdParty/protobuf/vtkprotobuf/cmake/protobuf-function.cmake :26

string(TOLOWER ${protobuf_generate_LANGUAGE} protobuf_generate_LANGUAGE)

awawa-dev/HyperHDR CMakeLists.txt :260

STRING ( TOLOWER "${ARM_MODEL}" ARM_MODEL)

SimVascular/SimVascular Code/CMake/SimVascularSystemSetup.cmake :155

string(TOLOWER "${CMAKE_SYSTEM_NAME}" _kernel_lower)

GoSSIP-SJTU/TripleDoggy cmake/config-ix.cmake :362

string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH)

opensim-org/opensim-core cmake/OpenSimMacros.cmake :272

string(TOLOWER "${OSIMADDLIB_KIT}" OSIMADDLIB_LKIT)

root-project/root interpreter/llvm-project/llvm/cmake/modules/LLVM-Build.cmake :52

string(TOLOWER ${llvmbuild_libname} llvmbuild_libname)

facebookincubator/velox CMake/ResolveDependency.cmake :41

string(TOLOWER ${dependency_name} dependency_name_lower)

Slicer/Slicer CMake/ExternalData.cmake :548

string(TOLOWER ".${algo}" ext)

google/filament build/toolchain-x86_64-linux-android.cmake :31

string(TOLOWER ${CMAKE_HOST_SYSTEM_NAME} HOST_NAME_L)

percona/percona-xtrabackup extra/curl/curl-8.9.1/CMakeLists.txt :1211

string(TOLOWER "${OUTPUT}" HAVE_WIN32_WINNT)

seladb/PcapPlusPlus CMakeLists.txt :481

string(TOLOWER ${CMAKE_BUILD_TYPE} BUILD_TYPE_LOWER)

mysql/mysql-server extra/curl/curl-8.14.1/CMakeLists.txt :235

string(TOLOWER "${CURL_TEST_OUTPUT}" HAVE_WIN32_WINNT)

OSVR/OSVR-Core vendor/eigen/CMakeLists.txt :495

string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_tolower)

infiniflow/infinity third_party/curl/CMakeLists.txt :181

string(TOLOWER "${CURL_TEST_OUTPUT}" HAVE_WIN32_WINNT)

d1vanov/quentier cmake/modules/sanitizers/sanitize-helpers.cmake :121

string(TOLOWER ${PREFIX} PREFIX_lower)

KhronosGroup/SPIRV-LLVM cmake/config-ix.cmake :339

string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH)

BioMedIA/MIRTK CMake/Basis/CommonTools.cmake :1365

string (TOLOWER "${STR}" L)

btccom/btcpool-ABANDONED cmake/Modules/FindPackageHandleStandardArgs.cmake :225

string(TOLOWER ${_NAME} _NAME_LOWER)

qt/qtbase cmake/QtBuildRepoHelpers.cmake :650

string(TOLOWER "${PROJECT_NAME}" __qt_repo_project_name_lowercase)

mmp/pbrt-v4 cmake/sanitize-helpers.cmake :121

string(TOLOWER ${PREFIX} PREFIX_lower)

rbfx/rbfx CMake/Modules/UrhoOptions.cmake :100

string(TOLOWER "${CMAKE_GENERATOR_PLATFORM}" CMAKE_GENERATOR_PLATFORM)

logicalclocks/rondb extra/curl/curl-8.11.1/CMakeLists.txt :208

string(TOLOWER "${CURL_TEST_OUTPUT}" HAVE_WIN32_WINNT)

transmission/transmission tests/gtest/CMakeLists.txt :7

string(TOLOWER "${CACHE_ID}" CACHE_ID)

chsl/PLADE code/3rd_party/pcl-1.8.1/cmake/Modules/FindGTSAM.cmake :39

string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_suffix)

intel/systemc-compiler systemc/CMakeLists.txt :397

string (TOLOWER "${CMAKE_SYSTEM_NAME}${CMAKE_PROCESSOR_NAME}" _TARGET_ARCH)

Slicer/SlicerGitSVNArchive Extensions/CMake/SlicerExtensionsDashboardDriverScript.cmake :229

string(TOLOWER ${ORGANIZATION} ORGANIZATION_LC)

Studio3T/robomongo cmake/RobomongoPrintUtils.cmake :25

string(TOLOWER "${regex}" lc_regex)

INET-RC/GeoMX 3rdparty/openmp/runtime/cmake/LibompUtils.cmake :122

string(TOLOWER "${${var}}" var_lower)

facebook/mysql-5.6 cmake/add_custom_target.cmake :49

STRING(TOLOWER "${TARGET_NAME}" target_name)

polardb/polardbx-engine cmake/package_name.cmake :144

STRING(TOLOWER ${package_name} package_name)

eric612/Caffe-YOLOv3-Windows cmake/CaffeGetPrerequisites.cmake :238

string(TOLOWER "${file_ov}" file_ov)

JoshuaSenouf/gl-engine api/assimp/CMakeLists.txt :313

string(TOLOWER ${CPACK_DEBIAN_DISTRIBUTION_NAME} CPACK_DEBIAN_DISTRIBUTION_NAME)

ipsilon/evmone cmake/cable/CablePackage.cmake :27

string(TOLOWER ${CMAKE_SYSTEM_NAME} system_name)

fastogt/fastotv CMakeLists.txt :56

STRING(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWERCASE)

arrayfire/forge src/backend/CMakeLists.txt :4

string(TOLOWER ${PROJECT_NAME} BkndTargetName)

ckb-next/ckb-next cmake/modules/sanitizers/sanitize-helpers.cmake :121

string(TOLOWER ${PREFIX} PREFIX_lower)

trilinos/Trilinos cmake/tribits/dashboard_driver/TribitsDriverDashboard.cmake :109

string(TOLOWER "$ENV{COMPUTERNAME}" CTEST_SITE)

joachimBurket/esp32-opencv cmake/OpenCVModule.cmake :512

string(TOLOWER "${d}" upper_d)

Cocos-BCX/cocos-mainnet libraries/fc/CMakeModules/ArgumentParser.cmake :31

STRING( TOLOWER ${list_itr} lower )

doxygen/doxygen cmake/Sanitizers/sanitize-helpers.cmake :35

string(TOLOWER "${FILE_EXT}" FILE_EXT)

eigenteam/eigen-git-mirror CMakeLists.txt :539

string(TOLOWER "${CMAKE_GENERATOR}" cmake_generator_tolower)

syoyo/tinydng cmake/sanitizers/sanitize-helpers.cmake :35

string(TOLOWER "${FILE_EXT}" FILE_EXT)

feedzai/fairgbm cmake/Sanitizer.cmake :55

string(TOLOWER ${_san} _san)

percona/percona-xtradb-cluster extra/curl/curl-8.12.1/CMakeLists.txt :229

string(TOLOWER "${CURL_TEST_OUTPUT}" HAVE_WIN32_WINNT)

equalitie/ouinet cmake/dependencies/inline-openssl/OpenSSLConfigVersion.cmake :18

string(TOLOWER "${CMAKE_MATCH_6}" tweak_lower)

MITK/MITK CMake/BundleUtilities.cmake :652

string(TOLOWER "${${targetkey}_RESOLVED_EMBEDDED_ITEM}" resolved_embedded_item_compare)

isledecomp/isle-portable CMakeLists.txt :776

string(TOLOWER "${ISLE_CPUS_STRING}" ISLE_CPUS_STRING)

Ravbug/UnityHubNative wxWidgets/build/cmake/init.cmake :168

string(TOLOWER ${CMAKE_GENERATOR_PLATFORM} wxPLATFORM_ARCH)

glKarin/com.n0n3m4.diii4a Q3E/src/main/jni/deplibs/curl/CMakeLists.txt :1096

string(TOLOWER "${OUTPUT}" HAVE_WIN32_WINNT)

Lewuathe/mlir-hello thirdparty/llvm-project/compiler-rt/test/gwp_asan/CMakeLists.txt :28

string(TOLOWER "-${arch}" GWP_ASAN_TEST_CONFIG_SUFFIX)

o2e/OLLVM-9.0.1 cmake/platforms/WinMsvc.cmake :151

string(TOLOWER "${ext}" lowercase_ext)

Kitware/VTK ThirdParty/expat/vtkexpat/CMakeLists.txt :610

string(TOLOWER "${_build_type}" _build_type_lower)

Geant4/geant4 source/externals/ptl/cmake/Modules/Documentation.cmake :77

string(TOLOWER _graph_type_desc ${_graph_type})

ViewTouch/viewtouch external/catch2/extras/ParseAndAddCatchTests.cmake :170

string(TOLOWER "${Tags}" Tags)

biometrics/openbr 3rdparty/eigen-3.3.9/cmake/FindBLAS.cmake :88

string(TOLOWER ${_libname} libname)

ADVRHumanoids/OpenSoT external/soth-ext/cmake/base.cmake :208

STRING(TOLOWER "${CMAKE_BUILD_TYPE}" cmake_build_type)

tomahawk-player/tomahawk CMakeLists.txt :43

STRING(TOLOWER "${TOMAHAWK_TARGET_NAME}" TOMAHAWK_BASE_TARGET_NAME)

MRPT/mrpt cmakemodules/FindSuiteSparse.cmake :133

string(TOLOWER ${suitesparseComp} suitesparseCompLC)

htcondor/htcondor externals/bundles/openssl/packaged/CMakeLists.txt :33

string(TOLOWER "${SYS_ARCH}" LIBRESSL_ARCH)

percona/percona-server extra/curl/curl-8.14.1/CMakeLists.txt :235

string(TOLOWER "${CURL_TEST_OUTPUT}" HAVE_WIN32_WINNT)

mutationpp/Mutationpp thirdparty/eigen/cmake/EigenTesting.cmake :450

string(TOLOWER ${TMP_BUILD_STRING} BUILDNAME)

prusa3d/Prusa-Firmware-Buddy lib/libbgcode/CMakeLists.txt :179

string(TOLOWER ${_comp} _comp_lower)

rose-compiler/rose cmake/modules/FindKDE4Internal.cmake :529

string(TOLOWER "${adir}" _adir)

bouffalolab/bouffalo_sdk components/wireless/thread/openthread_port/CMakeLists.txt :4

string(TOLOWER "${CHIP}" lower_case_chip)

OpenMathLib/OpenBLAS driver/level3/CMakeLists.txt :147

string(TOLOWER ${gemm_define} gemm_define_LC)

AVSystem/Anjay CMakeLists.txt :185

string(TOLOWER "${DTLS_BACKEND}" _DTLS_BACKEND_LOWERCASE)

nfs-ganesha/nfs-ganesha src/cmake/modules/sanitize-helpers.cmake :30

string(TOLOWER "${FILE_EXT}" FILE_EXT)

fluent/fluent-bit cmake/sanitizers-cmake/cmake/sanitize-helpers.cmake :130

string(TOLOWER ${PREFIX} PREFIX_lower)

FreeRDP/FreeRDP CMakeCPack.cmake :35

string(TOLOWER ${CMAKE_PROJECT_NAME} CMAKE_PROJECT_NAME_lower)

FluidSynth/fluidsynth cmake_admin/FluidUnitTest.cmake :80

string( TOLOWER "${ARGV1}" _LANGEXT )

hpmicro/hpm_sdk components/camera/CMakeLists.txt :5

string(TOLOWER ${CONFIG_CAMERA} CONFIG_CAMERA_LOWER)

divideconcept/FluidLite CMakeLists.txt :17

string(TOLOWER "${CMAKE_BUILD_TYPE}" LOWERCASE_BUILD_TYPE)

TOMB5/TOMB5 CMAKE/FindPackageHandleStandardArgs.cmake :224

string(TOLOWER ${_NAME} _NAME_LOWER)

skylersaleh/SkyEmu src/curl/CMakeLists.txt :1085

string(TOLOWER "${OUTPUT}" HAVE_WIN32_WINNT)

Interrupt/systemshock externals/sanitizers/sanitizers/cmake/sanitize-helpers.cmake :28

string(TOLOWER "${FILE_EXT}" FILE_EXT)

AXErunners/axe src/dashbls/depends/relic/src/CMakeLists.txt :9

string(TOLOWER ${INHERIT} INHERIT_PATH)

Telosnex/fllama macos/llama.cpp/ggml/src/ggml-cann/CMakeLists.txt :27

string(TOLOWER ${SOC_TYPE} SOC_VERSION)

GANGE666/xVMP src/runtimes/CMakeLists.txt :237

string(TOLOWER "${item}" item_lower)

SmartThingsCommunity/st-device-sdk-c test/framework/cmocka/tests/CMakeLists.txt :5

string(TOLOWER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE_LOWER)

merzlab/QUICK cmake/3rdPartyTools.cmake :851

string(TOLOWER ${TOOL} TOOL_LOWERCASE)

cloudflare/doom-wasm CMakeLists.txt :59

string(TOLOWER "${PACKAGE_SHORTNAME}" PROGRAM_SPREFIX)

eclipse-cyclonedds/cyclonedds cmake/Modules/Findcodecov.cmake :162

string(TOLOWER "${FILE_EXT}" FILE_EXT)

GenericMappingTools/gmt cmake/modules/CreateDebugSym.cmake :24

string(TOLOWER ${CMAKE_BUILD_TYPE} _build_type)