Questions tagged [cmake-modules]

Use this tag for questions regarding CMake modules that are part of the CMake distribution, or loading custom CMake modules into the current CMake context.

CMake Modules are CMake source files (typically .cmake files) that can be loaded into the current context using the include() command. CMake provides many modules that can be used out-of-the-box; these are split into two general types:

  • Utility modules
  • Find modules

Utility modules are loaded using the include() command, while Find modules are loaded by calling the find_package() command. Custom user-defined modules can also be written and loaded in a similar manner, but their location must be specified in the CMAKE_MODULE_PATH variable.

132 questions
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…
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…
0
votes
0 answers

I am facing an issue on shogun interface

This is the error which I am facing with: -- Building for: Visual Studio 15 2017 CMake Error at C:/Program Files/CMake/share/cmake-3.13/Modules/CMakeDetermineSystem.cmake:174 (file): file failed to open for writing (No such file or…
jyotirmoy
  • 1
  • 2
0
votes
0 answers

Same lib name in different subdirectories: conflics when calls `add_subdirectory` in parent level

the simple folder structure is like Root CMakeLists.txt SubA CMakeLists.txt some files to be built... SubB CMakeLists.txt some files to be built... Assuming I have add_library(SubDirLib fooX.cpp) in both…
victor
  • 655
  • 2
  • 6
  • 7
0
votes
0 answers

How to link an interface with static lib with CMake

What I want is a main library, based on an interface (in the future more than one). That interface must be used by other libs, like lib1 and lib2. The idea is to create lib1 and lib2 as static, and then link both to the mainLib, which must be a…
Samuel
  • 816
  • 1
  • 7
  • 13
0
votes
1 answer

CMake variable contents dependent on build/install

Using the $ and $ generator expressions I can set target properties to different values depending on whether the target is exported in the current build directory or installed globally. I am writing a…
Ron
  • 1,989
  • 2
  • 17
  • 33
0
votes
1 answer

How do I Install bundled interface dependencies with modern CMake?

What is the proper way to install bundled interface dependencies in Modern CMake? I have a library MyLib that has an interface dependency on libDep (MyLib.hpp contains #include ). Anything that depends on MyLib also transitively depends on…
0
votes
0 answers

Including pybind11 cmake files with Hunter

I am using Hunter to manage dependencies of my project. One of them is pybind11 It has been installed correctly and I can use it in my code. However when building my project with CMake I need to use some cmake function provided by pybind11 in some…
EntrustName
  • 421
  • 6
  • 19
0
votes
1 answer

Add only headers of an imported module to a library in CMake

In CMake there are imported modules that are used to simply add external modules to local targets. For example if we want to use boost::filesystem library in our project we could have a CMakeLists.txt like this: project(foo CXX) find_packge(Boost…
E. Vakili
  • 1,036
  • 1
  • 10
  • 25
-1
votes
1 answer

'.' is not recognized as an internal or external command, operable program or batch file. CMake Error

I have been trying to run this code from a Github Repository https://github.com/dllu/puppup using CMake. After successfully building the file, The command ./puppup Results in the following error '.' is not recognized as an internal or external…
-2
votes
1 answer

Porting Java package to C++ and using Cmake as a build tool

I have the following task. There is a java package that needs to be ported to c++17. A transpiling tool is being used to help with the task and avoid manual rewrite of every single file. Currently for all java classes/interfaces the…
Tito
  • 2,234
  • 6
  • 31
  • 65
1 2 3
8
9