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
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
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
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
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
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
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
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:
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
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
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
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
___
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
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})
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
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
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
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
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
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
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
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:
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
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
24 matches
Mail list logo