五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

cmake

2023-03-21 10:52 作者:米諾斯人  | 我要投稿

|CMAKE_SOURCE_DIR |The root source directory

|CMAKE_CURRENT_SOURCE_DIR |The current source directory if using
sub-projects and directories.

|PROJECT_SOURCE_DIR |The source directory of the current cmake project.

|CMAKE_BINARY_DIR |The root binary / build directory. This is the
directory where you ran the cmake command.

|CMAKE_CURRENT_BINARY_DIR |The build directory you are currently in.

|PROJECT_BINARY_DIR |The build directory for the current project.

—————————————————————————————————————————

file(GLOB SOURCES ${PROJECT_SOURCE_DIR}/src/*.cpp)????//file代替set添加變量

target_include_directories(hello_library
PUBLIC
${PROJECT_SOURCE_DIR}/include
)

include目錄下有headers或者h(yuǎn)eader_dir/headers(用作namespace)

  • +PRIVATE+ - the directory is added to this target's include directories:庫(kù)的src.cc自己gcc -I headers_include_path

  • +INTERFACE+ - the directory is added to the include directories for any targets that link this library. :任何link這個(gè)庫(kù)的編譯單元(如main.cc) gcc -I headers_include_path

  • +PUBLIC+ - As above, it is included in this library and also any targets that link this library. :上面兩條取并集


For public headers it is often a good idea to have your include folder be "namespaced"
with sub-directories.

The directory passed to +target_include_directories+ will be the root of your
include directory tree and your C++ files should include the path from there to your header.

For this example you can see that we do it as follows:
[source,cpp]


include "static/Hello.h"

static是include下一個(gè)目錄。用目錄的方式實(shí)現(xiàn)namespace


動(dòng)態(tài)庫(kù)區(qū)別不是很大,把static換成shared

add_library(hello::library ALIAS hello_library)

hello::libary是hello_library的引用別名。

——————————————————以上為lib和基礎(chǔ)編譯部分——————

————————————————



cmake的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
文昌市| 鸡西市| 商都县| 千阳县| 东海县| 公主岭市| 苏尼特左旗| 监利县| 兰考县| 九江市| 吉安县| 缙云县| 鄂州市| 塔河县| 河北省| 陇南市| 比如县| 广水市| 大石桥市| 中宁县| 德阳市| 六安市| 大港区| 眉山市| 青岛市| 新绛县| 思南县| 涟水县| 桓台县| 呼图壁县| 宜城市| 元江| 台中市| 淮安市| 铜陵市| 万山特区| 长春市| 育儿| 修文县| 兴隆县| 九江市|