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

Alternative to GET_TARGET_PROPERTY(... LOCATION) when using older LibTool Macro

I want to generate a libtool file for a library that I'm building with CMake 3. I found this macro, which would have helped with an older version of CMake: https://gitlab.kitware.com/cmake/community/-/wikis/contrib/macros/LibtoolFile Here's the code…
0
votes
1 answer

How to compile Apache Arrow Flight C++ example in Windows-10 (VS 2019)

I downloaded the Apache Arrow Flight sample code from git (https://github.com/apache/arrow) and I was able to build the cpp example (using CMake and VS2019). I could not build the example "minimal_build" because it gives CMake missing library…
AkshayM
  • 317
  • 6
  • 18
0
votes
0 answers

Compiling targets sequencially instead of parallel in cmake

I have 10 targets in cmake. If i give gmake -j4 it is compiling all the targets paralllely. I want all the cores to be work on single target and after finishing that it should go for next target. I know that it can be achieved with adding…
0
votes
1 answer

installing only one target in cmake

I have totally 5 targets. one of them is static library. other 4 are executables. I don't want the library to be build for every time. so i just want to compile the library keep it in a particular location so that other executables can refer this…
0
votes
1 answer

Not able to generate Mingw Makfile

cmake version : 3.18.5 I was using cmake-gui, it is working smoothly. Now i have switched to command-line. it was working for some days and suddenly from no where i am getting the below error. The cmake command i am running, cmake -G "MinGW…
0
votes
1 answer

How to compile only some set of targets during make

I am using cmake as build generator. version : 3.18.5 I have 5 targets in my project. I want to compile only particular set of targets depends upon the option i give during make. How to do this? for example, if i run gmake -j4 foo=set2 I want…
0
votes
0 answers

file extension with .o in cmake

I am working on a C project. I am using cmake as build generator. I have set the below things in my cmakelists.txt just below project() command set(CMAKE_C_OUTPUT_EXTENSION_REPLACE 1) set(CMAKE_ASM_OUTPUT_EXTENSION_REPLACE…
0
votes
2 answers

CMake BUILD undefined reference (findpng)

I'm still very new to CMake so feedback is definitely welcome. So, I'm trying to build a simple application that should eventually create a pdf using the library libharu. I think i figured it out how to link the library. But I still receive build…
Emiel
  • 37
  • 5
0
votes
1 answer

how to include .spt files in cmake

I am working on an embedded project with windriver compile rhow to include the (range.spt) assembly file to compile this in to range.o. I tried the below step set(FREESCALE_SPT_ASM_FLAGS "-I${APP_DIR}/radar_processing") set(FREESCALE_SPT_ASM_FLAGS…
0
votes
0 answers

Hello all i am posting the error which i have got in ubuntu 16.04 lts. While compiling

I am getting this error after giving the command cmake .. Geographic lib already installed 1.45-2 cmake version - 3.5 boost version - 1.75 Boost 1.75 found. Found Boost components: date_time Boost 1.75 found. Found Boost…
user15166898
0
votes
0 answers

How do I call ExternalProject output binary from cmake?

I'm trying to use following approach to embed flatbuffers into my project: ExternalProject_Add( googleflatbuf GIT_REPOSITORY "https://github.com/google/flatbuffers" GIT_TAG "v1.12.0" PREFIX "${CMAKE_BINARY_DIR}/googleflatbuf" …
Roman
  • 1,396
  • 4
  • 15
  • 39
0
votes
0 answers

Create and Link Shared Library .so in C++ using CMake

I've created a C++ class where I calculate the CPU usage using getrusage getrusage(RUSAGE_SELF, &usage). I can successfully create and link a shared library .so that I created, however, I want to use that same shared.so library in some other…
0
votes
1 answer

How to add_dependencies between projects in cmake

include_directories(${CMAKE_CURRENT_SOURCE_DIR}) AUX_SOURCE_DIRECTORY(${CMAKE_CURRENT_SOURCE_DIR} source) project(abc) #a_certain_source_file.cpp is a generated file built by another project. add_library(${PROJECT_NAME} STATIC ${source}…
badri
  • 575
  • 2
  • 8
  • 22
0
votes
0 answers

How to define a target to include multiple libraries stored in a single directory

I want to create a module that allows a target to include multiple static libraries stored in the same directory. The end goal is to allow a target to include -L -l -l ... -l when linking. I've…
RAM
  • 2,257
  • 2
  • 19
  • 41
0
votes
1 answer

link dependent android ndk cmake project to main android ndk library project

I have 2 modules in this project: app and libdatacpp libdatacpp is mainly a C++ project but uses some java code app is mainly a java project, but uses some c++ code When building the project, I get c++ linker errors for undefined functions from…
lufinkey
  • 342
  • 4
  • 15
1 2 3
8 9