mcstructs使用CMake生成Makefile文件
CMakeLists.txt
project(MCSTRUCTS)
set(SRC_LIST src/main.c src/mcslist.c src/mcsringbuf.c)
add_executable(mcstructs ${SRC_LIST})
执行过程:
merlin@tfAnalysis:~/projects/mcstructs$ cmake .
-- Configuring done
-- Generating done
-- Build files have been written to: /home/merlin/projects/mcstructs
merlin@tfAnalysis:~/projects/mcstructs$ ls
CMakeLists.txt README.md src
merlin@tfAnalysis:~/projects/mcstructs$ cmake .
-- The C compiler identification is GNU 4.8.
-- The CXX compiler identification is GNU 4.8.
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Configuring done
-- Generating done
-- Build files have been written to: /home/merlin/projects/mcstructs
merlin@tfAnalysis:~/projects/mcstructs$ ls
CMakeCache.txt cmake_install.cmake Makefile src
CMakeFiles CMakeLists.txt README.md
merlin@tfAnalysis:~/projects/mcstructs$ make
Scanning dependencies of target mcstructs
[ %] Building C object CMakeFiles/mcstructs.dir/src/main.c.o
[ %] Building C object CMakeFiles/mcstructs.dir/src/mcslist.c.o
[%] Building C object CMakeFiles/mcstructs.dir/src/mcsringbuf.c.o
Linking C executable mcstructs
[%] Built target mcstructs
merlin@tfAnalysis:~/projects/mcstructs$ ./mcstructs
++++Micro C Structs(mcstructs) Test utils++++
merlin<tfa2012@foxmail.com> TEST: Micro C Structs list add/delete/find functions:
add list header 'header'(0x0804c040)
mcs_list_add_item 'n1'(0xbfed9d78) => 'header'(0x0804c040)
mcs_list_add_item 'n2'(0xbfed9d90) => 'header'(0x0804c040)
mcs_list_add_item 'n3'(0xbfed9da8) => 'header'(0x0804c040)
mcs_list_add_item_by_key 'n4'(KEY:, 0xbfed9dc0) => 'header'(0x0804c040)
mcs_list_add_item_by_key 'n5'(KEY:, 0xbfed9dd8) => 'header'(0x0804c040)
mcs_list_delete_item 'n2'(0xbfed9d90) => 'header'(0x0804c040)
mcs_list_delete_item 'n1'(0xbfed9d78) => 'header'(0x0804c040)
mcs_list_find_item_by_key KEY:(0xbfed9d6c) => 'header'(0x0804c040)
mcs_list_delete_item ERROR:-
TEST: Micro C Structs list end.
merlin@tfAnalysis:~/projects/mcstructs$
mcstructs使用CMake生成Makefile文件的更多相关文章
- cmake利用toolchain.cmake生成makefile之后,make生成静态库失败问题
问题描述 利用toolchian.cmake设置好编译器后,利用make指令生成静态库,出现以下问题 Error running link command: No such file or direc ...
- 利用 autoconf 和 automake 生成 Makefile 文件
一.相关概念的介绍 什么是 Makefile?怎么书写 Makefile?竟然有工具可以自动生成 Makefile?怎么生成啊?开始的时候,我有这么多疑问,所以,必须得先把基本的概念搞个清楚. 1.M ...
- linux下使用automake工具自动生成makefile文件
linux环境下,当项目工程很大的时候,编译的过程很复杂,所以需要使用make工具,自动进行编译安装,但是手写makefile文件比较复杂,所幸在GNU的计划中,设计出了一种叫做Autoconf/Au ...
- 使用automake等命令自动生成Makefile文件 (转载)
使用automake等命令自动生成Makefile文件 Linux下编程时,为了方便编译,往往使用Makefile文件自动完成编译,但是Makefile文件本身的书写十分复杂,规则很多.好在Lin ...
- 利用qmake生成Makefile文件
在linux下写程序,免不了要写Makefile文件,用automake,总感觉比较麻烦,linux人喜欢做麻烦的事,以显得风格迥异. 其实用qmake生成Makefile文件相当简单. 1 装好qm ...
- 例解 autoconf 和 automake 生成 Makefile 文件
本文介绍了在 linux 系统中,通过 Gnu autoconf 和 automake 生成 Makefile 的方法.主要探讨了生成 Makefile 的来龙去脉及其机理,接着详细介绍了配置 Con ...
- 使用autoconf和automake生成Makefile文件(转)
Makefile好难写 曾经也总结了一篇关于Makefile的文章<make和makefile的简单学习>.但是,总结完以后,发现写Makefile真的是一件非常痛苦的事情,的确非常痛苦. ...
- 自动生成Makefile文件
主要的工具有autoscan, aclocal, autoheader, autoconfig,automake 1 .创建c源文件hello.c #include <stdio.h> i ...
- 生成makefile文件编译源文件
1.利用CodeBlock的cbp文件生成makefile文件 reverse@ubuntu:~/Desktop/CreateMakeFile$ ls cbp2make.linux-x86 freeg ...
随机推荐
- 网络广告公司的恐慌 XSS广告终结者(html5新特性)
人们在平时网络冲浪的时候,有时候会发现当前网站有很多莫名其妙的广告,这些广告会被导向到站外. 这些广告可能是你安装了一些免费网络软件后强制安装的浏览器插件导致的. 譬如chrome浏览器:
- 手把手教你如何加入到github的开源世界! (转)
我曾经一直想加入到开源项目中,但是因为没有人指导流程,网上看了很多,基本都是说了个大概,如果你也是一个初出茅庐的人,那么,我将以自己提交的一次开源代码为例,教会你步入开源的世界. 1,首先登陆到htt ...
- JNDI-j2ee
Database Connection Pool (DBCP) Configurations The default database connection pool implementation i ...
- struts2跳转类型解析
struts 2 跳转类型 1.dispatcher dispatcher 为默认跳转类型.用于返回一个视图资源 xml代码 : <result name="success" ...
- [ACM] poj 1088 滑雪 (内存搜索DFS)
滑雪 Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 73409 Accepted: 27141 Description ...
- COM-TEAM
- Cocos2d-x 文本渲染
文本渲染: CCLabelAtlas.CCLabelBMFont.CCLabelTTF类都是继承 CCLabelProtocol类,即能够使用系统字,也能够自己定义渲染字体. CCLabelAtla ...
- iOS开发- 拨打电话总结
关于iOS应用拨打电话, 我所知道的有3种办法, 详细例如以下: 一.利用openURL(tel) 特点: 直接拨打, 不弹出提示. 而且, 拨打完以后, 留在通讯录中, 不返回到原来的应用. //拨 ...
- sscanf()函数的用法
来自:http://blog.csdn.net/tigerjibo/article/details/6442151 sscanf 名称: sscanf() - 从一个字符串中读进与指定格式相符的数据. ...
- Same binary weight (位运算)
题目描述 The binary weight of a positive integer is the number of 1's in its binary representation.for ...