CMake (cmake) input files are written in the “CMake Language” in source files named CMakeLists.txt
or ending in a .cmake
file name extension.
Questions tagged [cmake-language]
112 questions
0
votes
1 answer
CMake syntax: how to negate if() and if()
CMake's if command [1] supports several signatures, starting with
if()
if()
if(NOT )
How to negate the first two?
If the CMake documentation is correct (which in my experience is far from certain), then my…

Joachim W
- 7,290
- 5
- 31
- 59
-1
votes
1 answer
How to pass a variable(which holds multiple lines) to a cmake function?
set(STATE STUBS_OFF)
Set(SWC_Original_path
datax/xx/yy/zz/datafile.c
datax/xx/yy/zz/datafile1.c
)
set(SWC_Stubs_path
stubs/xx/yy/cc/stubsfile.c
)
#Generic Function to Update the SWC PATH and Stubs…

Saravanan_Rk
- 1
- 2
-1
votes
1 answer
Cmake rules not found in Included sub-cmake file
In a local CMakeLists.txt file, if i include another Cmake file, e.g.
include(sub.cmake) then ninja finds all rules. However, when including from a subdirectory, e.g. include(subdir/sub.cmake), then it doesn't... Any idea why?

stustd
- 303
- 1
- 10
-1
votes
1 answer
CMake toolchain expressions
I am trying to write a Toolchain file for a custom compiler and I am stuck at the options of the tools. I actually need a variation of the output filename to be added to a parameter in CMAKE_CXX_LINK_EXECUTABLE variable.
I found random examples on…

PasterOfMuppets
- 165
- 9
-1
votes
1 answer
Undefined reference to vtable using Qt
I'm new to Qt and I'm trying to do a simple VoIP application.
I use CMake and conan to get all packages and build the application. If I place all Qt related class headers and sources files on the same directory, I can compile without any problem,…

Alvaro
- 27
- 1
- 6
-2
votes
1 answer
cmake error( add_executable) I am not getting what eerror it is. Also i get CXX_STANDARD is set to invalid value '17'
cmake_minimum_required(VERSION 3.0)
project(FireliteApp C CXX)
set (CMAKE_CXX_STANDARD 17)
string(LENGTH "${CMAKE_SOURCE_DIR}/"…

MANOJ GAIKWAD
- 1
- 1
- 1