首页 > 其他分享 >cmake get_filename_component

cmake get_filename_component

时间:2023-04-04 10:25:18浏览次数:41  
标签:cmake name get component filename File directory

get_filename_component(<var> <FileName> <mode> [BASE_DIR <dir>]
  • var : outputValue
  • FileName: inputValue

mode

DIRECTORY = Directory without file name
NAME      = File name without directory
EXT       = File name longest extension (.b.c from d/a.b.c)
NAME_WE   = File name with neither the directory nor the longest extension
LAST_EXT  = File name last extension (.c from d/a.b.c)
NAME_WLE  = File name with neither the directory nor the last extension
PATH      = Legacy alias for DIRECTORY (use for CMake <= 2.8.11)
ABSOLUTE  = Full path to file
REALPATH  = Full path to existing file with symlinks resolved

BASE_DIR

If no base directory is provided, the default base directory will be CMAKE_CURRENT_SOURCE_DIR.

result

Paths are returned with forward slashes and have no trailing slashes.

example

get_filename_component(outputResult "${inputPath}" PATH ABSOLUTE)

标签:cmake,name,get,component,filename,File,directory
From: https://www.cnblogs.com/Searchor/p/17285518.html

相关文章

  • IDEA Spring-boot 使用@Component注解的工具类,用@Autowired注入 @Service或者@Reposit
    IDEASpring-boot使用@Component注解的工具类,用@Autowired注入@Service或者@Repository会空指针(使用@PostContruct)原文链接:https://blog.csdn.net/ld_secret/article/details/104627597/使用idea编译器时,对于spring-boot的项目,大都使用注解,那么:一、现象:@Component标注的U......
  • CMake 使用环境变量
    为了传播性考虑,使用CMake编译工程时,有一些路径需要能方便地在新机器上更改,这就需要使用“环境变量”。调用环境变量,在文件管理器中是用“%NAME%”,在VisualStudio中则是"${NAME}"。在CMake中是“$(NAME)”,像这样: ......
  • cmake CMAKE_BUILD_TYPE
    https://stackoverflow.com/questions/24460486/cmake-build-type-is-not-being-used-in-cmakelists-txtTherearetwotypesofgenerators:single-configurationsandmulti-configurations.1.SingleconfigurationsMake-likegenerators:UnixMakefiles,NMakeMakef......
  • cmake xcode
    1.generateprojectcmake..-GXcodeerror:error:NoCMAKE_C_COMPILERcouldbefound.solu:IfyouhaveinstalledXcodeorCommandLineToolsforXcode,trythis:sudoxcode-select--reset......
  • Unknown custom element: <el-empty> - did you register the component correctly? For
     报错原因:“el-empty”未注册解决:element版本太低了,当前版本里面查找不到el-enpty这个组件,需要重新安装一下element的版本。[email protected]@2.15.6-S重新运行,上面的问题就解决了。......
  • Cmake
    1.GenerateaProjectBuildsystemcmake[<options>]<path-to-source>cmake[<options>]<path-to-existing-build>cmake[<options>]-S<path-to-source>-B<path-to-build>2.BuidaProjectcmake--build<dir&g......
  • 初见 cmake
    初见cmakecmake是自动生成构建系统的一个工具。cmake本身不是构建系统,它是一个生成构建系统的工具。或者说cmake不是一个构建工具,是一个能根据平台生成对应平台构建系统配置的构建工具。Cmake构建系统Unix平台的最常见的C/C++构建工具make,根据Makefile编译项目。而......
  • 第二十二篇 vue - 深入组件 - 异步组件 - defineAsyncComponent
    基本用法defineAsyncComponent在大型项目中,我们可能需要拆分应用为更小的块,并仅在需要时再从服务器加载相关组件。Vue提供了defineAsyncComponent方法来实现此功能import{defineAsyncComponent}from'vue'constAsyncComp=defineAsyncComponent(()=>{returnn......
  • 第二十八篇 vue - 深入组件 - 动态组件 - component
    component动态组件就是动态变化的组件,和动态样式一样,通过用户的操作来确定是什么类型的组件。动态样式是绑定:style,动态组件则是绑定:is在vue中,实现Tab切换主要有三种方式:使用动态组件,使用vue-router路由,使用第三方插件。本文将详细介绍Vue动态组件所谓动态组件就是让多......
  • encodeURI()、encodeURIComponent()区别及使用场景
    一、URLURL是使用ASCII进行编码的,所以有些内容是不支持的,例如中文,URL会使用编码的手段将其转义为可解释内容。在URL中,合法字符分成两类。URL元字符:分号(;),逗号(,),斜杠(/),问号(?),冒号(:),at(@),&,等号(=),加号(+),美元符号($),井号(#) 语义字符:a-z,A-Z,0-9,连词号(-),下划线(_),点(.),感叹号(!),波浪......