cmake
文章平均质量分 64
alex_mianmian
这个作者很懒,什么都没留下…
展开
-
CMAKE TIPs
1. How to avoid CMAKE check default compilerCMAKE will check default compiler when start CMAKE.If you have CC,CXX in environment variable, CMAKE will use CC,CXX to compile a simple code.But some compiler can't pass this test.So we need find a way t原创 2022-05-02 15:33:28 · 306 阅读 · 0 评论 -
CMAKE tips(link error of --major-image-version) on Windows
One issue I got is link flag was not know by linker ld.exe:The solution is setCMAKE_SYSTEM_NAME to Generic on the top of CMakelist.txt as:If you put line 3 after your project(xxx), it doesn't help you to fix this issue.原创 2021-06-23 09:18:08 · 2020 阅读 · 0 评论 -
Link a static library‘s all sections
Suppose I build a static library "mylib.a" which has many sections. one section is called ".my_test" and I put some structure in it.Suppose My main() function call some functions in the library.However, no functions directly access the structure in se.原创 2020-10-28 21:07:28 · 137 阅读 · 0 评论 -
CMAKE notes
1. How to set relative path to a variableHere is the folder struct. We run cmake in 'folder_cmake' and we hope to use something in 'my_folder'. /folder_top/folder_level1/folder_cmake /folder_top/my_folderSET(my_variable ${CMAKE_CURRENT_SOU...原创 2020-09-03 15:59:50 · 123 阅读 · 0 评论