cmake

How to configure cmake to compile informix *.ec files?

I'm just found cmake and I want to use it to create make files for a little project that uses the esql compiler. ...

How to include all files of a directory with cmake ?

Hello, I want to try CMake to manage a new C++ project. However, some files are automatically generated. I have no way to know the name of the generated files. The only thing I know is that these files are all generated in the foo/ directory. Is there a way to ask CMake to include all .cpp files from foo/ ? Thank you. ...

Prevent presenting of variable in cmake GUI

Hi, I want to limit hard-coded CMAKE_CONFIGURATION_TYPES to RELEASE and DEBUG only. If I execute cmake GUI on Windows to create Visual Studio build, CMAKE_CONFIGURATION_TYPES is present along with other cmake variables. How can I remove CMAKE_CONFIGURATION_TYPES from the GUI? Thanks Dima ...

Listing header files in Visual Studio C++ project generated by cmake

Hi, I'm building a cmake based build system for our product. The problem is that Visual Studio project, generated by cmake, doesn't display header files in solution browser. What I need to add in CMakeList.txt to list header files? The preferred solution is where no need to list each particular header file. Solution Here is a solution...

cmake source and out-of-source navigation

Hi, cmake advises to use out-of-source builds. While in general I like the idea I find it not comfortable to navigate from out-of-source sub directory to the corresponding source directory. I frequently need the code to perform some actions with code (e.g. grep, svn command etc.). Is there an easy way in shell to navigate from out-of-s...

tell visual studio to create a utf-8 environment when running executables

I am using CMAKE with CTEST to run my regressions. My application is a console app which outputs in whatever encoding it is presented by it's environment (A feature of Tcl). How do I tell visual studio that when it runs my application to run it in a utf-8 environment. Right now my regression results are encoded in latin, and it makes ...

With cmake, how would you disable in-source builds?

I want to disallow people from cluttering our source tree with generated CMake files... and, more importantly, disallow them from stepping on existing Makefiles that are not part of the same build process we're using CMake for. (best not to ask) The way I have come up with to do this is to have a few lines at the top of my CMakeLists.tx...

Eclipse CDT 5.x and cmake 2.6.x

Hi, According to what I see, cmake 2.6.x supports CDT 4.x. We already have CDT 6.x. Is CDT 5.x and cmake 2.6.x are compatible at least? Thanks Dima ...

CMake... ccmake or cmake?

It seems like there should be such an obvious answer, but I've searched and can't find one; what is the difference between cmake and ccmake. I have the Ubuntu package cmake installed, and on my Windows computer, I have the installer from the website, but neither have the command ccmake available... Yet, the tutorials, seem to reference i...

Proper way to get an out-of source build in multi-part cmake project.

I use cmake to build, test and install my project. My way is a little crude: I use a scripts like this to get an out-of-source build: DIR=debug_build && rm -fr ./${DIR} && mkdir -p ${DIR} && cd ${DIR} && cmake -D CMAKE_BUILD_TYPE=Debug $@ .. && make I guess I could at least put it into makefile, but isnt it strange to use Makefile to ...

Build mode: RelWithDebInfo

I think that I understand the difference between Release and Debug build modes. The main differences being that in Debug mode, the executable produced isn't optimized (as this could make debugging harder) and the debug symbols are included. While building PCRE, one of the external dependencies for WinMerge, I noticed a build mode that ...

Finding python site-packages directory with CMake.

I use CMake to build my application. How can I find where the python site-packages directory is located? I need the path in order to compile an extension to python. CMake has to be able to find the path on all three major OS as I plan to deploy my application on Linux, Mac and Windows. I tried using include(FindPythonLibs) find_path(...

Integrate ITK (Insight Toolkit) into own project

Hello, i am having problems integrating ITK - Insight Toolkit into another image processing pipeline. ITK itself is a medical image processing toolkit and uses cmake as build system. My image pipeline project uses cmake as well. According to the user manual of ITK it is favorable to use the "UseITK.cmake" file in the build (out of sourc...

Setting relative output path of PDB files when producing VS 2008 project files

Has anyone been able to modify the destination folder of PDB files using CMake when generating VS 2008 project files to make them relative paths? It seems they always end up using an absolute path and I can't see anyway to easily modify this. As an example one of the pdb files which gets generated is ending up at... E:/3dconcert-...

How to compile a 32-bit binary on a 64-bit linux machine with gcc/cmake

Is it possible to compile a project in 32-bit with cmake and gcc on a 64-bit system? It probably is, but how do I do it? When I tried it the "ignorant" way, without setting any parameters/flags/etc, just setting LD_LIBRARY_PATH to find the linked libraries in ~/tools/lib it seems to ignore it and only look in subdirectories named lib64....

Forcing Eclipse to generate standard Unix makefiles

I have an Eclipse project I've been working on for some time now, and I'd like to open source it. But to do that I'd like to have a clean Makefile like the majority of other open source programs. I understand I could make my own, but it would be better if Eclipse could manage it for me. Getting Eclipse to generate a CMake file would be e...

Building project involving cmake, how do I make it aware of libraries

When I try to build this project with cmake and gcc on a 64-bit linux (debian) machine, I get an error from the linker: Linking C executable ../../../../cpsadamsx /home/dala/lib64/libSimTKcommon.so: undefined reference to `dlopen' /home/dala/lib64/libSimTKcommon.so: undefined reference to `dlclose' /home/dala/lib64/libSimTKcommon.so: un...

Disable testing in cmake

The tests of a project that I try to build fail to build (missing libraries). The tests themselves are not important, but prevents me from building and installing the essential files. So I want to do this as a quick-fix. How do I do to turn of the build of the tests in a cmake project? Should I edit the CMakeLists.txt file in the root o...

Include problems when using CMake with Gnu on Qt project

Hi, I am starting a multiplatform (Win Xp, Linux) qt project. I want to use an out of source build so my directory structure is as followed: project/ CMakeLists.txt (global CMake file, includes other CMakeLists) build/ (my build directory) libA/ CMakeLists.txt mystuff/ subprojectA/ CMakeLists.txt s...

CMake and CTest question

In the test that I want to run using CTest I should be adding the test that I want to run, with the following command: add_test(TestName ExeName) problem is what if I want to supply an argument to the TestName, where do I put it? how do I run ctest individually without cmake in unix command line in this context? ...