cmake

Is it possible to compile & link Clang/LLVM using the gold linker?

半腔热情 提交于 2020-01-24 05:42:05
问题 I'm writing a custom pass for LLVM/Clang, and recompiling tends to take a while and use a lot of memory. I've heard that the gold linker (1) takes less time and (2) uses less memory than the standard ld linker. Is there a way to pass flags into the LLVM/Clang build process and change to the gold linker? As per this answer, I've been attempting to use an override file, but I don't seem to be having a lot of success. I'll also note that I'm compiling the latest Clang/LLVM build (4.0) using

How to tell CMAKE to download some necessary header files (more precisely GLM math library) WITHOUT TRYING TO COMPILE THEM?

坚强是说给别人听的谎言 提交于 2020-01-24 03:20:07
问题 I am setting up a CMAKE project that uses a lot of ExternalProjects . To build one of them (CEGUI), I need to download the GLM (OpenGL Math Library) . This Library is include only library , which means that you mustn't compile it. There are some test that can be compiled but there is no need for them in my project (moreover, one of them do not compile properly and breaks the compiling chain). What I would like, is to find a way to tell CMAKE to only download the project (GIT update etc) like

QArrayData error, linking Qt libraries with CMake

邮差的信 提交于 2020-01-24 01:19:12
问题 What I've been trying to do is to link Qt libraries to my project with CMake. I would use CMake GUI to generate MakeFile and then run MinGW32-make on it, which would give me '[File Name].exe' as intended. However, whenever I run the executable file, I get a message saying: "The procedure entry point _ZN10QArrayData10deallocateEPS_jj could not be located in the dynamic link library etc." https://i.stack.imgur.com/JpdwK.jpg I initially built this software using Qt Creator and QMake, so I can

Using Pre-built Shared Library in Android Studio

让人想犯罪 __ 提交于 2020-01-24 00:44:12
问题 I need to use a custom prebuilt shared library (built on standalone ndk as libdynamic.so) in my android project. I created a folder "jniLibs" in path src/main and then 4 folders inside that namely "armeabi" "armeabi-v7a" "x86" "x86_64". I have put the prebuilt library inside all these 4 folders. Now from my native code I want to call a function of this library. In the following way (included header in cmakelists.txt): extern "C" JNIEXPORT jstring JNICALL Java_demo_co_ru_jnilibtest

How to split strings across multiple lines in CMake?

为君一笑 提交于 2020-01-23 16:40:48
问题 I usually have a policy in my project, to never create lines in text files that exceed a line length of 80, so they are easily editable in all kinds of editors (you know the deal). But with CMake I get the problem that I do not know how to split a simple string into multiple lines to avoid one huge line. Consider this basic code: set(MYPROJ_VERSION_MAJOR "1") set(MYPROJ_VERSION_MINOR "0") set(MYPROJ_VERSION_PATCH "0") set(MYPROJ_VERSION_EXTRA "rc1") set(MYPROJ_VERSION "${VERSION_MAJOR}.$

Ubuntu CMake what path to add to CMAKE_MODULE_PATH

我怕爱的太早我们不能终老 提交于 2020-01-23 10:20:27
问题 My OS is Ubuntu. I would like to change from QT4 to QT5 in my project. The native package though is 4.x version in Ubuntu right now. I have downloaded the Linux installer from QT homepage and installed QT5.4 under /opt/Qt/5.4/ This path is not found by find_package (Qt5 REQUIRED) I tried adding set(CMAKE_MODULE_PATH "/opt/QT/5.4;${CMAKE_MODULE_PATH}") to my CMAKELIST.txt but that does not help. Where do I have to link, or am I using the wrong syntax? Some edits after hint with calling: cmake

Hiding multiple implementations behind a single interface

╄→гoц情女王★ 提交于 2020-01-23 08:10:46
问题 I know about the Strategy and Abstract Factory design patterns - however they don't solve my current problem: I'm creating a C++ library that offers a very basic GUI. However I want the user to be able to choose at compile time which GUI library to use (say Qt or FLTK) to actually render the GUI. The user should however only need to know about the methods in my library. It should be possible to compile the same code without any changes using either a Qt backend or an FLTK backend. I thought

Hiding multiple implementations behind a single interface

孤街醉人 提交于 2020-01-23 08:10:05
问题 I know about the Strategy and Abstract Factory design patterns - however they don't solve my current problem: I'm creating a C++ library that offers a very basic GUI. However I want the user to be able to choose at compile time which GUI library to use (say Qt or FLTK) to actually render the GUI. The user should however only need to know about the methods in my library. It should be possible to compile the same code without any changes using either a Qt backend or an FLTK backend. I thought

CS-Study

一曲冷凌霜 提交于 2020-01-23 05:22:02
CS 学习路径 如果你有好的资源,可以在评论中分享给我,我将整理在表格中与大家共享 类型 图书&博客 链接 C++ C++ Primer 5th(中文版) 网盘链接 密码:sasu C++ Primer Plus 6th(中文版) 网盘链接 密码:aeo3 CMake CMake 入门实战 Blog 免责声明 资源来源与网络,如有侵权,请联系本人删除 来源: CSDN 作者: 扎手的苍耳 链接: https://blog.csdn.net/ZWX2445205419/article/details/103929547

CMake 3.8.0 generates wrong link command in makefiles

心不动则不痛 提交于 2020-01-23 02:47:12
问题 Problem: After I run cmake to generate a project with a STATIC library, which completes successfully, both ninja and mingw32-make fail to make their targets at linking. For SHARED libraries or executables this same setup worked fine. I've tried this both for "Ninja" and "MinGW Makefiles" generators: ninja output: [2/2] Linking CXX static library hello_wsl.lib FAILED: hello_wsl.lib cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E remove hello_wsl.lib && "" qc hello_wsl.lib