Category "cmake"

overriding default CMAKE C++ compiler flags

I'm trying to set (remove) the default c++ compilers flags by using the following commands in my CMakeLists.txt: set(CMAKE_CXX_FLAGS, "") set(CMAKE_CXX_FLAGS_

how to install face_recognition module for python

i have installed the cmake but still dlib is not installing which is required for the installation of face_recognition module the below mentioned error i am ge

Intel oneapi detect if I'm on FPGA

Is there any way to detect via CMake whether an FPGA accelerator is available or not ? I'd like to do something like if (FPGA_AVAILABLE or FPGA_EMULATOR_ON)

'undefined reference to' when using GTK with CMake

I'm trying to build basic GTK+ code(one of its tutorials) with CMake, but I keep getting 'undefined reference to *' where * is any GTK function that is in the c

How to set CMAKE_INSTALL_RPATH with multiple directories?

On the question CMAKE RPATH not working - could not find shared object file I see how to set CMAKE_INSTALL_RPATH for a single path, but I need it for multiple p

How to have CMake export symbols automatically on Windows?

According to my experience, though it may be incorrect, on Windows if no translation unit exports any symbol then all symbols are implicitly exported when build

Cannot configure QtCreator using CMake on Ubuntu 18.04

I am trying to setup a project based on CMake with QtCreator. In Projects I defined the Build Steps I need. In the Build setting I get constantly the error mess

"No tests were found!!! " in cmake tutorial step 4

The contens of CMakeLists.txt: cmake_minimum_required(VERSION 3.10) # set the project name and version project(Tutorial VERSION 1.0) # specify the C++ standar

how to solve ' CUDA was found but your compiler failed to compile a simple CUDA program'

I tried vs2015 2017 2019 2022 without success, cmake also tried 3.14.1 and the latest version, cuda is available, and vs2019 seems to have also compiled test.cu

How to install conan inside docker and use

I am trying to use Conan by installing it in a Docker and using that docker. For the same, I did like included these lines in Dockerfile RUN apt-get install -y

Clion can't find a library installed using homebrew

I am working on MacOS and using homebrew to install libraries. The library that I am trying to get working is freeImage which installed just fine using homebrew

CUDA_ARCHITECTURES is empty for target "cmTC_28d80"

I made a new CUDA executable project in CLion and when it opened I got CMake error: CUDA_ARCHITECTURES is empty for target "cmTC_908f4". CMakeLists.txt: cmake_

How to add custom flag in CMake building

My main goal is to use a flag when building a project in command line. So I can add own flags like DEBUG or MY_FLAG. #ifdef DEBUG #define debug_print(format, ..

PostgreSQL libpq windows 10 CMake missing PostgreSQL_LIBRARY

I'm rying to setup a CMake project under windows 10 using PostgreSQL. When I try to find_package find_package(PostgreSQL REQUIRED) I get the following error

How do I get Wireguard-Android make file to function on Windows?

I'm trying to build the wireguard-android sources on my windows machine, fixing the problems step by step with trial and error. I have CMake and Make installe

Prevent clang tidy to report warnings on Boost Test headers

I have a Cmake project that uses Boost.UnitTest for testing. When I do static analysis with clang-tidy it reports some warnings from the Boost.UnitTest headers.

Linking issues "relocation against `g_GIT_SHA1' in read-only section `.text'" and "undefined reference to `g_GIT_SHA1'"

I was trying to follow the procedure in this answer https://stackoverflow.com/a/4318642 with a test: CMakeFile.txt #cmake version setup cmake_minimum_required(V

CMake & MinGW Compilation on Windows, without needing the -G "MinGW Makefiles" flag

I want to build my C++ applications from the Windows PowerShell command line using CMake and MinGW. When I do this in the "normal way," with these commands: m

Compilation issues with a simple ImGui(GLFW+OpenGL3) program on Linux

I am getting the following error while compiling a simple imgui+glfw+opengl3 program on GCC 11.2.0 on Pop!_OS (Ubuntu): [build] In file included from ../externa

Pure OpenGL on Windows? [duplicate]

I want to use OpenGL without GLFW, the docs say that I need to add opengl32.lib to linker dependencies. How do I specifically import OpenGL an