[CMake] builds using mingw with sources on different drive

2011-03-28 Thread J Decker
I was trying to build a project on a seperate drive from the sources. This works very well for lots of my projects, and so a cmake based project should work as well. There is a limitation in cmake using 'command' with working directory BASE_BUILD_COMMAND is make_gamedata_arch.bat add_custom_

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread Michael Hertling
On 03/29/2011 07:47 AM, Michael Hertling wrote: > On 03/28/2011 08:23 PM, David Doria wrote: >> I have setup a list of definitions: >> >> SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} UNIX;") >> SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} PIXEL_DIMENSION=3;") >> >> I display them

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread Michael Hertling
On 03/28/2011 08:23 PM, David Doria wrote: > I have setup a list of definitions: > > SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} UNIX;") > SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} PIXEL_DIMENSION=3;") > > I display them and apply them to my executable as follows: > > add_e

Re: [CMake] How to add dependencies to ExternalProject_Add()

2011-03-28 Thread Rolf Eike Beer
I wrote: > David Cole wrote: > > I am not sure I like this patch, or not. I'm on the fence. > > > > I would recommend just using: > > ExternalProject_Add(xyz ...) > > add_dependencies(xyz mylib) > > > > to add non-ExternalProject dependencies. Just to make it clear that the > > dependencies

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
> No, the semicolons are removed by message() itself, you'll still see > them if you enclose the ${} inside the quotes: > > message( "DEFS: ${MAIN_BUILD_DEFINITIONS}" ) You're right - the output now contains the semicolons. I tried enclosing the variable in quotes in the set_target_properties line

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread Andreas Pakulat
On 28.03.11 14:43:01, David Doria wrote: > On Mon, Mar 28, 2011 at 2:31 PM, David Doria wrote: > > On Mon, Mar 28, 2011 at 2:28 PM, Yuri Timenkov wrote: > >> Try prefixing definitions with -D > > > > I changed to: > > SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DUNIX;") > > SET(MAIN_BU

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
I looked at make VERBOSE=1 as you suggested and the -D's indeed are missing. Again, in my working small demo they show up properly. I guess something else in the CMakeLists.txt must be breaking this functionality? The full file is here: http://pastebin.com/SWZgmJ33 but none of the definitions set

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
On Mon, Mar 28, 2011 at 2:31 PM, David Doria wrote: > On Mon, Mar 28, 2011 at 2:28 PM, Yuri Timenkov wrote: >> Try prefixing definitions with -D > > I changed to: > SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DUNIX;") > SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DPIXEL_DIME

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread Yuri Timenkov
Then it can be a problem with mixing spaces and semicolons. Look at command-line with make VERBOSE=1, this may give you some clues. On Mar 28, 2011 10:31 PM, "David Doria" wrote: > On Mon, Mar 28, 2011 at 2:28 PM, Yuri Timenkov wrote: >> Try prefixing definitions with -D > > I changed to: > SET(

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
On Mon, Mar 28, 2011 at 2:28 PM, Yuri Timenkov wrote: > Try prefixing definitions with -D I changed to: SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DUNIX;") SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} -DPIXEL_DIMENSION=3;") and I get: : error: macro names must be identifier

Re: [CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread Yuri Timenkov
Try prefixing definitions with -D On Mar 28, 2011 10:26 PM, "David Doria" wrote: > I have setup a list of definitions: > > SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} UNIX;") > SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} PIXEL_DIMENSION=3;") > > I display them and apply them t

[CMake] set_target_properties not setting COMPILE_DEFINITIONS?

2011-03-28 Thread David Doria
I have setup a list of definitions: SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} UNIX;") SET(MAIN_BUILD_DEFINITIONS "${MAIN_BUILD_DEFINITIONS} PIXEL_DIMENSION=3;") I display them and apply them to my executable as follows: add_executable(ImageCompleter ${MainSources}) message("Main buil

Re: [CMake] problem compiling with cmake

