码迷,mamicode.com
首页 > 其他好文 > 详细

mcstructs使用CMake生成Makefile文件

时间:2014-12-16 23:57:24      阅读:337      评论:0      收藏:0      [点我收藏+]

标签:style   blog   ar   io   color   使用   sp   for   on   

 

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.2
-- The CXX compiler identification is GNU 4.8.2
-- 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
[ 33%] Building C object CMakeFiles/mcstructs.dir/src/main.c.o
[ 66%] Building C object CMakeFiles/mcstructs.dir/src/mcslist.c.o
[100%] Building C object CMakeFiles/mcstructs.dir/src/mcsringbuf.c.o
Linking C executable mcstructs
[100%] 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:2643, 0xbfed9dc0) => header(0x0804c040)
mcs_list_add_item_by_key n5(KEY:642, 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:2643(0xbfed9d6c) => header(0x0804c040)
mcs_list_delete_item ERROR:-3
TEST: Micro C Structs list end.
merlin@tfAnalysis:~/projects/mcstructs$ 

 

mcstructs使用CMake生成Makefile文件

标签:style   blog   ar   io   color   使用   sp   for   on   

原文地址:http://www.cnblogs.com/tfanalysis/p/4168228.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!