cmake

How to tag a scientific data processing tool to ensure repeatability

Dear all, we develop a data processing tool to extract some scientific results out of a given set of raw data. In data science it is very important that you can re-obtain your results and repeat the calculations, that led to a result set Since the tool is evolving, we need a way to find out which revision/build of our tool generated a ...

For the cmake "include" command, what is the difference between a file and a module?

I use some libraries that I don't want built as part of every project that uses them. A very understandable example is LLVM, which has 78 static libraries. Even having the cmake code to find and import these in every cmakefile is excessive. The obvious solution seems to be to use the "include" command, and to factor out relevant chunks ...

Working with CMake and Xcode: keep project changes when CMakeLists.txt is modified

Hello people! First of all, I've never developed with Xcode. I have a project that has been developed by me under a certain environment (Linux and emacs) and now some colleagues that use a different environment will work with me. This is a C++ project that uses CMake. Long story short: I use Linux/emacs. Other developers use mac/Xc...

Setting Visual Studio Project Dependencies from CMake

Hello, I'm using CMake to build an application made up of four projects: a.dll, which has no dependency b.dll, which depends on a.dll c.exe, which depends on a.dll and b.dll d.exe, which depends on a.dll and b.dll Each project (or target in CMake's terminology) lies in its own subdirectory, and has its own CMakeLists.txt file. In ad...

Error with cmake when trying to build wt?

Check for working C compiler: cl Check for working C compiler: cl -- broken CMake Error at C:/Program Files/CMake 2.6/share/cmake-2.6/Modules/CMakeTestCCompiler.cmake:32 (MESSAGE):The C compiler "cl" is not able to compile a simple test program. It fails with the following output: Change Dir: C:/Users/Gilg/Documents/Projects/builds...

cmake: Building multiple versions of a program

I would like to write a cmake script that will compile the same source against multiple versions of header files. The aim is to be able to easily create shared libraries that are backwards compatible with earlier versions of an API. I am looking for examples and pointers on the best way to do this. I am new to both c++ and cmake so an...

CMake and CTest: How to make target "Nightly" actually build the tests

It's a well known problem that executing make "test" doesn't build the tests as discussed here. As suggested, the problem can be partly solved with the artificial target "check". I want to know how I can force building of tests when i call "make Nightly". What I've done so far: add_custom_target(buildtests) add_custom_target(check ...

kdevelop: editing CMakeLists.txt

I am having troubles trying to make my project work with kdevelop. In the CMakeLists.txt I have included the paths to the libraries that I use: cmake_minimum_required(VERSION 2.4.6) PROJECT(Ormapi) INCLUDE_DIRECTORIES("/dir/whatever/local/dir/include") < here is defined global.h INCLUDE_DIRECTORIES("/dir/whatever/local/src") ADD...

Does CMake has something like % substitution support from Make?

I need a chain of file processing in my build-process. Workflow can be easily specified and built around a filename, only extension changes, like file.a -> file.b -> file.c. So, it's clearly a case for Make's declarative syntax. But as I see, for CMake this will look like an explicit *add_custom_command* for each file for each step of pr...

Basic CMake Question - Linking Fails

I'm configuring my project for CMake and am having linking problems - the project files all compile successfully, then it says it is linking and reports all sorts of symbols not found. These symbols are mostly provided by my own code, while some of them are provided by BerkeleyDB, which is being properly located and included. Here is...

How to adapt my unit tests to cmake and ctest?

Until now, I've used an improvised unit testing procedure - basically a whole load of unit test programs run automatically by a batch file. Although a lot of these explicitly check their results, a lot more cheat - they dump out results to text files which are versioned. Any change in the test results gets flagged by subversion and I can...

Replacing values in CMake lists

Hello. I needed to replace a value in a CMake list, however there does not seem to be any support for this list operation. I've come up with this code: macro (LIST_REPLACE LIST INDEX NEWVALUE) list (REMOVE_AT ${LIST} ${INDEX}) list (LENGTH ${LIST} __length) # Cannot insert at the end if (${__length} EQUAL ${INDEX}) ...

dyld: lazy symbol binding failed: Symbol not found - nm reports symbol found

Fairly abstract question here, as I don't know quite where to start my own investigations. I have a C package constructed with CMake that produces librpdb.so; I have a Ruby Gem set up for the same library, which produces rpdb.bundle. When used in Ruby, I get this: dyld: lazy symbol binding failed: Symbol not found: _RPDB_RuntimeStor...

CMake link stage question

I am currently building a rather large application, using cmake to generate cross platform build scripts. During this process of putting together the cmake build scripts, I have discovered the pain of gcc link line ordering. The basic issues is that including static libraries in the wrong order leads to unused library symbols being thro...

How to specify a path with white space in it with cmake?

include_directories("D:/FMOD SoundSystem/FMOD Programmers API Win32/api") What's the decent way to deal with path like the above in cmake? ...

How do I get Visual Studio to output new files in a different directory (ideally the source directory from a out of source cmake build).

I am in the process of adding cmake support to a project and noticed that, after generating an out of source Visual Studio project, adding new files through Visual Studio puts them in the Build directory, and not in the Source directory. This is suboptimal. Is there any way to change where VS adds new files, and can I set this in a CMak...

Creating binary with CMake removes runtime path

Hi, I am using CMake to build a program on linux. The program compiles successfully and runs from the project build directory. The program is linked with a custom library in the directory ${HOME}/build/lib I have an install stage with: install(TARGETS ProgName RUNTIME DESTINATION bin) When I run make install the program gets put in ...

Use -isystem instead of -I with CMake

Is there any way in CMake to force a path specified via include_directories (or perhaps through a different function) to use the -isystem flag instead of the -I flag when building with gcc? See http://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html#Directory-Options for details on -I and -isystem. ...

man page generation/packaging/installation with cmake

I am looking for some good examples / tutorials on how to generate, package, and install man pages in projects using CMake. Thanks. ...

cmake, print compile/link commands

Can somebody please enlighten me as to what the command line flag to CMake might be that will make it print out all the compile/link commands it executes? I can't find this anywhere in the documentation. Many hours of my life have just evaporated. I'd just like to verify it's doing what I think it is, (then banish the infernal build sys...