cmake

Can I prevent auto-run of CMake at startup of Qt Creator 4?

点点圈 提交于 2021-01-29 14:17:52
问题 When I start Qt Creator (4.3) and load a session (or a project already configured), CMake is always run at least once. Even if I disabled the autorun of CMake as said in this answer. The cache is already there because I manually run CMake when needed. How can I make Qt Creator to never run CMake automatically ? 回答1: You can't. Qt Creator 4.3 uses cmake server-mode to get information out of cmake. For that it needs to start cmake, which in turn will need to configure and generate to fetch all

Why my <package>-config.cmake have <package>_include_dir and <package>_librairies empty

非 Y 不嫁゛ 提交于 2021-01-29 14:17:29
问题 I am trying to make a cross-platform CMake for my project (Windows and Linux). I need to use external libraries (yaml-cpp). On Linux, I just had to do an apt get and use find_package . But on Windows, I need to append the CMAKE_MODULE_PATH in order for my program to find the yaml-cpp-config.cmake . So I start by installing yaml-cpp (https://github.com/jbeder/yaml-cpp) with CMake GUI 3.16 and mingw32 ( mingw32-make install ). I have tried the library on a hello world project, and it works fine

LLVM build on Windows: Visual Studio cl.exe skipped

独自空忆成欢 提交于 2021-01-29 14:01:18
问题 I try to build and install the LLVM source on Windows (specifically LLVM-8, but the issue exists on the latest version as well), using Visual Studio 2019 and CMake 3.18.2, following the guide from http://llvm.org/docs/GettingStarted.html#getting-the-source-code-and-building-llvm. The output however looks the same as discussed in Building LLVM using Visual Studio, but the solution did not change anything for me. I ran the following commands: git clone --config core.autocrlf=false https:/

Use Qwt installed via brew in CMake

狂风中的少年 提交于 2021-01-29 13:37:44
问题 I Try to build an application using Qwt with CMake on a MacOS virtual machine. I installed Qt5 and Qwt using brew: brew install qt5 qwt The result is a Qwt framework installation. The header is there: /usr/local/Cellar/qwt/6.1.4/lib/qwt.framework/Versions/6/Headers/qwt.h and the library is here file /usr/local/Cellar/qwt/6.1.4/lib/qwt.framework/qwt /usr/local/Cellar/qwt/6.1.4/lib/qwt.framework/qwt: Mach-O 64-bit dynamically linked shared library x86_64 It is easy to use it during buid with

Set CMAKE_MAKE_PROGRAM to mingw32-make from inside the CMakeLists.txt

血红的双手。 提交于 2021-01-29 13:17:29
问题 Following this post, if I run cmake .. inside my build folder with no options I get the error: CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool. CMake Error: CMAKE_Fortran_COMPILER not set, after EnableLanguage CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred

Visual Studio Code on macOS + Qt + Intellisense

大兔子大兔子 提交于 2021-01-29 13:06:42
问题 Visual Studio Code gets the following error: cannot open source file "QtWidgets/qtwidgetsglobal.h" (dependency of "QApplication")C/C++(1696) I have a CMake project which compiled and built successfully, but it seems that Intellisense doesn't work. I have this directory in a path which contains qtwidgetsglobal.h : /usr/local/Cellar/qt/5.13.1/lib/QtWidgets.framework/Headers And there is another thing: Directory /usr/local/Cellar/qt/5.13.1/lib/QtWidgets.framework contains directory Headers and

Cannot find source file error when running CMake

我只是一个虾纸丫 提交于 2021-01-29 13:00:37
问题 Error from Terminal: ics45c@ics45c-2019fall : ~/projects/proj1 $ ./build app -- Configuring done CMake Error at CMakeLists.txt:49 (add_executable): Cannot find source file: /home/ics45c/projects/proj1/app/.#main.cpp Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp .hxx .in .txx CMake Error: CMake can not determine linker language for target: a.out.gtest CMake Error: Cannot determine link language for target "a.out.gtest". CMake Error: CMake can not determine linker

Undefined reference to. In cmake: lib to lib [duplicate]

眉间皱痕 提交于 2021-01-29 12:53:45
问题 This question already has answers here : What is an undefined reference/unresolved external symbol error and how do I fix it? (34 answers) Closed 1 year ago . Windows 7 x86, cmake version 3.15.2, 4.10 qtcreator, Qt5.12.4 MinGW. I build a project with two libraries, and in one of them I call a class from the other. As a result, I get an error. ...file2.cpp:-1: ошибка: undefined reference to `MyClass1::MyClass1()' collect2.exe:-1: ошибка: error: ld returned 1 exit status [ 91%] Linking CXX

Undefined reference to. In cmake: lib to lib [duplicate]

删除回忆录丶 提交于 2021-01-29 12:25:17
问题 This question already has answers here : What is an undefined reference/unresolved external symbol error and how do I fix it? (34 answers) Closed 1 year ago . Windows 7 x86, cmake version 3.15.2, 4.10 qtcreator, Qt5.12.4 MinGW. I build a project with two libraries, and in one of them I call a class from the other. As a result, I get an error. ...file2.cpp:-1: ошибка: undefined reference to `MyClass1::MyClass1()' collect2.exe:-1: ошибка: error: ld returned 1 exit status [ 91%] Linking CXX

How to know library variable names for CMakeLists?

谁说胖子不能爱 提交于 2021-01-29 10:02:19
问题 When using CMakeLists to compile an OpenGL project, I have the following line to link glut and gl: target_link_libraries(my_exe ${OPENGL_gl_LIBRARY} ${GLUT_LIBRARIES}) I looked up how to link glut and gl with CMake so I saw that I could use ${OPENGL_gl_LIBRARY} and ${GLUT_LIBRARIES}. But how would I know the variables to use otherwise? I am used to just doing ${THELIBRARY_LIBRARES}, but in the case of gl, it changed to adding that " gl " into the variable name. How would I know that without