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
Is there a provision to invoke jamfile and jamrule from cmake and vice versa?
Trying to migrate a legecy codebase whose buildsystem jam to CMake.
to divide and conquer it , checking whether there and provisions to Is there a provision to invoke jamfile and jamrule from cmake and vice versa .
one option would be add a…

Guruprasad Bhat
- 42
- 5
0
votes
2 answers
Cmake support for tasking tri-core compiler toolchain
This is unsure if cmake support is available for the tasking tri-core compiler toolchain.
We could use a normal makefile to compile using this compiler, but I would like to configure cmake to do the same in windows

jack sparow
- 339
- 3
- 9
0
votes
1 answer
Linking libraries translating from command line to Make
I am trying to get the intel math kernel library (mkl) to run. There is a tool (https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor) that prints the necessary, environment-dependent cmd commands to use it for C++ scripting. For me…

schajan
- 59
- 5
0
votes
0 answers
Why do all my CMakelist.txt files in different folders get overwritten everytime I edit any of the copies?
I have a folder /home/ros/codes. Inside it, I have datewise folders where I have a CMakeLists.txt file and a build folder inside which I run cmake.. and make command.
Recently, I observed if I edit any CMakelists.txt file from any of this group of…

Anuj Patil
- 21
- 7
0
votes
1 answer
How to generate .out file with cmake?
I am cross-compiling for an ARM Cortex-M using CMake for the configuration of the project.
I've been so far successful in setting up the project and the executable is being generated. However, to flash the board I need an ".hex". file.
I've followed…

R. Vicente
- 11
- 1
0
votes
1 answer
cmake: install externally supplied include and lib
I have a very simple problem, which I don't find a solution for:
I'm working with a company that once in a while sends me two directories, one with .h files and the second with a library in two forms, shared and static.
say…

Ran Regev
- 361
- 3
- 13
0
votes
1 answer
Custom command does not get executed with --target option in cmake
Followup question to this question: cmake project build only one specific executable (and its dependencies)
I have a custom target written so it will run every time i compile something in my project. Now that I call an explicit target as asked in…

HFinch
- 534
- 1
- 7
- 20
0
votes
0 answers
How to tell where a variable is coming from?
I have a directory with CMakeLists.txt. And it invokes a CMake module module1.cmake file located elsewhere.
module1.cmake will reference a variable named XXX, which may come from:
the environment variable %XXX%.
the command line through cmake -D…

smwikipedia
- 61,609
- 92
- 309
- 482
0
votes
1 answer
CMake argument passing, by value? by reference? or something else?
I have 2 CMake scripts:
Script1.cmake:
cmake_minimum_required(VERSION 3.15)
macro(m1)
message("[DEBUG1] " ${var1})
m2(var1) #<====================== HERE is different
endmacro(m1)
macro(m2 var2)
message("[DEBUG2] " ${var2})
set(${var2} "set from…

smwikipedia
- 61,609
- 92
- 309
- 482
0
votes
0 answers
CMake incorrectly identifying valid C++ compiler options?
I have a set of C++ potential compiler flags stored in a variable and over it, I'm running the following test on CMake 3.14.5, to see which ones applies and which doesn't to a certain version of the compiler (I'm using GCC, CLANG and ICC to compile…

Alvaro Palma Aste
- 381
- 3
- 16
0
votes
1 answer
Unknown CMake command "add_py_modules"
I'm setting up to build openage, a clone of AoE2 genie engine. My cmake command is not being processed. Is "add_py_modules" not possible here?
This is for windows 10, using vcpkg. Command used :
cmake…

Kenny Jorge
- 5
- 5
0
votes
0 answers
How to correctly link the path of external library in CMake?
In the CMakeLists.txt, if I define the .lib (static library) file path as absolute path, it's working correctly. But if I define the same as relative path, an error is thrown. How do I solve it without hard coded ?
File structure:
|--D
| |--Rohit
|…

Rohit
- 99
- 2
- 12
0
votes
1 answer
I want to Integrate ODBC in my Code for both linux and windows using CMakeLists.txt but its only working in windows
I am currently working on a project which requires SQL database. I want to make project platform independent so i am writing CMakeLists.txt but unfortunately its not working with linux currrently I have this part in CmakeLists.txt…

Shaoor Ahmad Qureshi
- 69
- 8
0
votes
0 answers
Usage of Variable for HINTS in find_package command
I write a generic function to support the search of the dependencies.
If I write the following command:
find_package(HDF5 REQUIRED HINTS /opt/cots/)
the cmake (version 3.13.4 on REHL7 ) is able to find correctly the dependencies and everything is…

Michele Belotti
- 85
- 1
- 9
0
votes
1 answer
CMake: Set Visual Studio project properties to inherit from parent (property sheet)
I'm using CMake 3.8.1 to generate Visual Studio 2015 Projects.
Adding a custom property sheet:
set_target_properties(${TARGET} PROPERTIES VS_USER_PROPS "my_settings.props")
Can't find the way in CMakeLists.txt to set "Output Directory",…

sny
- 415
- 8
- 21