随笔分类 -  Cmake

摘要:https://stackoverflow.com/questions/44284275/passing-compiler-options-in-cmake-command-line Command line options like CMAKE_C_FLAGS and CMAKE_CXX_FLAG 阅读全文
posted @ 2023-05-13 10:58 fndefbwefsowpvqfx
摘要:CMAKE_EXE_LINKER_FLAGS CMAKE_MODULE_LINKER_FLAGS CMAKE_SHARED_LINKER_FLAGS CMAKE_STATIC_LINKER_FLAGS https://cmake.org/cmake/help/latest/command/targe 阅读全文
posted @ 2023-05-07 12:45 fndefbwefsowpvqfx
摘要:NO_DEFAULT_PATH CMAKE_SYSTEM_IGNORE_PATH CMAKE_SYSTEM_PREFIX_PATH CMAKE_SYSTEM_LIBRARY_PATH CMAKE_SYSTEM_INCLUDE_PATH CMAKE_SYSTEM_PROGRAM_PATH New in 阅读全文
posted @ 2023-05-03 22:27 fndefbwefsowpvqfx
摘要:string(CONCAT result ${var1} "/how") string(FIND ${var1} "targetPattern" foundResultIndex) if(${foundResultIndex} GREATER_EQUAL 0 ) endif() string(LEN 阅读全文
posted @ 2023-04-04 10:49 fndefbwefsowpvqfx
摘要:get_filename_component(<var> <FileName> <mode> [BASE_DIR <dir>] var : outputValue FileName: inputValue mode DIRECTORY = Directory without file name NA 阅读全文
posted @ 2023-04-04 10:14 fndefbwefsowpvqfx
摘要:https://stackoverflow.com/questions/31966135/cmake-source-group-not-working-correctly-with-hierarchical-project-setup https://stackoverflow.com/questi 阅读全文
posted @ 2023-04-03 17:32 fndefbwefsowpvqfx
摘要:https://stackoverflow.com/questions/24460486/cmake-build-type-is-not-being-used-in-cmakelists-txt There are two types of generators: single-configurat 阅读全文
posted @ 2023-04-03 15:40 fndefbwefsowpvqfx
摘要:m$ -DCMAKE_BUILD_TYPE=Debug -G "NMake Makefiles" nmake /nologo -f Makefile ninja -DCMAKE_BUILD_TYPE=Debug -G "Ninja" cmake --build . 阅读全文
posted @ 2023-04-03 12:54 fndefbwefsowpvqfx
摘要:function(replaceAllSubs) set(replaced ) set(tail ) math(EXPR tail "${ARGC}-1") foreach( i RANGE 1 ${tail}) set(cur ) list(GET ARGV ${i} cur) string(RE 阅读全文
posted @ 2023-04-03 12:42 fndefbwefsowpvqfx
摘要:cmake .. -DCMAKE_INSTALL_PREFIX=D:/path/x64/release cmake --build . --config Release --target install cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHAR 阅读全文
posted @ 2022-11-30 09:14 fndefbwefsowpvqfx
摘要:New in version 3.5. Enable/Disable output of compile commands during generation. This option is implemented only by Makefile Generators and the Ninja. 阅读全文
posted @ 2021-11-09 18:03 fndefbwefsowpvqfx
摘要:function(addPrefix) set(result ) set(prefix ${ARGV1}) set(lastIndex ) math(EXPR lastIndex "${ARGC}-1") set(item ) set(changed ) foreach(i RANGE 2 ${la 阅读全文
posted @ 2020-12-23 09:59 fndefbwefsowpvqfx
摘要:depName platform win mac linux android ios arch armeabi armeabi-v7a arm64-v8a mips mips64 x86 x86_64 version link static dynamic debug or release othe 阅读全文
posted @ 2020-12-23 09:57 fndefbwefsowpvqfx
摘要:CMAKE_BINARY_DIR ${CMAKE_BINARY_DIR} CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR} CMAKE_CURRENT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} CMAKE_CURRENT_SOURCE_DI 阅读全文
posted @ 2020-12-23 09:33 fndefbwefsowpvqfx
摘要:macro(getDirRelative result curdir) set(result ) set(dirlist ) file(GLOB children RELATIVE ${curdir} ${curdir}/*) foreach(child ${children}) if(IS_DIR 阅读全文
posted @ 2020-12-23 09:31 fndefbwefsowpvqfx
摘要:cmake -S . -B build -G "Visual Studio 16 2019" start ./pname.sln 阅读全文
posted @ 2020-12-22 11:21 fndefbwefsowpvqfx
摘要:使用execute_process 下载依赖包,配置环境等,各种操作。 参数必须要传,不用也要传空 set(getdep1 ${CMAKE_SOURCE_DIR}/clone.sh) execute_process( COMMAND ${getdep1} "" WORKING_DIRECTORY $ 阅读全文
posted @ 2020-12-18 11:27 fndefbwefsowpvqfx
摘要:https://cmake.org/cmake/help/latest/command/cmake_host_system_information.html Query host system specific information. cmake_host_system_information(R 阅读全文
posted @ 2020-12-15 14:28 fndefbwefsowpvqfx
摘要:https://cmake.org/cmake/help/latest/command/function.html Start recording a function for later invocation as a command. function(<name> [<arg1> ...]) 阅读全文
posted @ 2020-12-15 14:26 fndefbwefsowpvqfx
摘要:https://cmake.org/cmake/help/latest/command/math.html Evaluate a mathematical expression. math(EXPR <variable> "<expression>" [OUTPUT_FORMAT <format>] 阅读全文
posted @ 2020-12-15 14:24 fndefbwefsowpvqfx