Re: [CMake] Dependencies between independent projects

2012-04-30 Thread Petr Kmoch
Hi Alexander, I had to create a very similar setup at work. My solution was to define a global property for the list of projects to generate. There is a top level CMakeLists.txt file which doesn't define any targets, but just includes all subdirectories as necessary. In pseudo-code, my solution

Re: [CMake] double quotes being removed Windows removing compiler flags

2012-04-30 Thread Petr Kmoch
Hi Luke. Quotes are generally a pain. I haven't tested it, but I would try putting the option specification in quotes (for cmake), like this: set (CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} /MyCustomTool:\$(SolutionDir)\) Petr On Mon, Apr 30, 2012 at 11:36 AM, Luke Snape

Re: [CMake] Is there a setting for Windows DLL file targets that's similar to CMAKE_EXE_LINKER_FLAGS ?

2012-04-28 Thread Petr Kmoch
Hi David, I believe what you're looking for is CMAKE_SHARED_LINKER_FLAGS. Petr On Sat, Apr 28, 2012 at 1:10 AM, david_bjorn...@agilent.com wrote: We here are trying to setup VS2010 for generating code coverage dataand for that I need to add a linker flag /PROFILE . For adding that to exe

[CMake] Calling install() from parent directory

2012-04-26 Thread Petr Kmoch
Hi all, I have a rather complex setup with multiple subdirectories under one top-level CMakeLists.txt file. I need to install some targets defined in subdirectories, but the destination of the install is not known at the time the subdirectory is processed (it potentially depends on stuff which

Re: [CMake] Calling install() from parent directory

2012-04-26 Thread Petr Kmoch
on stuff which happens then the add_subdirectory call should be after that stuff On Thu, Apr 26, 2012 at 2:54 AM, Petr Kmoch petr.km...@gmail.com wrote: Hi all, I have a rather complex setup with multiple subdirectories under one top-level CMakeLists.txt file. I need to install some targets

Re: [CMake] How to start CMake from scratch

2012-04-20 Thread Petr Kmoch
I never used --build myself, but my guess is you can't generate and build the project in a single step. I'd try the following (on a blank setup): cd test/B/build cmake .. cmake --build . When running cmake from the command line to generate a buildsystem, the source directory (where

Re: [CMake] Use-like inheritance

2012-04-19 Thread Petr Kmoch
Depends on who knows the directories to be included. If you're in a situation when B doesn't know which directories A will add, you can use global properties for this purpose. Something like this: #- project(B) define_property(GLOBAL PROPERTY my_include_files ...)

Re: [CMake] Using two sets of compiler flags in same build

2012-04-18 Thread Petr Kmoch
Hi Andre, I can think of two ways. One is using target properties COMPILE_FLAGS and COMPILE_DEFINITIONS to setup flags on a per-target basis. Unfortunately, there's no per-config version of those :-( Another is to separate your targets into directories added by add_subdirectory(). I believe you

Re: [CMake] CustomTargets in separate VS folders?

2012-04-04 Thread Petr Kmoch
Hi NoRulez. Yes, it's possible. It's a two-step process. First, you need to set the global cmake property USE_FOLDERS to true; this enables support for Visual Studio Solution Filters (project grouping). Then, you can set a target's FOLDER property to put it into a specific (sub-)folder. Best,

Re: [CMake] Different targets for different configurations

2012-03-23 Thread Petr Kmoch
Also, this: http://public.kitware.com/Bug/view.php?id=12877 and especially this: http://public.kitware.com/Bug/view.php?id=9974 The latter one even has a patch attached - maybe it could be merged? On Fri, Mar 23, 2012 at 10:33 AM, Mike Krus m...@mve.com wrote: On 23/03/2012 09:10, Mike Krus

Re: [CMake] Working with Multiple Projects

2012-03-20 Thread Petr Kmoch
As far as I know, you can't have two CMake projects in the same directory. Move one of the CMakeLists.txt files to a different one - either create a sudirectory for the subproject, or create a separate directory for the top-level CMakeLists.txt. Note that there is no need for directories added

Re: [CMake] how to modify scope of imported library

2012-03-09 Thread Petr Kmoch
Hi, I was solving a similar problem in our setup at work. The problem was that the parent couldn't know in advance which libraries will be imported by children. Conceptually speaking, I solved this by creating my own set of global properties which contain all necessary details about the libraries

<    1   2   3   4