标签:make end -bash col shu www 使用场景 ref for
CMAKE option选项
cmake入门:
http://linghutf.github.io/2016/06/16/cmake/
cmake option讲解:
使用场景 : 编译脚本传递参数 -> CMake脚本接收option -> 源代码宏
#!/bin/sh cmake -DTEST_DEBUG=ON . cmake --build .
1 project(test) 2 3 option(TEST_DEBUG "option for debug" OFF) 4 if (TEST_DEBUG) 5 add_definitions(-DTEST_DEBUG) 6 endif()
1 #include "test.h" 2 3 #ifdef TEST_DEBUG 4 ... 5 #endif
标签:make end -bash col shu www 使用场景 ref for
原文地址:https://www.cnblogs.com/wangqiwen-jer/p/11955900.html