2011-03-28 Thread Michael Hertling
On 03/28/2011 04:47 PM, João Oliveira wrote: > > Hello, I am a student of Instituto Politecnico de Castelo Branco from > Portugal and I having some problems compiling it is necessary to run the > toolbox PCL. I am using cmake 2.8.4 and when I try to compile cminpack 1.0.4 > the following error

Re: [CMake] How to add dependencies to ExternalProject_Add()

2011-03-28 Thread Rolf Eike Beer
> On Mon, Mar 28, 2011 at 10:48 AM, Rolf Eike Beer wrote: > >> > I came up with this simple diff which makes everything work smoothly >> for >> > me: >> >> This also works for me and should properly detect if the dependency is >> itself an external target or not: >> >> diff --git a/Modules/Externa

Re: [CMake] How to add dependencies to ExternalProject_Add()

2011-03-28 Thread David Cole
On Mon, Mar 28, 2011 at 10:48 AM, Rolf Eike Beer wrote: > > I came up with this simple diff which makes everything work smoothly for > > me: > > This also works for me and should properly detect if the dependency is > itself an external target or not: > > diff --git a/Modules/ExternalProject.cmak

[CMake] problem compiling with cmake

2011-03-28 Thread João Oliveira
Hello, I am a student of Instituto Politecnico de Castelo Branco from Portugal and I having some problems compiling it is necessary to run the toolbox PCL. I am using cmake 2.8.4 and when I try to compile cminpack 1.0.4 the following error appears: Check for working C compiler using: Visual S

Re: [CMake] How to add dependencies to ExternalProject_Add()

2011-03-28 Thread Rolf Eike Beer
> I came up with this simple diff which makes everything work smoothly for > me: This also works for me and should properly detect if the dependency is itself an external target or not: diff --git a/Modules/ExternalProject.cmake b/Modules/ExternalProject.cmake index 3de6b7e..90b23ce 100644 --- a/

[CMake] How to add dependencies to ExternalProject_Add()

2011-03-28 Thread Rolf Eike Beer
I have an external project that should depend on a library I build in my usual project. I do an export(TARGETS) on that library and pass that file into the build of the external project and all goes fine. But when I go to our build machine which will do "make -j 5" it breaks because the external p

Re: [CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-03-28 Thread Rolf Eike Beer
> You still need to install that lib even if it is not used by 3rd party > application, it is used inernally by your own application. > > INSTALL(TARGETS publiclib privatelib...) The private libraries are of course installed. If I link against that installed public library "by hand" everything wor

[CMake] Extra options for strip?

2011-03-28 Thread Hariharan
I'm trying to build a stripped target using install/strip with the function and line information retained. I need to pass the "--strip-debug" and "--keep-file-symbols" to the system strip binary because the default is to strip all symbols. Is there any way to achieve this using cmake? Regards, Har

Re: [CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-03-28 Thread Mathieu Malaterre
You still need to install that lib even if it is not used by 3rd party application, it is used inernally by your own application. INSTALL(TARGETS publiclib privatelib...) 2cts On Mon, Mar 28, 2011 at 2:51 PM, Rolf Eike Beer wrote: > I try to do an INSTALL(EXPORT) to allow others to link agains

[CMake] INSTALL(EXPORT) does not honor LINK_INTERFACE_LIBRARIES?

2011-03-28 Thread Rolf Eike Beer
I try to do an INSTALL(EXPORT) to allow others to link against one of my libraries. That libraries is linked against some other internal libraries the target's don't need to link to as everything in them is purely internal. I tried something like that: ADD_LIBRARY(publiclib SHARED${publiclib_

Re: [CMake] New warnings in CMake 2.8.4-rc2

2011-03-28 Thread David Cole
See the cmake command line help for: --no-warn-unused-cli= Don't warn about command line options. I would just add "--no-warn-unused-cli" to the ExternalProject_Add calls and require CMake 2.8.4. (There is no ExternalProject_Add in CMake 2.6...) On Sat, Mar 26, 2011 at 9:22 AM, Johnson,