[CMake] include_directories SYSTEM and they propagation to target

2019-07-30 Thread Roman Savchenko
HI all, I will appreciate if you could help me with one question. >From manual: *include_directories:* *They are also added to the INCLUDE_DIRECTORIES target property for each target in the curren

Re: [CMake] include_directories converting CMAKE_BINARY_DIR into relative path

2018-01-09 Thread Russell L. Carter
Ah well, I figured out the problem, it was located between my chair and my keyboard. Everything works perfectly now. I sure do love cmake. Thanks, Russell On 01/09/18 15:46, Russell L. Carter wrote: Greetings, I am trying to generate a platform specific file by copying it from the source tre

[CMake] include_directories converting CMAKE_BINARY_DIR into relative path

2018-01-09 Thread Russell L. Carter
Greetings, I am trying to generate a platform specific file by copying it from the source tree into a specific directory in the separate out-of-source build tree. The file generation works fine. When I try the following cmake code: set(target_dir ${CMAKE_BINARY_DIR}/nail/platform) message("tar

[CMake] include_directories question

2016-01-31 Thread Michael Surette
I have the following CMakeLists file which builds one of the examples in FLTK as a separate project. --- cmake_minimum_required(VERSION 2.6) project(CubeView) set(FLTK_DIR /home/msurette/build/fltk-release/) find_package(FLTK REQUIRED NO_MODULE) include(${FLTK_USE_FILE}) #run fluid -c to gen

[CMake] include_directories system keyword explicit behavior

2014-04-30 Thread Maikel
I have question with regards of using SYSTEM keyword within include_directories functions, as if you are having following setup: include_directories(dir1 SYSTEM dir2 dir3) In this case both dir2 and dir3 will have '-isystem' and dir1 is having '-i'. Wouldn't it be better to make the SYSTEM keywor

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-19 Thread David Cole
That's just the quick brain dump version. If necessary, I can actually look at old commits, or the current code to try to refresh my memory. I think that's needed. Can you do that research into the commits and discussion? Please see the results of my "research" (aka, old commits detective

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-12 Thread David Cole
>>> Should I file this as a bug in the issue tracker then? >> Sure. Especially if you have an easy way to reproduce. (Either >> reference an external, publicly available project we can "just >> build" and get it to happen, or attach a CMakeLists that >> demonstrates the issue if possible.) >> >>

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-12 Thread David Cole
That's just the quick brain dump version. If necessary, I can actually look at old commits, or the current code to try to refresh my memory. I think that's needed. Can you do that research into the commits and discussion? I know it's been a week now I'm still getting to this. Will re-o

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-11 Thread Marcel Loose
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 op 10-02-14 13:38, David Cole schreef: >> Should I file this as a bug in the issue tracker then? > > > Sure. Especially if you have an easy way to reproduce. (Either > reference an external, publicly available project we can "just > build" and get it

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-10 Thread David Cole
Should I file this as a bug in the issue tracker then? Sure. Especially if you have an easy way to reproduce. (Either reference an external, publicly available project we can "just build" and get it to happen, or attach a CMakeLists that demonstrates the issue if possible.) That way, we ca

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-09 Thread Marcel Loose
cal fashion. > > That's just the quick brain dump version. If necessary, I can actually > look at old commits, or the current code to try to refresh my memory. > > > D > > > > -Original Message- > From: Brad King > To: Marcel Loose > Cc: cma

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-04 Thread Stephen Kelly
David Cole wrote: > That's just the quick brain dump version. If necessary, I can actually > look at old commits, or the current code to try to refresh my memory. > I think that's needed. Can you do that research into the commits and discussion? Thanks, Steve. -- Powered by www.kitware.co

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-03 Thread David Cole
ge- From: Brad King To: Marcel Loose Cc: cmake ; David Cole ; Stephen Kelly Sent: Mon, Feb 3, 2014 11:51 am Subject: Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...) On 01/30/2014 03:08 AM, Marcel Loose wrote: cmake was consu

Re: [CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-02-03 Thread Brad King
On 01/30/2014 03:08 AM, Marcel Loose wrote: > cmake was consuming a whopping 14GB(!) of RAM memory. [snip] > include_directories() is used inside a macro that is called > quite a lot in order to resolve cross-dependencies. This never was a > problem, because CMake automatically performed de-duplica

[CMake] include_directories(...) versus set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ...)

2014-01-30 Thread Marcel Loose
Hi all, Recently I ran into a problem with a medium-large sized project with newer CMakes. At first I didn't know what was going on: a cmake run started to crawl, until it almost came to a standstill and then the OS killed my login session. It turned out that, just before being logged out forcibly

Re: [CMake] Include_directories looks for Boost twice / Problem with if statement

2012-12-11 Thread Raymond Wan
Hi Jakub, On Fri, Dec 7, 2012 at 4:46 PM, Jakub Zakrzewski wrote: > Hi > Did you think about something like this: > > ADD_DEFINITIONS (-DBOOST_ALL_NO_LIB) > SET (BOOST_ROOT $ENV{BOOST_ROOT}) > SET (Boost_NO_SYSTEM_PATHS ON) > SET (Boost_USE_MULTITHREADED ON) > SET (Boost_USE_STATIC_RUNTIME OFF)

Re: [CMake] Include_directories looks for Boost twice / Problem with if statement

2012-12-07 Thread Jakub Zakrzewski
Raymond Wan Sent: Donnerstag, 6. Dezember 2012 18:45 To: cmake@cmake.org Subject: [CMake] Include_directories looks for Boost twice / Problem with if statement Hi all, I have two CMakeFile.txt's for a C++ project where one includes the other. In both cases, I'm searching for Boost. S

[CMake] Include_directories looks for Boost twice / Problem with if statement

2012-12-06 Thread Raymond Wan
Hi all, I have two CMakeFile.txt's for a C++ project where one includes the other. In both cases, I'm searching for Boost. So, to make this easier, suppose I call one project "parent" and the other "child" such that "parent"'s CMakefile.txt has: INCLUDE_DIRECTORIES (child) where child is a sub

Re: [CMake] INCLUDE_DIRECTORIES (command vs target property)

2012-10-22 Thread David Cole
If you want to APPEND, then use set_property with APPEND. http://cmake.org/cmake/help/v2.8.9/cmake.html#command:set_property HTH, David On Mon, Oct 22, 2012 at 9:05 AM, Micha Renner wrote: > Hello, > > The target property INCLUDE_DIRECTORIES overwrites the > include_directories command valu

[CMake] INCLUDE_DIRECTORIES (command vs target property)

2012-10-22 Thread Micha Renner
Hello, The target property INCLUDE_DIRECTORIES overwrites the include_directories command values. A better way would have been that the values of the include_directories command would appended to the values of the target property INCLUDE_DIRECTORIES. I think that would make more sense. INCLUDE_D

Re: [CMake] "include_directories" help

2012-08-07 Thread David Cole
On Thu, Aug 2, 2012 at 4:09 PM, John L. Poole wrote: > I'm either completely misunderstanding how the CMake command > "include_directories" works > or something in my Windows MinGW/CMake (2.8.8) is not working. > > BACKGROUND: > > http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:include_d

[CMake] "include_directories" help

2012-08-02 Thread John L. Poole
I'm either completely misunderstanding how the CMake command "include_directories" works or something in my Windows MinGW/CMake (2.8.8) is not working. BACKGROUND: http://www.cmake.org/cmake/help/v2.8.8/cmake.html#command:include_directories specifies: "Add the given directories to those the c

Re: [CMake] include_directories() and duplicates

2011-11-02 Thread Michael Hertling
On 11/02/2011 06:54 PM, Robert Dailey wrote: > Does the include_directories() command strip out duplicate paths added? Yes, it does; see the following exemplary project: CMAKE_MINIMUM_REQUIRED(VERSION 2.8 FATAL_ERROR) PROJECT(INCLUDE C) SET(CMAKE_VERBOSE_MAKEFILE ON) FILE(WRITE ${CMAKE_BINARY_DIR

[CMake] include_directories() and duplicates

2011-11-02 Thread Robert Dailey
Does the include_directories() command strip out duplicate paths added? - Robert Dailey -- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmak

Re: [CMake] include_directories(SYSTEM, GNU.cmake and -isystem for C (not CXX)

2011-06-13 Thread Brad King
On 06/11/2011 02:08 AM, Campbell Barton wrote: > To follow up on this, I tested this on a test project and found the > problem was in my own macro which wasn't initializing an include list. > So only the set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ") remains > which should be fixed in CMake but is e

Re: [CMake] include_directories(SYSTEM, GNU.cmake and -isystem for C (not CXX)

2011-06-10 Thread Campbell Barton
To follow up on this, I tested this on a test project and found the problem was in my own macro which wasn't initializing an include list. So only the set(CMAKE_INCLUDE_SYSTEM_FLAG_C "-isystem ") remains which should be fixed in CMake but is easy to workaround. On Thu, Jun 9, 2011 at 10:59 PM, Mi

Re: [CMake] include_directories(SYSTEM, GNU.cmake and -isystem for C (not CXX)

2011-06-09 Thread Michael Hertling
On 06/08/2011 07:26 AM, Campbell Barton wrote: > There were some system headers giving warnings compiling on linux, > since I like to have warnings as errors, and not edit system headers, > I used: > include_directories(SYSTEM dir1 dir2 ...) > ... for system directories only. > > However this doe

[CMake] include_directories(SYSTEM, GNU.cmake and -isystem for C (not CXX)

2011-06-07 Thread Campbell Barton
There were some system headers giving warnings compiling on linux, since I like to have warnings as errors, and not edit system headers, I used: include_directories(SYSTEM dir1 dir2 ...) ... for system directories only. However this does not result in -isystem being used in C because GNU.cmake do

Re: [CMake] include_directories and relative paths

2011-02-22 Thread John Drescher
> I don't need to move/copy "CMake build tree", I just want to generate > and move/copy "VC proj/solution files". You can not generate portable Visual Studio solution files with CMake. The solution files generated would still require CMake. Its best not to even package these. Just use CMake on all

Re: [CMake] include_directories and relative paths

2011-02-22 Thread gekso
I don't need to move/copy "CMake build tree", I just want to generate and move/copy "VC proj/solution files". As I understand there will be no problem, if I have relative paths. Also I can't just use $(Variable) in paths? 2011/2/22 David Cole : > Please see the FAQ on the CMake Wiki: > http://www.

Re: [CMake] include_directories and relative paths

2011-02-22 Thread David Cole
Please see the FAQ on the CMake Wiki: http://www.cmake.org/Wiki/CMake_FAQ#Why_does_CMake_use_full_paths.2C_or_can_I_copy_my_build_tree.3F No, you can't move your build tree to another computer, and no you can't eliminate the full path references. On Tue, Feb 22, 2011 at 1:59 PM, gekso wrote: >

[CMake] include_directories and relative paths

2011-02-22 Thread gekso
Hello! I use INCLUDE_DIRECTORIES with relative-style paths, like ..\include or $(Var)\include. After configuration I receive project with absolute-style includes, like C:\aaa\..\include or C:\aaa\$(Var)\include.. Can I remove this prefix(I suppose it's CMAKE_CURRENT_SOURCE_DIR) somehow? I need to g

[CMake] include_directories order

2010-10-05 Thread Andrea Galeazzi
I'm using include_directories in one of my projects to produce an eclipse mingw project. The problem is that even if I use the BEFORE option my include paths are alway after the mingw ones. How can I specify my own include paths to be the first ones? __

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-05 Thread Clinton Stimpson
On 08/05/2010 03:28 AM, Dennis Schridde wrote: On Monday 02 August 2010 17:20:36 Dennis Schridde wrote: Replacing ".framework" with "\\.framework" works. Was this change already commited? I.e. is the problem solved in the sources now? Yes, it is in git, but its still waiting for

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-05 Thread Michael Wild
Ah yes, I always keep forgetting that you have to get the \ past the CMake parser... :-( Sorry for the noise. Michael On 5. Aug, 2010, at 12:07 , David Cole wrote: > No, he's right. "\\." when used in a CMake string(REGEX operation matches a > single dot exactly. The "\\" is required to get a

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-05 Thread Dennis Schridde
On Thursday 05 August 2010 11:39:00 Michael Wild wrote: > On 5. Aug, 2010, at 11:28 , Dennis Schridde wrote: > > On Monday 02 August 2010 17:20:36 Dennis Schridde wrote: > >> Replacing > > > > ".framework" with "\\.framework" works. > > Was this change already > > commited? > > I.e. is the problem

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-05 Thread David Cole
No, he's right. "\\." when used in a CMake string(REGEX operation matches a single dot exactly. The "\\" is required to get a single "\" into the regular expression engine. On Thu, Aug 5, 2010 at 5:39 AM, Michael Wild wrote: > > On 5. Aug, 2010, at 11:28 , Dennis Schridde wrote: > > > On Monday

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-05 Thread Michael Wild
On 5. Aug, 2010, at 11:28 , Dennis Schridde wrote: > On Monday 02 August 2010 17:20:36 Dennis Schridde wrote: >> Replacing > ".framework" with "\\.framework" works. > Was this change already > commited? > I.e. is the problem solved in the sources now? > > --Dennis IMHO this is wrong. \\. search

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-05 Thread Dennis Schridde
On Monday 02 August 2010 17:20:36 Dennis Schridde wrote: > Replacing ".framework" with "\\.framework" works. Was this change already commited? I.e. is the problem solved in the sources now? --Dennis signature.asc Description: This is a digitally signed message part. _

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-02 Thread Dennis Schridde
On Monday 02 August 2010 17:09:09 Clinton Stimpson wrote: > On 08/02/2010 09:02 AM, Michael Wild wrote: > > I didn't look into the source code, but looks like there is some REGEX > > REPLACE which is too simplistic. Probably there is a missing escape for > > the . character, thus making it also mat

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-02 Thread Dennis Schridde
On Monday 02 August 2010 17:09:09 Clinton Stimpson wrote: > On 08/02/2010 09:02 AM, Michael Wild wrote: > > I didn't look into the source code, but looks like there is some REGEX > > REPLACE which is too simplistic. Probably there is a missing escape for > > the . character, thus making it also mat

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-02 Thread Clinton Stimpson
On 08/02/2010 09:02 AM, Michael Wild wrote: On 2. Aug, 2010, at 16:44 , Dennis Schridde wrote: Hello! I setup include_directories and then call qt4_wrap_cpp for a set of files. What I am seeing now is that the set of -I flags for moc are different from those for the compiler: include_dire

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-02 Thread Michael Wild
On 2. Aug, 2010, at 16:44 , Dennis Schridde wrote: > Hello! > > I setup include_directories and then call qt4_wrap_cpp for a set of > files. What I am seeing now is that the set of -I flags for moc are > different from those for the > compiler: > > include_directories(/a/b/c/lib/mylib/framework

Re: [CMake] include_directories and qt4_wrap_cpp

2010-08-02 Thread Dennis Schridde
On Monday 02 August 2010 16:44:42 Dennis Schridde wrote: > My first guess is that CMake detects the pattern lib/mylib/framework as > something special, strips the mylib/framework part, and thus screws up. P.S: This seems to be a correct guess. Creating a symlink "src -> framework" and using that in

[CMake] include_directories and qt4_wrap_cpp

2010-08-02 Thread Dennis Schridde
Hello! I setup include_directories and then call qt4_wrap_cpp for a set of files. What I am seeing now is that the set of -I flags for moc are different from those for the compiler: include_directories(/a/b/c/lib/mylib/framework) qt4_wrap_cpp(MOC testfile.hpp) [<< Commandlines shortened for read

Re: [CMake] INCLUDE_DIRECTORIES empty?

2010-03-17 Thread David Doria
> The syntax is: > > INCLUDE_DIRECTORIES(../../include) > > This will append to the already existing include directories. > > Michael > Ok. And then how do I see the list of everything that has been added to INCLUDE_DIRECTORIES? Thanks, David ___ Power

Re: [CMake] INCLUDE_DIRECTORIES empty?

2010-03-17 Thread David Doria
> As I said, it's a directory-property: > > get_property(inc_dirs DIRECTORY PROPERTY INCLUDE_DIRECTORIES) > message("inc_dirs = ${inc_dirs}") > > > Michael Gotcha. Thanks a lot! David ___ Powered by www.kitware.com Visit other Kitware open-source proje

Re: [CMake] INCLUDE_DIRECTORIES empty?

2010-03-17 Thread Michael Wild
On 17. Mar, 2010, at 14:45 , David Doria wrote: >> This is a read-only directory property: >> >> http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_dir:INCLUDE_DIRECTORIES >> >> Michael > > That's ok, all I want to do is read it. That's why I thought it would just be: > > MESSAGE("INCLU

Re: [CMake] INCLUDE_DIRECTORIES empty?

2010-03-17 Thread David Doria
> This is a read-only directory property: > > http://www.cmake.org/cmake/help/cmake-2-8-docs.html#prop_dir:INCLUDE_DIRECTORIES > > Michael That's ok, all I want to do is read it. That's why I thought it would just be: MESSAGE("INCLUDE_DIRECTORIES: ${INCLUDE_DIRECTORIES}") But I guess INCLUDE_DIR

Re: [CMake] INCLUDE_DIRECTORIES empty?

2010-03-17 Thread Michael Wild
On 17. Mar, 2010, at 14:34 , David Doria wrote: >> The syntax is: >> >> INCLUDE_DIRECTORIES(../../include) >> >> This will append to the already existing include directories. >> >> Michael >> > > Ok. And then how do I see the list of everything that has been added > to INCLUDE_DIRECTORIES? >

Re: [CMake] INCLUDE_DIRECTORIES empty?

2010-03-17 Thread Michael Wild
On 17. Mar, 2010, at 13:58 , David Doria wrote: > If I do something like this: > > INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ../../include) > > I'd expect ../../include to be appended to the current INCLUDE_DIRECTORIES. > > So then when I do this: > MESSAGE("INCLUDE_DIRECTORIES: ${INCLUDE_DI

[CMake] INCLUDE_DIRECTORIES empty?

2010-03-17 Thread David Doria
If I do something like this: INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES} ../../include) I'd expect ../../include to be appended to the current INCLUDE_DIRECTORIES. So then when I do this: MESSAGE("INCLUDE_DIRECTORIES: ${INCLUDE_DIRECTORIES}") at the very least, I should see ../../include, but p

Re: [CMake] INCLUDE_DIRECTORIES and relative path

2009-11-03 Thread Bill Hoffman
jago jagoc wrote: Hi Bill, Sorry if i reply the issues but it's strange that the INCLUDE_DIRECTORIES add the project dir to all its parameter. Is there a way to include some dir with INCLUDE_DIRECTORIES macro without the project directory before? I would like to add only a relative path ..\..\in

Re: [CMake] INCLUDE_DIRECTORIES and relative path

2009-11-03 Thread jago jagoc
Hi Bill, Sorry if i reply the issues but it's strange that the INCLUDE_DIRECTORIES add the project dir to all its parameter. Is there a way to include some dir with INCLUDE_DIRECTORIES macro without the project directory before? I would like to add only a relative path ..\..\include to my Visual

Re: [CMake] INCLUDE_DIRECTORIES and relative path

2009-11-02 Thread Bill Hoffman
jago jagoc wrote: jago jagoc wrote: Hi, I am some problem using INCLUDE_DIRECTORIES macro, i am using Cmake 2.6 - path 0 and Visual studio 2005. In my Cmakelist.txt ... SET(MYINCLUDE_DIR "../3rdParty/include" CACHE STRING "My include dir You may add additional search paths here. Use ; to separat

[CMake] INCLUDE_DIRECTORIES and relative path

2009-11-02 Thread jago jagoc
>>jago jagoc wrote: >> Hi, >> I am some problem using INCLUDE_DIRECTORIES macro, i am using Cmake >> 2.6 - path 0 and Visual studio 2005. >> In my Cmakelist.txt >> >> ... >> SET(MYINCLUDE_DIR "../3rdParty/include" CACHE STRING "My include dir >> You may add additional search paths here. Use ; to se

Re: [CMake] INCLUDE_DIRECTORIES and relative path

2009-11-02 Thread Bill Hoffman
jago jagoc wrote: Hi, I am some problem using INCLUDE_DIRECTORIES macro, i am using Cmake 2.6 - path 0 and Visual studio 2005. In my Cmakelist.txt ... SET(MYINCLUDE_DIR "../3rdParty/include" CACHE STRING "My include dir You may add additional search paths here. Use ; to separate multiple paths."

[CMake] INCLUDE_DIRECTORIES and relative path

2009-11-02 Thread jago jagoc
Hi, I am some problem using INCLUDE_DIRECTORIES macro, i am using Cmake 2.6 - path 0 and Visual studio 2005. In my Cmakelist.txt ... SET(MYINCLUDE_DIR "../3rdParty/include" CACHE STRING "My include dir You may add additional search paths here. Use ; to separate multiple paths.") INCLUDE_DIRECTOR

Re: [CMake] include_directories - newbie

2009-07-20 Thread Alexander Neundorf
On Friday 17 July 2009, Mark Lohry wrote: > I have this snipped in my cmakelists: > > IF( EXISTS "/someabsolutedirectory/unixem-1.8.2/include/glob2.h" ) > message( "/someabsolutedirectory/unixem-1.8.2/include/glob2.h exists" ) > ENDIF( EXISTS "/someabsolutedirectory/unixem-1.8.2/include/glob2.h

[CMake] include_directories - newbie

2009-07-17 Thread Mark Lohry
I have this snipped in my cmakelists: IF( EXISTS "/someabsolutedirectory/unixem-1.8.2/include/glob2.h" ) message( "/someabsolutedirectory/unixem-1.8.2/include/glob2.h exists" ) ENDIF( EXISTS "/someabsolutedirectory/unixem-1.8.2/include/glob2.h" ) INCLUDE_DIRECTORIES( "/someabsolutedirectory/u

Re: [CMake] include_directories per target

2009-05-13 Thread Bill Hoffman
Olivier Delannoy wrote: I have probably wrongly explained my issue. I have my source code located in several folders based on the component / library they are part of. But I don't want to have recursive make so I don't want to have my project relying on add_subdirectory(). Thus all my target are

Re: [CMake] include_directories per target

2009-05-13 Thread Olivier Delannoy
I have probably wrongly explained my issue. I have my source code located in several folders based on the component / library they are part of. But I don't want to have recursive make so I don't want to have my project relying on add_subdirectory(). Thus all my target are located in the main direct

Re: [CMake] include_directories per target

2009-05-13 Thread John Drescher
On Wed, May 13, 2009 at 8:50 AM, wrote: > Olivier Delannoy wrote: >> I would like to set include_directories on a per target basis. I >> understand that the INCLUDE_DIRECTORIES property is currently on a per >> folder basis. It is a bit of a problem as I would like to flatten my >> build and hav

[CMake] include_directories per target

2009-05-13 Thread David . Karr
Olivier Delannoy wrote: > I would like to set include_directories on a per target basis. I > understand that the INCLUDE_DIRECTORIES property is currently on a per > folder basis. It is a bit of a problem as I would like to flatten my > build and have all my targets generated in a single destinati

[CMake] include_directories per target

2009-05-12 Thread Olivier Delannoy
Hi, I would like to set include_directories on a per target basis. I understand that the INCLUDE_DIRECTORIES property is currently on a per folder basis. It is a bit of a problem as I would like to flatten my build and have all my targets generated in a single destination folder. Is there any way t

Re: [CMake] INCLUDE_DIRECTORIES per *file*

2009-04-13 Thread Andreas Pakulat
On 11.04.09 23:57:22, Yevgen Muntyan wrote: > Hi there, > > Recently there was a thread about INCLUDE_DIRECTORIES() where the > solution was to > have it per directory, and also I recently asked how to convert a > project with libtool convenience > libraries (see below). I was told to set compi

[CMake] INCLUDE_DIRECTORIES per *file*

2009-04-11 Thread Yevgen Muntyan
Hi there, Recently there was a thread about INCLUDE_DIRECTORIES() where the solution was to have it per directory, and also I recently asked how to convert a project with libtool convenience libraries (see below). I was told to set compile flags on source files, which does work, but I also nee

Re: [CMake] INCLUDE_DIRECTORIES per project

2009-04-10 Thread Philip Lowman
On Sat, Apr 11, 2009 at 12:17 AM, Adrian Boeing wrote: > Great, thanks Philip! It would be fantastic if CMake included this > feature in future. > > Just for clarification to make sure I haven't misunderstood, the > solution Alex proposed would not do what I wanted (separate includes) > because b

Re: [CMake] INCLUDE_DIRECTORIES per project

2009-04-10 Thread Adrian Boeing
Great, thanks Philip! It would be fantastic if CMake included this feature in future. Just for clarification to make sure I haven't misunderstood, the solution Alex proposed would not do what I wanted (separate includes) because both files are in the same directory? What Alex is suggesting would w

Re: [CMake] INCLUDE_DIRECTORIES per project

2009-04-10 Thread Philip Lowman
On Fri, Apr 10, 2009 at 5:03 PM, Alexander Neundorf wrote: > On Friday 10 April 2009, Adrian Boeing wrote: > > Hi, > > > > I would like to have a portable way of having separate include > > directories for each 'project' in my visual studio 'solution'. > > ie: > > common/ > > dir/file1 > > dir/fi

Re: [CMake] INCLUDE_DIRECTORIES per project

2009-04-10 Thread Alexander Neundorf
On Friday 10 April 2009, Adrian Boeing wrote: > Hi, > > I would like to have a portable way of having separate include > directories for each 'project' in my visual studio 'solution'. > ie: > common/ > dir/file1 > dir/file2 > > share the include directory 'common' , and have seperate 'include1' > a

[CMake] INCLUDE_DIRECTORIES per project

2009-04-09 Thread Adrian Boeing
Hi, I would like to have a portable way of having separate include directories for each 'project' in my visual studio 'solution'. ie: common/ dir/file1 dir/file2 share the include directory 'common' , and have seperate 'include1' and 'include2' directories. This would correspond to two 'projects'

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-27 Thread Hugo Heden
2008/11/26 Bill Hoffman <[EMAIL PROTECTED]>: > The concept of a directory property in CMake is not one to one with the disk > directories. A directory in CMake is a directory that has a list of > targets in it. You can have a target that uses files from all sorts of > different directories. So

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-26 Thread Sean Soria
Thanks for all your help Bill. And thanks for clearing up my perception of directories. That's a big help. On Wed, Nov 26, 2008 at 12:41 PM, Bill Hoffman <[EMAIL PROTECTED]> wrote: > Sean Soria wrote: >> >> Sorry, I got myself confused with COMPILE_DEFINITIONS. It is >> INCLUDE_DIRECTORIES that

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-26 Thread Bill Hoffman
Sean Soria wrote: Sorry, I got myself confused with COMPILE_DEFINITIONS. It is INCLUDE_DIRECTORIES that I wanted. Why is this a directory property if it can only be set for certain directories (those that contain targets or whose subdirectories contain targets)? The concept of a directory prop

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-26 Thread Sean Soria
Sorry, I got myself confused with COMPILE_DEFINITIONS. It is INCLUDE_DIRECTORIES that I wanted. Why is this a directory property if it can only be set for certain directories (those that contain targets or whose subdirectories contain targets)? On Wed, Nov 26, 2008 at 12:20 PM, Sean Soria <[EMAI

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-26 Thread Sean Soria
Yes, but now you've defined a new target. Can I do it without a new target, as in my original example with add_executable(hello main.c foo/bar.c). On Wed, Nov 26, 2008 at 12:16 PM, Bill Hoffman <[EMAIL PROTECTED]> wrote: > Sean Soria wrote: >> >> Yea, the example was an example. I changed it to

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-26 Thread Bill Hoffman
Sean Soria wrote: Yea, the example was an example. I changed it to foo/bar.c so no more multiple main files. Why is it that source file property COMPILE_FLAGS would work but not COMPILE_DEFINITIONS? What is the point of having COMPILE_DEFINITIONS for source level if it's not obeyed? COMPILE_D

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-26 Thread Sean Soria
Yea, the example was an example. I changed it to foo/bar.c so no more multiple main files. Why is it that source file property COMPILE_FLAGS would work but not COMPILE_DEFINITIONS? What is the point of having COMPILE_DEFINITIONS for source level if it's not obeyed? On Wed, Nov 26, 2008 at 6:59

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-26 Thread Bill Hoffman
Bill Hoffman wrote: Sean Soria wrote: No, this doesn't work either: CMakeLists.txt: ADD_SUBDIRECTORY(foo) ADD_EXECUTABLE(hello main.c foo/main.c) foo/CMakeLists.txt: SET_PROPERTY(SOURCE main.c PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}) I might be missing something but why not:

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-26 Thread Bill Hoffman
Sean Soria wrote: No, this doesn't work either: CMakeLists.txt: ADD_SUBDIRECTORY(foo) ADD_EXECUTABLE(hello main.c foo/main.c) foo/CMakeLists.txt: SET_PROPERTY(SOURCE main.c PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}) I might be missing something but why not: INCLUDE_DIRECTORIES

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
Okay, I tried it out just to make sure. It includes the foo directory for both main.c and foo/bar.c. I only want it for foo/bar.c (and any other file in foo/). On Tue, Nov 25, 2008 at 3:10 PM, Sean Soria <[EMAIL PROTECTED]> wrote: > That would add the included directories to every source in the

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
I think you hit send too early. On Tue, Nov 25, 2008 at 3:41 PM, THE HIGHHAT <[EMAIL PROTECTED]> wrote: > On Tue, Nov 25, 2008 at 4:10 PM, Sean Soria <[EMAIL PROTECTED]> wrote: >> That would add the included directories to every source in the >> project. I want it included _only_ for the foo dire

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread THE HIGHHAT
On Tue, Nov 25, 2008 at 4:10 PM, Sean Soria <[EMAIL PROTECTED]> wrote: > That would add the included directories to every source in the > project. I want it included _only_ for the foo directory. Not necessarily. This would those headers files associated with main.c. The ___

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
That would add the included directories to every source in the project. I want it included _only_ for the foo directory. On Tue, Nov 25, 2008 at 2:59 PM, THE HIGHHAT <[EMAIL PROTECTED]> wrote: > On Tue, Nov 25, 2008 at 3:43 PM, Sean Soria <[EMAIL PROTECTED]> wrote: >> No, this doesn't work either

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread THE HIGHHAT
On Tue, Nov 25, 2008 at 3:43 PM, Sean Soria <[EMAIL PROTECTED]> wrote: > No, this doesn't work either: > CMakeLists.txt: > ADD_SUBDIRECTORY(foo) > ADD_EXECUTABLE(hello main.c foo/main.c) > > foo/CMakeLists.txt: > SET_PROPERTY(SOURCE main.c PROPERTY INCLUDE_DIRECTORIES > ${CMAKE_CURRENT_SOURCE_DIR})

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
No, this doesn't work either: CMakeLists.txt: ADD_SUBDIRECTORY(foo) ADD_EXECUTABLE(hello main.c foo/main.c) foo/CMakeLists.txt: SET_PROPERTY(SOURCE main.c PROPERTY INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR}) On Tue, Nov 25, 2008 at 2:26 PM, Sean Soria <[EMAIL PROTECTED]> wrote: > Include doe

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
Include doesn't seem to do what I would expect either. I want to add include directories for any files found in foo. it seems include_directories doesn't do it because there must be a target in that directory. would setting the source property do it? On Tue, Nov 25, 2008 at 2:10 PM, Bill Hoffma

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Bill Hoffman
Sean Soria wrote: I had them switched originally and just double checked. This also doesn't work: CMakeLists.txt: ADD_SUBDIRECTORY(foo) ADD_EXECUTABLE(hello main.c foo/main.c) foo/CMakeLists.txt: INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) The problem is the add_subdirectory. Although

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
I had them switched originally and just double checked. This also doesn't work: CMakeLists.txt: ADD_SUBDIRECTORY(foo) ADD_EXECUTABLE(hello main.c foo/main.c) foo/CMakeLists.txt: INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) On Tue, Nov 25, 2008 at 1:54 PM, Bill Hoffman <[EMAIL PROTECTED]> wro

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Bill Hoffman
Sean Soria wrote: CMakeLists.txt: ADD_EXECUTABLE(hello main.c foo/main.c) ADD_SUBDIRECTORY(foo) foo/CMakeLists.txt: INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) It is order dependent. So, the include_directory will not affect the hello target because it comes after it. -Bill

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
CMakeLists.txt: ADD_EXECUTABLE(hello main.c foo/main.c) ADD_SUBDIRECTORY(foo) foo/CMakeLists.txt: INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) main.c files are empty because this is just a test of checking the compile line. On Tue, Nov 25, 2008 at 1:31 PM, Bill Hoffman <[EMAIL PROTECTED]> wr

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Bill Hoffman
Sean Soria wrote: I wouldn't expect that to work since I can see that it got the memo to include that directory but just doesn't do it. But I tried it out by using INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) and I got the same bad results. That should work, if you could provide a small e

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
I wouldn't expect that to work since I can see that it got the memo to include that directory but just doesn't do it. But I tried it out by using INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}) and I got the same bad results. On Tue, Nov 25, 2008 at 5:30 AM, Hugo Heden <[EMAIL PROTECTED]> wrote:

Re: [CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Hugo Heden
2008/11/25 Sean Soria <[EMAIL PROTECTED]>: > CMakeLists.txt: > INCLUDE_DIRECTORIES(.) > ADD_SUBDIRECTORY(foo) > ADD_EXECUTABLE(hello main.c foo/main.c) > How about an absolute path instead of a relative? INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_SOURCE_DIR} ) > foo/CMakeLists.txt: > INCLUDE_DIRECTORI

[CMake] INCLUDE_DIRECTORIES in sub-directories doesn't work?

2008-11-25 Thread Sean Soria
CMakeLists.txt: INCLUDE_DIRECTORIES(.) ADD_SUBDIRECTORY(foo) ADD_EXECUTABLE(hello main.c foo/main.c) foo/CMakeLists.txt: INCLUDE_DIRECTORIES(.) I would expect foo/main.c to be compiled with: /usr/bin/gcc -I/code/xbmc/XBMC/build.test/. -I/code/xbmc/XBMC/build.test/foo/. -o CMakeFiles/hello.dir

Re: [CMake] INCLUDE_DIRECTORIES problem...

2008-11-16 Thread BRM
Message From: Bill Hoffman <[EMAIL PROTECTED]> To: BRM <[EMAIL PROTECTED]> Cc: Christopher Harvey <[EMAIL PROTECTED]>; CMake Sent: Sunday, November 16, 2008 3:31:38 AM Subject: Re: [CMake] INCLUDE_DIRECTORIES problem... BRM wrote: > ${project_SOURCE_DIR} is pointing to the

Re: [CMake] INCLUDE_DIRECTORIES problem...

2008-11-15 Thread Bill Hoffman
BRM wrote: ${project_SOURCE_DIR} is pointing to the root as I thought it would be. Another suggestion was to use ${PROJECT_SOURCE_DIR} however, that is an empty string. I have also tried setting a new variable to ${project_SOURCE_DIR}/include and using that, however the same result. I forgo

Re: [CMake] INCLUDE_DIRECTORIES problem...

2008-11-15 Thread BRM
er 16, 2008 12:45:54 AM Subject: Re: [CMake] INCLUDE_DIRECTORIES problem... what is ${project_SOURCE_DIR} ? try adding MESSAGE("project_SOURCE_DIR is '${project_SOURCE_DIR}'") right before that line in your cmakelists. I have a sneaking suspicion it's not what you t

Re: [CMake] INCLUDE_DIRECTORIES problem...

2008-11-15 Thread Christopher Harvey
what is ${project_SOURCE_DIR} ? try adding MESSAGE("project_SOURCE_DIR is '${project_SOURCE_DIR}'") right before that line in your cmakelists. I have a sneaking suspicion it's not what you think it is. You have to use something like ${project_SOURCE_DIR}/../include instead. BRM wrote: > I have a

  1   2   >