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

I get an error message when trying to create a Cmake project in visual studio 2022

I chose setup with python embedded system in Visual Studio 2022 and I get cmake for windows from individual setup I did get cmake from choosing Python embedded system setup but for Linux I have tried various ways such as installing CMake…
0
votes
2 answers

Jenkins - Pass Git credential during CMake FetchContent

Context I'm currently working on a CMake project that uses Jenkins for its continuous integration. This CMake project includes a number of libraries which it retrieves using FetchContent. Basically, rather than using Git submodules, we chose to use…
Brinfer
  • 398
  • 1
  • 10
0
votes
1 answer

How can I get the version argument of a find_package() call in my find module script?

I have custom Find.cmake. Is it possible to retrieve version, passed to the find_package() call, inside of it?
Nickolay Olshevsky
  • 13,706
  • 1
  • 34
  • 48
0
votes
1 answer

Running into "Unable to determine what CMake generator to use..."

I'm trying to set up CMake on Visual Studio code on my computer. I haven't coded outside of work for about a year, and I'm running into problems just setting it up. I've installed the latest version of VS Code, G++ (compiler), mingw, and CMake,…
0
votes
1 answer

Unable to use Zephyr header files

Greetings of the day! I'm new to Zephyr and CMakeLists.txt I'm trying to include Zephyr header files in my project, so I downloaded Zephyr and keeping inside my project to include Zephyr to my project I used CMakeLists.txt in that I used a line like…
0
votes
1 answer

CMake path for python3 libraries doesn't change (windows 10)

Using Windows 10: I'm trying to change the PYTHON3_LIBRARY path to the anaconda3 path (C:/Users/Student/anaconda3/libs/python38.lib) I have set in the value. After I press configure I still get the normal python installation path as the result in…
0
votes
1 answer

How to replace FetchContent_Declare to copy the already cloned local repo

We are using CMakeLists.txt for compiling our huge code base. We are cloning the repo at compilation stage, using FetchContent_Declare as below. FetchContent_Declare(miniz GIT_REPOSITORY https://github.com/richgel999/miniz.git GIT_TAG …
0
votes
0 answers

Adding LLVM Plugin with CMake for C++ library

I am trying to use an LLVM plugin (Enzyme) for a C++ library I am writing using CMake for the build process. I am new to CMake and LLVM so not sure about the best way to approach this using Modern CMake practices. I have indentified a few steps that…
0
votes
0 answers

CMake Error When Trying to Configure File for Pi Pico

I am using VSCode for Pi Pico and followed this tutorial https://www.youtube.com/watch?v=mUF9xjDtFfY&ab_channel=LearnEmbeddedSystems. Everything was working fine yesterday and today when I went to configure my files and further build them I am met…
0
votes
1 answer

Modify or set global variable from within Find.cmake file

I'm striving to understand how to create / modify a global variable (whose prefix is not _) from within a Find.cmake file, so that it can be shared among different modules and reused by the global CMakeLists.txt. Let's say I have a…
Buzz
  • 1,102
  • 1
  • 9
  • 24
0
votes
0 answers

CMAKE: CMAKE_SYSTEM_PROCESSOR not set/empty although toolchain file is not used

We have a pretty large build environment with cmake, utilizing conan to install/download dependency files and then run our build. Within our build I need to identify the target system processor and therefore I am utilizing CMAKE_SYSTEM_PROCESSOR.…
0
votes
0 answers

Can't install dbt-snowflake; "No module named 'cmake'"

(Context: Barely a novice at Terminal, know some SQL, don't know Python) I'm taking a course on dbt, have my own Snowflake set up, and I'm trying to install dbt-snowflake on Mac. Attempting to run: pip install dbt-snowflake This fails, and it…
0
votes
0 answers

How to change the normal variable in parent level CMakeLists

I need to compile several open sources, one of them has CMakeLists.txt which includes ############################################################## # Output…
caorenxxy
  • 1
  • 1
0
votes
1 answer

-- No package 'glfw3' found on Windows 10

C:\mangetsu\build>cmake -DBUILD_GUI=On .. -- Building for: Visual Studio 16 2019 -- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19045. -- The C compiler identification is MSVC 19.29.30146.0 -- The CXX compiler identification is…
0
votes
0 answers

What is the minimal number of submodules to compile boost::regex with cmake + ExternalProject?

I need to compile boost from sources, it is a requirement. But I only need one library regex for a benchmark. I have success if I clone the entire boost project with the snippet below. However downloading the entire boost every time is very…
Something Something
  • 3,999
  • 1
  • 6
  • 21
1 2 3
8 9