首页 > 其他分享 >Tool-CMake-list

Tool-CMake-list

时间:2023-04-29 14:33:17浏览次数:42  
标签:CMake viewer Tool list sources cpp message

Tool-CMake-list

https://www.visgraf.impa.br/seminar/slides/rodlima_cmake_presentation.pdf

  • Useful to manage long list of elements
  • Elements can be manipulated depending on running platform
    • Useful for source file lists
  • Example:
set(sources viewer.cpp config.cpp)
if(WIN32)
list(APPEND sources viewer_mfc.cpp)
elseif(UNIX)
list(APPEND sources viewer_gtk.cpp)
else
message(FATAL “Platform not supported”)
endif()
add_executable(viewer ${sources})
list(LENGTH sources srclen)
message(“${srclen} source files”)
foreach(src ${sources})
message(“Source: ${src}”)
endforeach()

标签:CMake,viewer,Tool,list,sources,cpp,message
From: https://www.cnblogs.com/yongchao/p/17363956.html

相关文章

  • Tool-CMake-Own Finder(-I -L -l)-compiling
    Tool-CMake-OwnFinder(-I-L-l)-compilingWhatisafinderWhencompilingapieceofsoftwarewhichlinkstothird­partylibraries,weneedtoknow:Wheretofindthe.hfiles(­Iingcc)Wheretofindthelibraries(.so/.dll/.lib/.dylib/...)(­Lingcc......
  • Tool-CMake-OPTION
    Tool-CMake-OPTIONhttps://clubjuggler.livejournal.com/138364.htmlincludesacomponentAsanexample,consideraprojectthatoptionallyincludesacomponentthatcommuniatesviaUSBandallowstheuser,atcompiletime,tospecifywhethertoincludeth......
  • Tool-CMake-How CMake simplifies the build process by Bruno Abinader
    Tool-CMake-HowCMakesimplifiesthebuildprocessbyBrunoAbinaderhttps://gitlab.kitware.com/cmake/community/-/wikis/homehttps://brunoabinader.github.io/2009/12/07/how-cmake-simplifies-the-build-process-part-1-basic-build-system/https://brunoabin......
  • ubuntu安装VMware tools
    以下是在Ubuntu上安装VMwareTools的步骤:代码操作打开VMware虚拟机并进入虚拟机控制台。单击菜单栏的“VM”菜单,选择“InstallVMwareTools”。在弹出窗口中选择“DownloadandInstall”(下载并安装)。在Ubuntu中使用管理员权限打开终端。在终端中输入以下命令,以自动将VMwareTools......
  • MFC-SetImageList给列表视图控件设置图像列表
     CImageList*pImageList;HBITMAPhbmp1;CBitmap*pBitmap1;HBITMAPhbmp2;CBitmap*pBitmap2;HBITMAPhbmp3;CBitmap*pBitmap3;HBITMAPhbmp4;CBitmap*pBitmap4; pImageList=newCImageList();//创建一个CImageList类的指针变量pImageList->Cr......
  • Tool-CMake-A Simple CMake Example
    Tool-CMake-ASimpleCMakeExamplehttps://cmake.org/examples/Therearethreedirectoriesinvolved.Thetopleveldirectoryhastwosubdirectoriescalled./Demoand./Hello.Inthedirectory./Hello,alibraryisbuilt.Inthedirectory./Demo,anexecuta......
  • MFC-CListCtrl-InsertItem插入一行(一项)
     方式一inti1=mylist4.InsertItem(0,_T("李明"));//插入一行(一项)/*参数1:intnItem行的索引参数2:LPCTSTRlpszItem控件头的名字返回值:行号四种风格都可以*/     ......
  • MFC-CListCtrl-InsertColumn报告模式下插入一列
     inti=mylist4.InsertColumn(0,_T("姓名"),LVCFMT_CENTER,70,-1);//在报告模式下插入一列/*参数1:intnCol要插入列的列号参数2:LPCTSTRlpszColumnHeading字符串地址参数3:intnFormat=LVCFMT_LEFT指定列对齐方式的整数,缺省值是左对齐。......
  • 深入探讨源码--ArrayList
    持续推送技术干货目录深入探讨源码之ArrayListArrayList类图ArrayList的数据结构ArrayList的关键属性ArrayList构造方法ArrayList常用方法add方法ArrayList中的fast-fail机制add(i,o)方法set(i,o)方法get(i)方法remove(index)方法remove(Object)方法clear方法indexOf(o)方法深......
  • vector,list,deque,set,map of STL
    List封装了链表,Vector封装了数组,list和vector得最主要的区别在于vector使用连续内存存储的,他支持[]运算符,而list是以链表形式实现的,不支持[]。Vector对于随机访问的速度很快,但是对于插入尤其是在头部插入元素速度很慢,在尾部插入速度很快。List对于随机访问速度慢得多,因为可能要......