cmake

CMake & CTest : make test doesn't build tests.

I'm trying CTest in CMake in order to automatically run some of my tests using make test target. The problem is CMake does not "understand" that the test I'm willing to run has to be built since it is part of the project. So I'm looking for a way to explicitly specify this dependency. ...

Cmake's undefined reference linking error

Hi I am customizing qgis source code that builds through cmake. It has a source tree with many sub directories(with sub-directories withinin them aswell). The whole source tree is divided into modules like core,that has GIS core components,gui that takes care of the gui,app,that takes care of the main app(containing main.cpp) and othe...

CMake, Xcode and Unix Makefile

I was using classic Unix Makefile generator until I found a webpage explaining CMake could produce a nice xcode project file using "cmake -G Xcode" so I ran that command in my source directory and I get a nice xcode project. This is great but I'm facing some drawback and was wondering if there are solutions to these : now I can't build...

Why doesn't Xcode recognize my LIBRARY_SEARCH_PATHS?

I've set LIBRARY_SEARCH_PATHS to /opt/local/lib, and verified that the library in question is there (I'm linking to GLEW): $ls /opt/local/lib libGLEW.1.5.1.dylib libfreetype.a libz.a libGLEW.1.5.dylib libfreetype.dylib libz.dylib libGLEW.a libfreetype.la pkgconfig libGLEW.dylib libz.1.2.3.dylib libfreetype.6.dylib libz.1.dyli...

How to set up CMake to build a library for the iPhone

I'm trying to use CMake to generate an Xcode configuration for the iPhone by manually setting certain attributes. (Is this even the right way to go about this?) My CMake file looks like: project(MYLIB) set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib) set(CMAKE_CONFIGURATION_TYPES Debug Release Debug-iPhone) set(FILES list of my files....

Cmake - setting visual studio intermediate dir

Hi, How do i stop CMake adding .dir to the end of of my IntermdiateDirectory? Eg. IntermediateDirectory="libTea.dir\Debug" Thanks. ...

How to set up CMake to build an app for the iPhone

This is closely related to my previous question, which was about using CMake to build a static library on the iPhone. I got that to work setting the CMAKE_OSX_SYSROOT. However, this doesn't work to build an app. My CMakeLists.txt looks like: project(TEST) set(CMAKE_OSX_SYSROOT iphoneos2.2.1) set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDA...

unit test build files

What are the best policies for unit testing build files? The reason I ask is my company produces highly reliable embedded devices. Software patches are just not an option, as they cost our customers thousands to distribute. Because of this we have very strict code quality procedures(unit tests, code reviews, tracability, etc). Those ...

How to add files to Eclipse CDT project with CMake?

Hi, I'm having problem getting the source and header files added into my Eclipse CDT project with CMake. In my test project (which generates and builds fine) I have the following CMakeLists.txt: cmake_minimum_required(VERSION 2.6) project(WINCA) file(GLOB WINCA_SRC_BASE "${WINCA_SOURCE_DIR}/src/*.cpp") file(GLOB WINCA_SRC_HPP_BASE "${...

Building a Python shared object binding with cmake, which depends upon external libraries.

Hi, We have a c file called dbookpy.c, which will provide a Python binding some C functions. Next we decided to build a proper .so with cmake, but it seems we are doing something wrong with regards to linking the external library 'libdbook' in the binding: The CMakeLists.txt is as follows: PROJECT(dbookpy) FIND_PACKAGE(PythonInterp)...

How to Set Path Environment Variable using CMake and Visual Studio to Run Test

I am using CMake to generate Visual Studio project files. I want to run the test executable after setting the PATH environment variable so that it is able to load the required dll. I tried as per the discussion at http://www.mail-archive.com/[email protected]/msg21493.html but it does not work. Have you used CMake with Visual Studio for ...

Best way to specify sourcefiles in Cmake

Hello there, In Cmake, there are several ways to specify the sourcefiles for a target. One is to use globbing, for example: FILE (GLOB dir/*) an other one is to specify each file individually, and I guess there are even more ways to do this. Which way is the best? Best as in, has more advantages than disadvantages. Globbing seems e...

Makefile equivalent in CMake

I have just started using CMake and it has been less than a week. I have a Makefile written and I am trying to write its equivalent in CMake. I don't have an idea about the commands that I should use in CMake for each of the statements in the given Makefile. How do I get started? Is there some place I can find documentation for this? ...

Why is this boost header file not included

...

How to link against boost.system with cmake

...

Multiplatform C++ Project: Inclusion of platform specific sources

I have for some of my classes different implementations per OS. My source structure is like this: include/AExample.h include/windows/WindowsExample.h include/linux/LinuxExample.h src/AExample.cpp src/windows/WindowsExample.cpp src/linux/LinuxExample.cpp the A* classes are the interfaces for the specific implementations My current bu...

Building C++ on both Windows and Linux

Hi, I'm involved in C++ project targeted for Windows and Linux (RHEL) platforms. Till now the development was purely done on Visual Studio 2008. For Linux compilation we used 3rd party Visual Studio plugin, which read VS solution/perojects files and remotely compiled on Linux machine. Recently the decision was to abandon the 3rd party ...

QT_DIR Not found ...

Hi, I am trying to compile Qt 4.5.2 with ITK. I get the error QT_DIR not found. I compiled QT 4.5.2 from Source. ccmake tells that the directory containing QTConfig.cmake file is the QT_DIR. I am not able to find the file anywhere. Am I missing something? This is the error i'm getting in CMake: CMake Warning at CMakeLists.txt:11 (F...

Cross-platform compiling using Visual Studio 2008

Hi, Given: - C++ code base with more than 500K LOC - The same base code used for Windows (Visual Studio 9 2008) and Linux (RHEL) Most of the frequent task during development is of course edit/compile/fix (therefore we like programming :)). Most of our developers are with Visual Studio background only and IMHO its pretty powerful...

Build system choice?

I am currently setting up a new software project and I want to have an automated build system. The project has a fairly complex involving C, C#. It must also generate automatic bindings (Python, PHP, Java, Ruby, etc.) using an external tool (SWIG). The project should be able to built, and run in Linux, Windows, and possibly Mac OS X. I...