[CMake] grep at build time?

2015-07-17 Thread Alexandre GOUAILLARD
dear all, I'm trying to use cmake as a super build script for another library build system. Using add_custom_command and add_custom_target I have managed to handle most of the steps so far. My libraries and executable are being built as requested across platform. Now I'm trying to import the gen

Re: [CMake] Using ExternalProject_Add when CMakeFiles.txt is not in the root directory.

2015-07-17 Thread Klaim - Joël Lamotte
On 17 July 2015 at 20:06, Bradley Lowekamp wrote: > Hello, > > David Cole just said the solution in another post. > > You can split the project into two, with the first one being just the > download step, the second is the configuration and build. This should allow > you to configure the paths fo

Re: [CMake] ExternalProject_Add_StepDependencies parallel download/cloning

2015-07-17 Thread Klaim - Joël Lamotte
On 17 July 2015 at 19:48, David Cole wrote: > I have adopted the technique of splitting a project into two > ExternalProject_Add calls, the first of which is named > "download-${projectName}" with empty configure, build and install > stages, and the second of which is named ${projectName} with an

Re: [CMake] Using ExternalProject_Add when CMakeFiles.txt is not in the root directory.

2015-07-17 Thread Bradley Lowekamp
Hello, David Cole just said the solution in another post. You can split the project into two, with the first one being just the download step, the second is the configuration and build. This should allow you to configure the paths for your project correctly. I need to do this for my project to

Re: [CMake] ExternalProject_Add_StepDependencies parallel download/cloning

2015-07-17 Thread David Cole via CMake
I have adopted the technique of splitting a project into two ExternalProject_Add calls, the first of which is named "download-${projectName}" with empty configure, build and install stages, and the second of which is named ${projectName} with an empty download step (using DOWNLOAD_COMMAND ""). The

[CMake] ExternalProject_Add_StepDependencies parallel download/cloning

2015-07-17 Thread Klaim - Joël Lamotte
I am setting up a bunch of dependencies using ExternalProject module. One of the dependencies, say A, needs another dependency B to be built before A can be built. ExternalProject_Add_StepDependencies solves the problem fine. However, I did it this way: ExternalProject_Add_StepDependencies( A con

[CMake] Toolchain file for VS2013 + November CTP compiler toolset?

2015-07-17 Thread Robert Dailey
Hello, How would I define a toolchain file for the Visual Studio 2013 generator that also defines the toolset for that generator to be the November CTP compiler? I'd rather use a toolchain for this than do -D definitions when I invoke cmake to generate. Thanks in advance. -- Powered by www.kit

[CMake] "Utility' targets with ninja generator?

2015-07-17 Thread Chris Green
Hi, With "UNIX Makefiles" I'm used to being able to cd into a subdirectory containing e.g. a C++ source file for which I need to examine the pre-processed source and typing something like, "make MyClass.i" I can also compile (for fast development cycle and clarity purposes) a single source fi

Re: [CMake] config-specific compiler definitions don't work properly

2015-07-17 Thread Petr Kmoch
Hi. Looking at the documentation ( http://www.cmake.org/cmake/help/v3.3/manual/cmake-properties.7.html#properties-on-directories , http://www.cmake.org/cmake/help/v3.3/manual/cmake-properties.7.html#properties-on-targets ), you will find that neither the directory property nor the target property

Re: [CMake] config-specific compiler definitions don't work properly

2015-07-17 Thread Nils Gladitz
On 17.07.2015 15:08, Xi Yang wrote: I'm trying to use config-specific definitions, but it seems doesn't work in VS2013. This is the CMakeLists.txt: cmake_minimum_required(VERSION 3.0) set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG FOO ) set_property(DIRECTORY PROPERTY COMPILE_

[CMake] config-specific compiler definitions don't work properly

2015-07-17 Thread Xi Yang
Hi everyone! I'm trying to use config-specific definitions, but it seems doesn't work in VS2013. This is the CMakeLists.txt: cmake_minimum_required(VERSION 3.0) set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_DEBUG FOO ) set_property(DIRECTORY PROPERTY COMPILE_DEFINITIONS_RELEASE