Linked Questions

1 vote
1 answer
1k views

I'm trying to build a simple C++ project on Windows 10 using Clang version 9.0.0. I can run the following command successful. clang++ main.cpp -o learn.exe This produces learn.exe which run ...
Amani's user avatar
  • 18.6k
0 votes
1 answer
1k views

I have a tiny library with its own cmake file. I am trying to add this library to the platformio ploject. I create a "CMakeListsUser.txt" and add this line "add_subdirectory(GLibc)"...
Gru2303's user avatar
0 votes
1 answer
264 views

I have a project with a structure as follows: project ├── build ├── CMakeLists.txt ├── extern (git submodule) │ └── mylib │ ├── build │ ├── CMakeLists.txt │ └── src └── src └── ...
confusedandsad's user avatar
0 votes
0 answers
79 views

I am trying to build a CMake C++ Project with C++20 because I want to use the <ranges> library. I have tested my gcc compiler with the -std=c++20 flag and it works. However, when I build a ...
Paradox's user avatar
  • 2,045
0 votes
0 answers
46 views

Starting with cmake 3.20, a series of GNU-specific options are added to the compile lines, and I'm not sure why CMAKE_C_FLAGS does not remove them. Prior to the release of cmake 3.20, those options ...
Laurenţiu Terţan's user avatar
0 votes
0 answers
42 views

having setup an AVR project in Clion on m1 mac I encountered some problem compiling the project I appreciate any help in advance CMakeLists.txt project(micro_controller C) SET(MCU "atmega328&...
cloner's user avatar
  • 1
200 votes
23 answers
681k views

I'm trying make a Visual Studio solution with CMake to compile the latest version of aseprite and CMake keeps giving me the: No CMAKE_C_COMPILER could be found. No CMAKE_CXX_COMPILER could be found. ...
Caio Fontes's user avatar
  • 2,203
50 votes
4 answers
140k views

I have a problem with this CMakeLists.txt file: cmake_minimum_required(VERSION 2.6) SET(CMAKE_C_COMPILER C:/MinGW/bin/gcc) SET(CMAKE_CXX_COMPILER C:/MinGW/bin/g++) project(cmake_test) ...
Pietro's user avatar
  • 13.5k
22 votes
2 answers
26k views

What is "XX" in CXX in a cmake CMakeLists.txt file. What is its significance. Why is it "XX" not PP against a CPP file ?
user2618142's user avatar
  • 1,065
31 votes
5 answers
19k views

It seems like CMake is fairly entrenched in its view that there should be one, and only one, CMAKE_CXX_COMPILER for all C++ source files. I can't find a way to override this on a per-target basis. ...
cdleary's user avatar
  • 71.9k
41 votes
1 answer
12k views

This seems as a trivial question, since CMake is a script language the general answer is: strictly sequential. But I came across several cases where it was important when or in which order CMake is ...
Florian's user avatar
  • 43.7k
13 votes
6 answers
8k views

I try to change the compiler with cmake : SET(CMAKE_C_COMPILER "/opt/rh/devtoolset-2/root/usr/bin/gcc") SET(CMAKE_CXX_COMPILER "/opt/rh/devtoolset-2/root/usr/bin/g++") I do that in the begining of ...
Quentin Tealrod's user avatar
3 votes
2 answers
2k views

I have written some code that make use c++17's charconv, that I can compile just fine with g++ 9. Even though I have set the std to c++17 in my CMakeLists.txt, cmake insists on using c++ 7.5, which ...
DontBreakAlex's user avatar
1 vote
1 answer
3k views

I am trying to compile a .cpp application which depends on LibTorch, the cpp version of PyTorch (https://pytorch.org/) on a HPC server. I have loaded CUDA 11.8 via a module load. nvcc -V outputs nvcc: ...
velenos14's user avatar
  • 586
1 vote
2 answers
4k views

On Windows 10 in powershell I am using g++ as a compiler with CMake and MinGW Makefiles I am also using neovim (with the kickstarter config) and clangd lsp, installed from Mason Also downloaded LLVM ...
Quercus's user avatar
  • 15

15 30 50 per page