Questions tagged [cmake-language]

CMake () input files are written in the “CMake Language” in source files named CMakeLists.txt or ending in a .cmake file name extension.

Official Documentation

Additional Resources

67 questions
0
votes
0 answers

How declare a out of tree library in cmake?

For a project, I'm editing a CMake and I have a problem. I want to declare a out of tree Library already created. I saw some solutions but it is only for not created out of tree Library. The message is /usr/bin/ld : cannot find -llapacke collect2:…
0
votes
0 answers

properties of custom target

I'm using add_cusmtom_target to do a custom build, but what properties of this target have? Perticually how can I get the list of dependencies listed in the target: add_custom_target(exsdk COMMAND echo DEPENDS foo.jar bar.jar) get_target_property(D…
fluter
  • 11,341
  • 7
  • 44
  • 77
0
votes
0 answers

Problem with CMake "Could not find cmake module file"

I'm making a library that overloads the operator new and delete to save the pointer into my vector-like class. When the program ends a class object frees the memory. I'm new to CMake. I used CMake but I get a CMake error. In CMakeOutput.log it…
0
votes
0 answers

why unit tests failing with CTEST_PARALLEL_LEVEL option greater than 4

I am trying to run some unit tests using cmake ctest. But its running successfully in scenario 1 and failing in scenario 2 . I put my unit tests in for loop of width. set(width 16 32 40 48 64) foreach(width_val ${width}) ..... build(..) …
jailaxmi k
  • 119
  • 7
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…
0
votes
2 answers

CMake variable with semicolons

Say there is a programme that requires input in form --param "one;two;three": a flag --param followed by a string (enclosed in quotes) of words separated by a semicolon. For example, the following Bash scrip can be…
scrutari
  • 1,058
  • 1
  • 15
  • 24
0
votes
1 answer

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
  • 241
  • 1
  • 5
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
  • 49
  • 4
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…
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
  • 2
  • 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
  • 361
  • 3
  • 13
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
  • 52,824
  • 76
  • 267
  • 432
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
  • 52,824
  • 76
  • 267
  • 432
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…