Re: [CMake] Qt4 module too restrictive about uic requirement

2011-01-14 Thread Thomas Petazzoni
On Mon, 10 Jan 2011 18:34:16 +0100
Thomas Petazzoni  wrote:

> The FindQt4 module requires the uic executable to be present, otherwise
> it declares the Qt installation as invalid and bails out.
> 
> However, Qt can be compiled without the GUI (which is interesting on
> embedded systems), and in this case, uic is not installed and not
> necessary. Therefore, the requirement of uic to be part of the standard
> Qt installation by CMake is a bit too restrictive. It should only
> require it when the QT_GUI component is used.
> 
> I have worked around the problem using the following patch, but it
> isn't correct as it completely removes the check for uic.
> Unfortunately, my CMake-fu is still very limited, so I don't really
> know what's the proper way of checking this.

Ping ?

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] ctest and git submodules

2011-01-14 Thread Gerhard Gappmeier
Hi David,

with 2.8.3 the submodule update works. Thx.

On Wednesday 12 January 2011 18:43:41 you wrote:
> Are you using CMake 2.8.3? If not, you should upgrade. There were some
> improvements made w.r.t. ctest_update and git repos in that release. I
> think the submodule update was one of them...
> 
> 
> HTH,
> David
> 
> 
> On Wed, Jan 12, 2011 at 12:16 PM, Gerhard Gappmeier <
> 
> gerhard.gappme...@ascolab.com> wrote:
> >  Hi,
> > 
> > my project is stored in a git repo with submodules.
> > 
> > I'm wondering if ctest is updating also the submodules when running
> > 
> > ctest Nightly|Continuous etc.
> > 
> > or just the main repo.
> > 
> > I believe not, unless I have some other problems with my test script.
> > 
> > I could do a manual "git pull && git submodule init && git submodule
> > update"
> > 
> > before running ctest, but then "ctest -D Continuous" will do nothing
> > because it doesn't detect the change anymore.
> > 
> > Has anybody working ctest with git submodules?
> > 
> > 
> > --
> > 
> > Gerhard Gappmeier
> > 
> > ascolab GmbH - automation systems communication laboratory
> > 
> > Tel.: +49 9131 691 123
> > 
> > Fax: +49 9131 691 128
> > 
> > Web: http://www.ascolab.com
> > 
> > GPG Key Id: 5AAC50C4
> > 
> > GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4
> > 
> > --
> > 
> > ascolab GmbH
> > 
> > Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
> > 
> > Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
> > 
> > Registernummer: HRB 9360
> > 
> > Registergericht: Amtsgericht Fürth
> > 
> > ___
> > 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.cmake.org/Wiki/CMake_FAQ
> > 
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake

-- 
Gerhard Gappmeier
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 123
Fax: +49 9131 691 128
Web: http://www.ascolab.com
GPG Key Id: 5AAC50C4
GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4

--
ascolab GmbH
Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
Registernummer: HRB 9360
Registergericht: Amtsgericht Fürth
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Sporadic mail sending issues

2011-01-14 Thread Gerhard Gappmeier
Hello

From time to time I have the problem that I see such errors in the CDash Error 
Log. The overall mail sending works and the users all have mail addresses 
configured, so how can this happen?

I don't really understand this error message.
* The users exist
* The users all have configured mails
* I can only configured global mail address in the user profile
 -> is there a project specific mail configuration somewhere?

...
 Warning  reported on 2011-01-14 09:24:01 for  build #145
(SendEmail): User: Matthias Picard is not registered (or has no email) for the 
project 3

 Warning  reported on 2011-01-14 09:24:01 for  build #145
(SendEmail): User: Benjamin Riker is not registered (or has no email) for the 
project 3
...(names changed)

-- 
Gerhard Gappmeier
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 123
Fax: +49 9131 691 128
Web: http://www.ascolab.com
GPG Key Id: 5AAC50C4
GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4

--
ascolab GmbH
Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
Registernummer: HRB 9360
Registergericht: Amtsgericht Fürth
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] Bug #11258

2011-01-14 Thread Micha Renner
They have a question:
https://connect.microsoft.com/VisualStudio/feedback/details/634469/vs-2010-yields-blocking-error-dialog-when-a-macro-tries-to-stop-the-build-vs-2008-did-not

Maybe you can answer.

Greetings

Micha


___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] add_subdirectory and eclipse project

2011-01-14 Thread Andrea Galeazzi

I've been puzzled over the following problem for about 3/4 days:
if I have a CMakeLists.txt with a lot of add_subdirectory how can I 
automatically generate an eclipse project (containing the source code) 
for each add_subdirectory?

___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Qt4 module too restrictive about uic requirement

2011-01-14 Thread Eric Noulard
2011/1/14 Thomas Petazzoni :
> On Mon, 10 Jan 2011 18:34:16 +0100
> Thomas Petazzoni  wrote:
>
>> The FindQt4 module requires the uic executable to be present, otherwise
>> it declares the Qt installation as invalid and bails out.
>>
>> However, Qt can be compiled without the GUI (which is interesting on
>> embedded systems), and in this case, uic is not installed and not
>> necessary. Therefore, the requirement of uic to be part of the standard
>> Qt installation by CMake is a bit too restrictive. It should only
>> require it when the QT_GUI component is used.
>>
>> I have worked around the problem using the following patch, but it
>> isn't correct as it completely removes the check for uic.
>> Unfortunately, my CMake-fu is still very limited, so I don't really
>> know what's the proper way of checking this.
>
> Ping ?

Hi Thomas,

Clinton Stimpson is the maintainer of the QT4 module
http://www.cmake.org/Wiki/CMake:Module_Maintainers

He is usually responsive so I bet he will be stepping in soon.

Concerning your issue did you try the workaround:

find_package(Qt4 COMPONENTS QtCore)

and then
if (QT_QTCORE_FOUND)
  message("OK QtCore found.")
  include(${QT_USE_FILE})
else(QT_QTCORE_FOUND)
  message(FATAL_ERROR "QtCore not found.")
endif(QT_QTCORE_FOUND)

I think this "should" work for your case.
However I'm not a Qt user so I may be plain wrong and Clinton will
"fix me" soon.

Since your request seems reasonable may be you can file a feature
request on the bug tracker
and send back here the ref to the bug tracker entry.

By the way you did not tell us which version of CMake / FindQT4 you are using?
-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Qt4 module too restrictive about uic requirement

2011-01-14 Thread Thomas Petazzoni
Hello,

On Fri, 14 Jan 2011 11:06:04 +0100
Eric Noulard  wrote:

> Clinton Stimpson is the maintainer of the QT4 module
> http://www.cmake.org/Wiki/CMake:Module_Maintainers
> 
> He is usually responsive so I bet he will be stepping in soon.

Ok, thanks.

> Concerning your issue did you try the workaround:
> 
> find_package(Qt4 COMPONENTS QtCore)
> 
> and then
> if (QT_QTCORE_FOUND)
>   message("OK QtCore found.")
>   include(${QT_USE_FILE})
> else(QT_QTCORE_FOUND)
>   message(FATAL_ERROR "QtCore not found.")
> endif(QT_QTCORE_FOUND)
> 
> I think this "should" work for your case.
> However I'm not a Qt user so I may be plain wrong and Clinton will
> "fix me" soon.

I don't see how this can fix the issue I'm pointing to.

I'm compiling a software that *needs* QtCore, QtNetwork and QtXml, but
not QtGui. However, CMake insists on checking that uic is available
even if the QT_GUI component has not be requested.

> Since your request seems reasonable may be you can file a feature
> request on the bug tracker
> and send back here the ref to the bug tracker entry.

Ok, will do.

> By the way you did not tell us which version of CMake / FindQT4 you are using?

Tried both 2.8.0 and 2.8.3.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Qt4 module too restrictive about uic requirement

2011-01-14 Thread Eric Noulard
2011/1/14 Thomas Petazzoni :
> Hello,
>
> On Fri, 14 Jan 2011 11:06:04 +0100
> Eric Noulard  wrote:
>
>> Clinton Stimpson is the maintainer of the QT4 module
>> http://www.cmake.org/Wiki/CMake:Module_Maintainers
>>
>> He is usually responsive so I bet he will be stepping in soon.
>
> Ok, thanks.
>
>> Concerning your issue did you try the workaround:
>>
>> find_package(Qt4 COMPONENTS QtCore)
>>
>> and then
>> if (QT_QTCORE_FOUND)
>>   message("OK QtCore found.")
>>   include(${QT_USE_FILE})
>> else(QT_QTCORE_FOUND)
>>   message(FATAL_ERROR "QtCore not found.")
>> endif(QT_QTCORE_FOUND)
>>
>> I think this "should" work for your case.
>> However I'm not a Qt user so I may be plain wrong and Clinton will
>> "fix me" soon.
>
> I don't see how this can fix the issue I'm pointing to.
>
> I'm compiling a software that *needs* QtCore, QtNetwork and QtXml, but
> not QtGui. However, CMake insists on checking that uic is available
> even if the QT_GUI component has not be requested.

Yes this I understand that but ...
find_package(Qt4 COMPONENTS QtCore QtNetwork QtXml)

WITHOUT "REQUIRED"
should say "QT Not Found" but this will not be a fatal error.
and you may have found your required modules.

>> By the way you did not tell us which version of CMake / FindQT4 you are 
>> using?
>
> Tried both 2.8.0 and 2.8.3.

There is 2.8.4-rc1 just out:
http://www.cmake.org/files/v2.8/?C=M;O=D
which includes some fix/evolution w.r.t.  FindQt but none of them since to
handle your case.

Trying with the most up-to-date rc would be nice and ease patching.


-- 
Erk
Membre de l'April - « promouvoir et défendre le logiciel libre » -
http://www.april.org
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] retrieve the path of an object file

2011-01-14 Thread Andrea Galeazzi
Given a source file (path/foo.c),  does CMake provide a way to retrieve 
the obj file path/filename generate by the compiler?

___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] retrieve the path of an object file

2011-01-14 Thread Michael Wild
On 01/14/2011 12:17 PM, Andrea Galeazzi wrote:
> Given a source file (path/foo.c),  does CMake provide a way to retrieve
> the obj file path/filename generate by the compiler?

No, it doesn't (and usually, in my experience, it's the wrong question
to ask...).


Michael
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.4-rc1 ready for testing!

2011-01-14 Thread David Cole
On Thu, Jan 13, 2011 at 11:33 PM, Pau Garcia i Quiles
 wrote:
> On Thu, Jan 13, 2011 at 3:15 PM, David Cole  wrote:
>> I am happy to announce that CMake 2.8.4 has entered the release
>> candidate stage! You can find the source and binaries here:
>> http://www.cmake.org/files/v2.8/?C=M;O=D
>>
>> Following is the list of changes in this release. Please try this version
>> of CMake on your projects and report any issues to the list or the
>> bug tracker.
>>
>> Happy building!
>>
>> -Dave
>
> A couple of issues I'd noticed:
>
> - On Windows, FindZLIB.cmake is unable to find zlib if you built zlib
> using CMake. Apparently the zlib's CMake buildsystem uses library
> names different from the ones produced by other build methods.
>
> - FindPNG.cmake does not support libpng 1.5
>
> The attached path fixes both issues
>

Looks like a reasonable patch. I'll apply it later today. Thanks!


> One more thing I've noticed is ExternalProject_Add does not honor the
> CMAKE_BUILD_TYPE. For instance, if I have this:
>

It honors it if you pass it down. Same as all other CMake flags at the
top level.


> --8<--
> project( winst )
>
> cmake_minimum_required(VERSION 2.8)
>
> include (ExternalProject)
> set(CMAKE_PREFIX_PATH ${PROJECT_SOURCE_DIR} )
>
> #find_package( PNG REQUIRED )
>
> ExternalProject_Add( zlib
>    DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/downloads
>    URL http://prdownloads.sourceforge.net/libpng/zlib125.zip
>    PATCH_COMMAND ${CMAKE_COMMAND} -E remove zconf.h
>    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${PROJECT_SOURCE_DIR}
> -DCMAKE_PREFIX_PATH:PATH=${PROJECT_SOURCE_DIR}
>    )
> --8<--
>
> And I call CMake like "cmake -DCMAKE_BUILD_TYPE=Release", it will
> build zlib in Debug. It's easily fixable by adding
> "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" to the CMAKE_ARGS but I'd say
> it violates the principle of least surprise.
>

But... I'm a Visual Studio / Xcode user. If CMAKE_BUILD_TYPE is
defined, it would surprise *me*. So I don't think you can say it
violates the principle universally for all types of CMake users.

We do not assume any particular set of flags or defined variables to
pass down automatically for you. Since choosing some would surprise
some people, but not others... all variable passing via
ExternalProject_Add is left "up to the user".

In fact, part of the point of ExternalProject is that you can build
the thing you're building however you want *without* necessarily
inheriting the values of all the CMake variables at the top level.


Thanks for the discussion point, (and the patch!)
David


> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Sporadic mail sending issues

2011-01-14 Thread David Cole
Maybe you could post this on the CDash mailing list?


On Fri, Jan 14, 2011 at 3:48 AM, Gerhard Gappmeier
 wrote:
> Hello
>
> From time to time I have the problem that I see such errors in the CDash
> Error Log. The overall mail sending works and the users all have mail
> addresses configured, so how can this happen?
>
> I don't really understand this error message.
>
> * The users exist
>
> * The users all have configured mails
>
> * I can only configured global mail address in the user profile
>
> -> is there a project specific mail configuration somewhere?
>
> ...
>
> Warning reported on 2011-01-14 09:24:01 for build #145
>
> (SendEmail): User: Matthias Picard is not registered (or has no email) for
> the project 3
>
> Warning reported on 2011-01-14 09:24:01 for build #145
>
> (SendEmail): User: Benjamin Riker is not registered (or has no email) for
> the project 3
>
> ...(names changed)
>
> --
>
> Gerhard Gappmeier
>
> ascolab GmbH - automation systems communication laboratory
>
> Tel.: +49 9131 691 123
>
> Fax: +49 9131 691 128
>
> Web: http://www.ascolab.com
>
> GPG Key Id: 5AAC50C4
>
> GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4
>
> --
>
> ascolab GmbH
>
> Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
>
> Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
>
> Registernummer: HRB 9360
>
> Registergericht: Amtsgericht Fürth
>
> ___
> 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.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Bug #11258

2011-01-14 Thread David Cole
And regardless of how they respond, I think we're going to address
11258 by re-working the way we do the reload calls. Which should avoid
the issue in the first place.

See the notes in the bug tracker for more details. Please post
comments there if you disagree or have a better idea.


Thanks,
David


On Fri, Jan 14, 2011 at 7:30 AM, David Cole  wrote:
> I will post a screenshot for them later today.
>
> Although this must mean that they haven't run the script I attached to
> the bug. If they had, they'd see the dialog for themselves.
>
>
> :-(
> D
>
>
> On Fri, Jan 14, 2011 at 4:11 AM, Micha Renner  
> wrote:
>> They have a question:
>> https://connect.microsoft.com/VisualStudio/feedback/details/634469/vs-2010-yields-blocking-error-dialog-when-a-macro-tries-to-stop-the-build-vs-2008-did-not
>>
>> Maybe you can answer.
>>
>> Greetings
>>
>> Micha
>>
>>
>> ___
>> 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.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Bug #11258

2011-01-14 Thread David Cole
I will post a screenshot for them later today.

Although this must mean that they haven't run the script I attached to
the bug. If they had, they'd see the dialog for themselves.


:-(
D


On Fri, Jan 14, 2011 at 4:11 AM, Micha Renner  wrote:
> They have a question:
> https://connect.microsoft.com/VisualStudio/feedback/details/634469/vs-2010-yields-blocking-error-dialog-when-a-macro-tries-to-stop-the-build-vs-2008-did-not
>
> Maybe you can answer.
>
> Greetings
>
> Micha
>
>
> ___
> 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.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] add_subdirectory and eclipse project

2011-01-14 Thread Ryan Pavlik
You probably want to read this:
http://www.cmake.org/Wiki/Eclipse_CDT4_Generator

Ryan

On Fri, Jan 14, 2011 at 3:49 AM, Andrea Galeazzi  wrote:

> I've been puzzled over the following problem for about 3/4 days:
> if I have a CMakeLists.txt with a lot of add_subdirectory how can I
> automatically generate an eclipse project (containing the source code) for
> each add_subdirectory?
> ___
> 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.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Ryan Pavlik
HCI Graduate Student
Virtual Reality Applications Center
Iowa State University

rpav...@iastate.edu
http://academic.cleardefinition.com
Internal VRAC/HCI Site: http://tinyurl.com/rpavlik
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] C++ linkage, Fortran standard lib

2011-01-14 Thread Brad King
On 01/13/2011 04:54 PM, Nico Schlömer wrote:
> about half a year ago, there's been a discussion here about C++
> linking with dependencies to libgfortran present which did not
> automatically get resolved. The issue evolved around the Trilinos
> toolkit.

I think you're referring to this:

  http://www.cmake.org/pipermail/cmake/2010-July/038172.html

Not much has changed.

> both BLAS and LAPACK contain references to the standard Fortran library
> depending on the platform, a fact that the (C++) client application
> cannot be aware of.

Unfortunately this is also a fact that CMake cannot know either because
nothing tells it so.  This is what I explained in the above-linked thread.

This is not specific to CMake, Fortran, or mixed Fortran/C++ code.  It is
a case of static libraries that have unknown dependencies.  Imagine trying
to use libtk.a without also linking to libtcl.a.  Everyone who links to
libtk.a knows that they also need to link to libtcl.a because this is
well-documented and not platform-specific.  Unfortunately in the case
under discussion here the dependencies are platform-specific and not
documented.

> Back then, the following workaround was suggested:
> The user "knows" what the necessary Fortran libraries are, and
> manually adds them to the link line of the client application. This
> could happen via the CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES variable
> for example.
[snip]
> Now, I have a similar code (Trilinos as well, it just so happens) and
> the same problem. As I'm using the same build system to build the code
> on several machines, however, I cannot just hardcode the link
> libraries.

No one should set CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES or hard-code
Fortran runtime libraries.  The set() calls you see in the above-linked
thread come from files generated by CMake.  The workaround suggested was
to include a dummy Fortran source file in the client application to
convince CMake to link to the Fortran libraries too.  That will work for
your case too.

A full solution to this problem is to somehow detect the dependencies of
the blas and lapack static libraries.  Unfortunately there is no telling
which Fortran compiler, if any, was involved in producing a given archive.
Furthermore we do not know which objects in the archive might depend on
Fortran runtime library symbols, or even which symbols to reference in
a test project to bring in those objects in the first place.  Really it
needs to be up to the package providing the blas and lapack archives to
somehow document their dependencies or at least which Fortran compiler
was used to build them.

-Brad
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] retrieve the path of an object file

2011-01-14 Thread Michael Hertling
On 01/14/2011 12:17 PM, Andrea Galeazzi wrote:
> Given a source file (path/foo.c),  does CMake provide a way to retrieve 
> the obj file path/filename generate by the compiler?

With the Makefile generators, you might use the RULE_LAUNCH properties
to intercept the compiling/linking phase, including to influence where
the object files are written to and read from, but this is of limited
portability, error-prone and should be considered only in very special
cases, see [1]. Alternatively, you could try to rewrite variables like
CMAKE__COMPILE_OBJECT and friends to achieve your goal, but the
same objections apply here, too, cf. [2].

Regards,

Michael

[1] http://www.mail-archive.com/cmake@cmake.org/msg29622.html
[2] http://www.mail-archive.com/cmake@cmake.org/msg31533.html
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] [cmake-developers] Generating information for C++ tools in cmake (patch)

2011-01-14 Thread Rolf Eike Beer
> On 01/13/2011 06:05 PM, Manuel Klimek wrote:
> > I think that finding this file in the same spot relative to the base
> > build directory independently of the build system used will make it a
> > lot easier for tool-smiths / users to actually make use of it. If you
> > want to hide it away, I'd vote for a more build system independent
> > name than CMakeFiles.
> 
> CMake used to write lots of files to the top of the build tree but many
> people complained about the verbosity, especially for in-source builds.
> Now we hide as many files as possible under CMakeFiles/ subdirectories.
> If the file must go in the top level then I'd prefer to enable it only
> optionally as discussed previously.

I don't see much value in enabling this by default anyway as it doesn't add any 
value for the average user. If anyone wants to use this then why not make this 
entirely dependent on a variable to enable it at all. Then add a second 
variable or global property that holds the location of the file and the user 
may write to if he wants a different place.

Eike
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake Java Support

2011-01-14 Thread Andreas Schneider
On Wednesday 12 January 2011 15:32:08 Allen D Byrne wrote:
> Andreas,
> Thanks for providing these files! I have finally been able to progress on
> converting our java product to cmake. I have one suggestion:
> 
> Add to the add_java function the classpath for the target;
> 
> set(${_TARGET_NAME}_CLASSPATH
> ".${CMAKE_JAVA_INCLUDE_PATH_FINAL}/${_TARGET_NAME}.jar" PARENT_SCOPE)
> 
> I needed this on linux (uses ':' in classpath not ';' ) to do an add_test.
> 
> Also two questions:
> How do I get the jar files into an output folder for build/test (not
> install task)?
> 
> After I build my JNI Library with normal C process how do I connect the
> java JAR  to use the library? I'm not sure how to use INSTALL_JNI_SYMLINK?
> 
> Allen
> 
> > Hello CMake,
> > 
> > my name is Andreas Schneider and I'm working for Red Hat. At the end of
> > last year I've worked on Dogtag PKI [1]. The Dogtag Certificate System
> > [2] is an enterprise-class open source Certificate Authority.
> > 
> > The project is written in serveral different laguages (C, C++ and Java),
> > so I've used CMake as the new build system. To be able to build the java
> > project I needed Java support in CMake. So I've started to write
> > functions to compile java files, find jar files, bundle jar files and
> > generate javadoc.
> > 
> > It should provide everything to build java and jni projects. You find the
> > files here:
> > 
> > http://git.cryptomilk.org/projects/cmake-tools.git/tree/language/java
> > 
> > FindJNI.cmake:
> > Find JNI libraries and headers. I think this is the file from CMake
> > itself.
> > 
> > FindJava.cmake:
> > Find all needed Java tools like javac, javadoc, jar, etc.
> > 
> > UseJava.cmake:
> > This file provides all needed function to support creating java
> > projects in CMake. Most of the function are documented in detail.
> > There is some documentation missing. I will add this soon.
> > 
> > UseJavaClassFilelist.cmake:
> > This is needed to find the class files in the build directory. One
> > .java file can create multiple .class files. So you have to glob for
> > these file. There is support to only look for certain .class files.
> > 
> > UseJavaSymlinks.cmake:
> > This is a helper to create symlinks for versioned jar files.
> > 
> > git clone git://git.cryptomilk.org/projects/cmake-tools.git
> > 
> > 
> > It would be nice if this would be included into the CMake distribution,
> > but at the moment there is still documentation missing. I hope that this
> > will help some people to get their Java project built with CMake.
> > 
> > Comments, suggestions and patches are welcome!
> > 
> > Best regards,
> > 
> > -- andreas
> > 
> > [1] https://fedorahosted.org/pki/browser/trunk/pki
> > [2] http://pki.fedoraproject.org/wiki/PKI_Main_Page

-- 
Andreas Schneider   GPG-ID: 8B7EB4B8
Red Hat   a...@redhat.com
Samba Team a...@samba.org
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake Java Support

2011-01-14 Thread Andreas Schneider
On Wednesday 12 January 2011 15:32:08 Allen D Byrne wrote:
> Andreas,

Hi Allen,

> Thanks for providing these files! I have finally been able to progress on
> converting our java product to cmake. I have one suggestion:
> 
> Add to the add_java function the classpath for the target;
> 
> set(${_TARGET_NAME}_CLASSPATH
> ".${CMAKE_JAVA_INCLUDE_PATH_FINAL}/${_TARGET_NAME}.jar" PARENT_SCOPE)

You should use an absolute path here if it isn't one yet. But the . at the 
beginning look suspicous :)

Do you want to create a patch for that?
 
> I needed this on linux (uses ':' in classpath not ';' ) to do an add_test.
> 
> Also two questions:
> How do I get the jar files into an output folder for build/test (not
> install task)?

I think we would need to support this. We could support EXECUTABLE_OUTPUT_PATH 
if it is set. Then you copy the jar file to this directory too.

> After I build my JNI Library with normal C process how do I connect the
> java JAR  to use the library? I'm not sure how to use INSTALL_JNI_SYMLINK?

You need to set a version, else it will not work.


Cheers,


-- andreas

-- 
Andreas Schneider   GPG-ID: 8B7EB4B8
Red Hat   a...@redhat.com
Samba Team a...@samba.org
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake Java Support

2011-01-14 Thread Andreas Schneider
On Friday 14 January 2011 16:32:16 you wrote:
> Andreas,

Hi Allen,

> Thanks, I do have most everything working, setting the version was the
> key!
> Concerning the '.' at the beginning of my proposed patch, I added that
> because the CMAKE_JAVA_INCLUDE_PATH_FINAL started with a seperator and I
> didn't look into why. I find this 'set' command very useful and I suggest
> you consider adding it (with or without the leading '.'). Note that I
> discovered a bug with Windows and the Visual Studio generator. The use of
> CMAKE_JAVA_INCLUDE_PATH_FINAL in the add_custom_command changes the ';'
> seperator into spaces - I think it needs to be escaped somehow - maybe the
> CMake gurus have a suggestion?

I'm not a java programmer and I haven't tested this stuff on Windows. Please 
tell which variables have the wrong ; or : or whatever and what it should look 
like. I already did some things to get it working on Windows but never tested.

The more details you give the easier it is to fix. If you could print out the 
variables I could try to fix it and add what you need.


-- andreas


-- 
Andreas Schneider   GPG-ID: 8B7EB4B8
Red Hat   a...@redhat.com
Samba Team a...@samba.org
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake Java Support

2011-01-14 Thread Allen D Byrne
Andreas,
 The problem is a CMake issue with how ';' is interpreted. In the 
USE_JAVA.CMAKE file (lines 227-243):
> if (_JAVA_COMPILE_FILES)
> # Compile the java files and create a list of class files
> add_custom_command(
> TARGET ${_TARGET_NAME}
> COMMAND ${CMAKE_Java_COMPILER}
> ${CMAKE_JAVA_COMPILE_FLAGS}
> -classpath ${CMAKE_JAVA_INCLUDE_PATH_FINAL}
> -d ${CMAKE_JAVA_CLASS_OUTPUT_PATH}
> ${_JAVA_COMPILE_FILES}
> COMMAND ${CMAKE_COMMAND}
> -DCMAKE_JAVA_CLASS_OUTPUT_PATH=${CMAKE_JAVA_CLASS_OUTPUT_PATH}
> -DCMAKE_JAR_CLASSES_PREFIX="${CMAKE_JAR_CLASSES_PREFIX}"
> -P ${_JAVA_CLASS_FILELIST_SCRIPT}
> WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
> COMMENT "Building Java objects for ${_TARGET_NAME}.jar"
> )
> endif (_JAVA_COMPILE_FILES)
Line 233
> -classpath ${CMAKE_JAVA_INCLUDE_PATH_FINAL}
On windows with the VS generator this converts the ';' characters to spaces. I 
can't remember how to adjust this line so that this classpath value is correct 
on all platforms? This is were I hope a CMake guru could help.

So in summary, two issues; the classpath on windows and my suggested addition 
of the ${_TARGET_NAME}_CLASSPATH variable. Everything else is fine with me!

I owe you a lunch for making my task easy,
 Allen
> 
> On Friday 14 January 2011 16:32:16 you wrote:
> > Andreas,
> 
> Hi Allen,
> 
> > Thanks, I do have most everything working, setting the version was the
> > key!
> > Concerning the '.' at the beginning of my proposed patch, I added that
> > because the CMAKE_JAVA_INCLUDE_PATH_FINAL started with a seperator and I
> > didn't look into why. I find this 'set' command very useful and I suggest
> > you consider adding it (with or without the leading '.'). Note that I
> > discovered a bug with Windows and the Visual Studio generator. The use of
> > CMAKE_JAVA_INCLUDE_PATH_FINAL in the add_custom_command changes the ';'
> > seperator into spaces - I think it needs to be escaped somehow - maybe the
> > CMake gurus have a suggestion?
> 
> I'm not a java programmer and I haven't tested this stuff on Windows. Please 
> tell which variables have the wrong ; or : or whatever and what it should 
> look 
> like. I already did some things to get it working on Windows but never tested.
> 
> The more details you give the easier it is to fix. If you could print out the 
> variables I could try to fix it and add what you need.
> 
> 
>   -- andreas
> 
> 
> 
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Sporadic mail sending issues

2011-01-14 Thread David Cole
I've inquired of the other CDash developers, and Zach Mullen made
email related enhancements in svn revision 2827 in the trunk of the
CDash code base.

Maybe you could try running with an svn trunk on a test server to see
if it resolves your issue?


HTH,
David


On Fri, Jan 14, 2011 at 7:32 AM, David Cole  wrote:
> Maybe you could post this on the CDash mailing list?
>
>
> On Fri, Jan 14, 2011 at 3:48 AM, Gerhard Gappmeier
>  wrote:
>> Hello
>>
>> From time to time I have the problem that I see such errors in the CDash
>> Error Log. The overall mail sending works and the users all have mail
>> addresses configured, so how can this happen?
>>
>> I don't really understand this error message.
>>
>> * The users exist
>>
>> * The users all have configured mails
>>
>> * I can only configured global mail address in the user profile
>>
>> -> is there a project specific mail configuration somewhere?
>>
>> ...
>>
>> Warning reported on 2011-01-14 09:24:01 for build #145
>>
>> (SendEmail): User: Matthias Picard is not registered (or has no email) for
>> the project 3
>>
>> Warning reported on 2011-01-14 09:24:01 for build #145
>>
>> (SendEmail): User: Benjamin Riker is not registered (or has no email) for
>> the project 3
>>
>> ...(names changed)
>>
>> --
>>
>> Gerhard Gappmeier
>>
>> ascolab GmbH - automation systems communication laboratory
>>
>> Tel.: +49 9131 691 123
>>
>> Fax: +49 9131 691 128
>>
>> Web: http://www.ascolab.com
>>
>> GPG Key Id: 5AAC50C4
>>
>> GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4
>>
>> --
>>
>> ascolab GmbH
>>
>> Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
>>
>> Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
>>
>> Registernummer: HRB 9360
>>
>> Registergericht: Amtsgericht Fürth
>>
>> ___
>> 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.cmake.org/Wiki/CMake_FAQ
>>
>> Follow this link to subscribe/unsubscribe:
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Sporadic mail sending issues

2011-01-14 Thread Gerhard Gappmeier
Thx,
I'll give it a try on monday, it's getting late here already ;-)
Have a nice weekend.

Am 14.01.2011 17:26, schrieb David Cole:
> I've inquired of the other CDash developers, and Zach Mullen made
> email related enhancements in svn revision 2827 in the trunk of the
> CDash code base.
>
> Maybe you could try running with an svn trunk on a test server to see
> if it resolves your issue?
>
>
> HTH,
> David
>
>
> On Fri, Jan 14, 2011 at 7:32 AM, David Cole  wrote:
>> Maybe you could post this on the CDash mailing list?
>>
>>
>> On Fri, Jan 14, 2011 at 3:48 AM, Gerhard Gappmeier
>>  wrote:
>>> Hello
>>>
>>> From time to time I have the problem that I see such errors in the CDash
>>> Error Log. The overall mail sending works and the users all have mail
>>> addresses configured, so how can this happen?
>>>
>>> I don't really understand this error message.
>>>
>>> * The users exist
>>>
>>> * The users all have configured mails
>>>
>>> * I can only configured global mail address in the user profile
>>>
>>> -> is there a project specific mail configuration somewhere?
>>>
>>> ...
>>>
>>> Warning reported on 2011-01-14 09:24:01 for build #145
>>>
>>> (SendEmail): User: Matthias Picard is not registered (or has no email) for
>>> the project 3
>>>
>>> Warning reported on 2011-01-14 09:24:01 for build #145
>>>
>>> (SendEmail): User: Benjamin Riker is not registered (or has no email) for
>>> the project 3
>>>
>>> ...(names changed)
>>>
>>> --
>>>
>>> Gerhard Gappmeier
>>>
>>> ascolab GmbH - automation systems communication laboratory
>>>
>>> Tel.: +49 9131 691 123
>>>
>>> Fax: +49 9131 691 128
>>>
>>> Web: http://www.ascolab.com
>>>
>>> GPG Key Id: 5AAC50C4
>>>
>>> GPG Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4
>>>
>>> --
>>>
>>> ascolab GmbH
>>>
>>> Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
>>>
>>> Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
>>>
>>> Registernummer: HRB 9360
>>>
>>> Registergericht: Amtsgericht Fürth
>>>
>>> ___
>>> 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.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>


-- 
mit freundlichen Grüßen / best regards

*Gerhard Gappmeier*
ascolab GmbH - automation systems communication laboratory
Tel.: +49 9131 691 123
Fax: +49 9131 691 128
Web: http://www.ascolab.com
GPG-KeyId: 5AAC50C4
GPG-Fingerprint: 967A 15F1 2788 164D CCA3 6C46 07CD 6F82 5AAC 50C4

--
*ascolab GmbH*
Geschäftsführer: Gerhard Gappmeier, Matthias Damm, Uwe Steinkrauß
Sitz der Gesellschaft: Am Weichselgarten 7 . 91058 Erlangen . Germany
Registernummer: HRB 9360
Registergericht: Amtsgericht Fürth

___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] fixing cmake bootstrap NOTFOUNDs

2011-01-14 Thread Brian Lewis
When the cmake bootstrap sets some variables to NOTFOUND, what is the
correct way to fix them? To edit CMakeCache.txt?
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake Java Support

2011-01-14 Thread Hendrik Sattler
Am Freitag, 14. Januar 2011, 16:48:44 schrieb Andreas Schneider:
> On Friday 14 January 2011 16:32:16 you wrote:
> > Andreas,
> 
> Hi Allen,
> 
> > Thanks, I do have most everything working, setting the version was
> > the
> > 
> > key!
> > Concerning the '.' at the beginning of my proposed patch, I added that
> > because the CMAKE_JAVA_INCLUDE_PATH_FINAL started with a seperator and I
> > didn't look into why. I find this 'set' command very useful and I suggest
> > you consider adding it (with or without the leading '.'). Note that I
> > discovered a bug with Windows and the Visual Studio generator. The use of
> > CMAKE_JAVA_INCLUDE_PATH_FINAL in the add_custom_command changes the ';'
> > seperator into spaces - I think it needs to be escaped somehow - maybe
> > the CMake gurus have a suggestion?
> 
> I'm not a java programmer and I haven't tested this stuff on Windows.
> Please tell which variables have the wrong ; or : or whatever and what it
> should look like. I already did some things to get it working on Windows
> but never tested.
> 
> The more details you give the easier it is to fix. If you could print out
> the variables I could try to fix it and add what you need.

I had the same problem for my XSLT modules that can make use of saxon and 
xalan (both java program including some jar files). If you do calls to java, 
the classpath must be it's own list and can then be run like:
 add_custom_command (
OUTPUT foo
COMMAND "${JAVA_RUNTIME}" -cp "${FOO_CLASSPATH}" bar
 )

If you import a classpath from the environment, use
 string ( REPLACE ":" ";" .)
but only on Windows.

This solution works on Linux and Windows.

HS
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] fixing cmake bootstrap NOTFOUNDs

2011-01-14 Thread David Cole
You could use the --init flag to specify an initial cache file. For example,

# javaCache.cmake

SET(JNI_H FALSE CACHE BOOL "" FORCE)
SET(Java_JAVA_EXECUTABLE FALSE CACHE BOOL "" FORCE)
SET(Java_JAVAC_EXECUTABLE FALSE CACHE BOOL "" FORCE)

./bootstrap --init=/full/path/to/javaCache.cmake


HTH,
David


On Fri, Jan 14, 2011 at 11:50 AM, Brian Lewis  wrote:
> When the cmake bootstrap sets some variables to NOTFOUND, what is the
> correct way to fix them? To edit CMakeCache.txt?
> ___
> 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.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] VS Project environment settings

2011-01-14 Thread Ben Medina
These settings are stored in a separate "user" file, rather than in
the main vc[x]proj file. So one solution is to have CMake create the
user file for you with whatever settings you want. We are doing this
via configure_file, using a generic user file as a template.

- Ben

On Tue, Jan 11, 2011 at 9:40 AM, Marco Nolden
 wrote:
> Hi,
>
> with the new external project support in CMake it is very easy to build
> complex projects in one run, but it is still complicated to resolve the
> different library paths on windows. There is a bug in the Cmake bugtracker
> describing the problem very well, and as somebody pointed out it also
> affects IDEs on other platforms:
>
>  http://www.cmake.org/Bug/view.php?id=8884
>
> Is this still on the todo list? Does anyone know another solution to start
> debug and release versions from Visual Studio when multiple external
> projects are used?
>
> Best,
>
> Marco
>
> ___
> 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.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake 2.8.4-rc1 ready for testing!

2011-01-14 Thread David Cole
Patch applied and pushed to 'next' today:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=30e19b79ddb00932097ec6f5b54478a0b9b33b38


Thanks again,
David

On Thu, Jan 13, 2011 at 11:33 PM, Pau Garcia i Quiles
 wrote:
> On Thu, Jan 13, 2011 at 3:15 PM, David Cole  wrote:
>> I am happy to announce that CMake 2.8.4 has entered the release
>> candidate stage! You can find the source and binaries here:
>> http://www.cmake.org/files/v2.8/?C=M;O=D
>>
>> Following is the list of changes in this release. Please try this version
>> of CMake on your projects and report any issues to the list or the
>> bug tracker.
>>
>> Happy building!
>>
>> -Dave
>
> A couple of issues I'd noticed:
>
> - On Windows, FindZLIB.cmake is unable to find zlib if you built zlib
> using CMake. Apparently the zlib's CMake buildsystem uses library
> names different from the ones produced by other build methods.
>
> - FindPNG.cmake does not support libpng 1.5
>
> The attached path fixes both issues
>
> One more thing I've noticed is ExternalProject_Add does not honor the
> CMAKE_BUILD_TYPE. For instance, if I have this:
>
> --8<--
> project( winst )
>
> cmake_minimum_required(VERSION 2.8)
>
> include (ExternalProject)
> set(CMAKE_PREFIX_PATH ${PROJECT_SOURCE_DIR} )
>
> #find_package( PNG REQUIRED )
>
> ExternalProject_Add( zlib
>    DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/downloads
>    URL http://prdownloads.sourceforge.net/libpng/zlib125.zip
>    PATCH_COMMAND ${CMAKE_COMMAND} -E remove zconf.h
>    CMAKE_ARGS -DCMAKE_INSTALL_PREFIX:PATH=${PROJECT_SOURCE_DIR}
> -DCMAKE_PREFIX_PATH:PATH=${PROJECT_SOURCE_DIR}
>    )
> --8<--
>
> And I call CMake like "cmake -DCMAKE_BUILD_TYPE=Release", it will
> build zlib in Debug. It's easily fixable by adding
> "-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}" to the CMAKE_ARGS but I'd say
> it violates the principle of least surprise.
>
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] CMake, CUDA, VS build issues

2011-01-14 Thread Patrick Charrier
Hi all,

I am experiencing some (random) reloading of VS-project files and
rebuilding when using the combination of CMake, Visual Studio and CUDA.

Particularly when performing the following steps.
1. Project has been built before.
2. Perform an SVN update.
3. Start CMake. Configure and Generate.
4. Open the generated VS Solution.
5. Build in Debug Mode. (Or Rebuild All.)
6. Build in Release Mode. (Or Rebuild All.)

After Point 6 the fun part starts.
7. At this point VS runs CMake Configuration and Generation. Why this in
the first place?
8. VS will then ask to reload the newly generated VS-project files for all
the CUDA VS-projects (libraries) in the solution.
9. I hit yes and the project is being built.
10. When trying to start the application, VS will prompt me to reload the
VS-project files again, as in step 8.
11. I hit yes again, but this time VS just says:
1>-- Skipped Build: Project: PACKAGE, Configuration: Release Win32 --
1>Project not selected to build for this solution configuration
2>-- Skipped Build: Project: INSTALL, Configuration: Release Win32 --
2>Project not selected to build for this solution configuration
== Build: 0 succeeded, 0 failed, 7 up-to-date, 2 skipped ==

The problem only occurs with CUDA and VS from what I know.
My main question is, why is there a Reconfiguration and Regeneration in
step 7, and how can I avoid it? There should be no need for it, since step
3 should assure that the project files are fresh. Also why did it build
smoothly in Debug (step 5), but not Release (step 6)?
Also, what does the second Regenerate in step 11 mean?

My guess is, that step 7 is somehow caused by Debug and Release sharing
the same CUDA ".depend" and ".cmake" files in the CMakeFiles subdirectory of
each CUDA VS-project. But how exactly, and how could I fix that?

Thank you and Best Regards,
  Patrick


___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Bug #11258

2011-01-14 Thread David Cole
I posted a reply, including trying to post screen shots. If they do
not show up there within a few hours as available attachments, I'll
make them available elsewhere and provide a link to them. Perhaps as
an attachment in our own bug report.


Thanks,
David


On Fri, Jan 14, 2011 at 7:31 AM, David Cole  wrote:
> And regardless of how they respond, I think we're going to address
> 11258 by re-working the way we do the reload calls. Which should avoid
> the issue in the first place.
>
> See the notes in the bug tracker for more details. Please post
> comments there if you disagree or have a better idea.
>
>
> Thanks,
> David
>
>
> On Fri, Jan 14, 2011 at 7:30 AM, David Cole  wrote:
>> I will post a screenshot for them later today.
>>
>> Although this must mean that they haven't run the script I attached to
>> the bug. If they had, they'd see the dialog for themselves.
>>
>>
>> :-(
>> D
>>
>>
>> On Fri, Jan 14, 2011 at 4:11 AM, Micha Renner  
>> wrote:
>>> They have a question:
>>> https://connect.microsoft.com/VisualStudio/feedback/details/634469/vs-2010-yields-blocking-error-dialog-when-a-macro-tries-to-stop-the-build-vs-2008-did-not
>>>
>>> Maybe you can answer.
>>>
>>> Greetings
>>>
>>> Micha
>>>
>>>
>>> ___
>>> 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.cmake.org/Wiki/CMake_FAQ
>>>
>>> Follow this link to subscribe/unsubscribe:
>>> http://www.cmake.org/mailman/listinfo/cmake
>>>
>>
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] CMake Java Support

2011-01-14 Thread Allen D Byrne
Hendrik,
   Thanks! I put '"' around the classpath on line 233 of UseJava.cmake file and 
windows was happy to compile the sources.

Andreas,
So that makes only two changes to UseJava.cmake, both in the add_jar 
function;
  Quotes around the ${CMAKE_JAVA_INCLUDE_PATH_FINAL} in line 233 and
  add the 
set(${_TARGET_NAME}_CLASSPATH 
".${CMAKE_JAVA_INCLUDE_PATH_FINAL}/${_TARGET_NAME}.jar" PARENT_SCOPE)
at the end of the same function (line 300) 

Allen

> Am Freitag, 14. Januar 2011, 16:48:44 schrieb Andreas Schneider:
> > On Friday 14 January 2011 16:32:16 you wrote:
> > > Andreas,
> > 
> > Hi Allen,
> > 
> > > Thanks, I do have most everything working, setting the version was
> > > the
> > > 
> > > key!
> > > Concerning the '.' at the beginning of my proposed patch, I added that
> > > because the CMAKE_JAVA_INCLUDE_PATH_FINAL started with a seperator and I
> > > didn't look into why. I find this 'set' command very useful and I suggest
> > > you consider adding it (with or without the leading '.'). Note that I
> > > discovered a bug with Windows and the Visual Studio generator. The use of
> > > CMAKE_JAVA_INCLUDE_PATH_FINAL in the add_custom_command changes the ';'
> > > seperator into spaces - I think it needs to be escaped somehow - maybe
> > > the CMake gurus have a suggestion?
> > 
> > I'm not a java programmer and I haven't tested this stuff on Windows.
> > Please tell which variables have the wrong ; or : or whatever and what it
> > should look like. I already did some things to get it working on Windows
> > but never tested.
> > 
> > The more details you give the easier it is to fix. If you could print out
> > the variables I could try to fix it and add what you need.
> 
> I had the same problem for my XSLT modules that can make use of saxon and 
> xalan (both java program including some jar files). If you do calls to java, 
> the classpath must be it's own list and can then be run like:
>  add_custom_command (
> OUTPUT foo
> COMMAND "${JAVA_RUNTIME}" -cp "${FOO_CLASSPATH}" bar
>  )
> 
> If you import a classpath from the environment, use
>  string ( REPLACE ":" ";" .)
> but only on Windows.
> 
> This solution works on Linux and Windows.
> 
> HS
> 
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

[CMake] problem getting defines quoted properly

2011-01-14 Thread Andreas Pakulat
Hi,

I'm trying to set a define so that it can be used as string-literal in
C++ code using add_definitions. This:

add_definition( -DMYFOO=\"BAR BAZ\" )

works fine on linux, but breaks with MSVC6 on windows. I always thought
I understood cmake's quoting rules, but apparently I'm wrong :(

I've already tried:
add_definition( -DMYFOO=\\\"BAR BAZ\\\" )

What I didn't think of trying when I was at the machine is
add_definition( -DMYFOO=\\"BAR BAZ\\" )

Would that be the correct one? Or do I need even more \?

Andreas

-- 
You had some happiness once, but your parents moved away, and you had to
leave it behind.
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] New FindMPI implementation in next

2011-01-14 Thread Todd Gamblin
All,

There is a new implementation of the FindMPI module in next.  There are a 
number of changes in this version, and it did not quite make it into 2.8.4 
because it needs more testing.  If you are interested in this and can kick the 
tires, please try it out and send feedback to me.

There motivation for the new version was that the existing FindMPI does not 
support multiple languages properly.  It assumes you want either C++ or C, and 
it doesn't care which you get.  There is also no good way to do MPI for fortran 
-- the compilers are not detected.

The new interface replaces these variables:
MPI_FOUND
MPI_COMPILER
MPI_LIBRARY
MPI_COMPILE_FLAGS
MPI_INCLUDE_PATH
MPI_EXTRA_LIBRARY
MPI_LINK_FLAGS
MPI_LIBRARIES

With these:
MPI__FOUND   TRUE if FindMPI found MPI flags for 
MPI__COMPILERMPI Compiler wrapper for 
MPI__COMPILE_FLAGS   Compilation flags for MPI programs
MPI__INCLUDE_PATHInclude path(s) for MPI header
MPI__LINK_FLAGS  Linking flags for MPI programs
MPI__LIBRARIES   All libraries to link MPI programs against

for each  in (CXX, C, Fortran).

The old variables will continue to work; they are set to the MPI_CXX_ 
equivalent if it is available, and the MPI_C_ version if it is not.

However, there are some backward compatibility concerns.  In particular, you 
need to set either MPI__COMPILER or MPI__INCLUDE_PATH and 
MPI__LIBRARIES to override autodetection.  In the old FindMPI, you would 
have set either MPI_COMPILER,  MPI_INCLUDE_PATH, MPI_LIBRARY, and possibly 
MPI_EXTRA_LIBRARY to do the same.  Right now, the old variables don't serve as 
hints to the new detection mechanism, so you may need to reconfigure your -D 
arguments to CMake for new projects.

Again, the old variables continue to be *set* in the new version, but they are 
no longer used as input to the module.

Finally, there are a few other improvements.  This FindMPI will search for more 
compiler names, and it will attempt to match the MPI compiler to the ID of the 
CXX, C, or Fortran compiler.  This version also searches a few more paths for 
Windows, and should properly detect MPICH2 on Windows.

Please test this as much as possible so that hopefully this or some improved 
version can go into 2.8.5 in April.  You can either try the version in CMake 
next, or the attached FindMPI.cmake. 

-Todd





FindMPI.cmake
Description: Binary data
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] C++ linkage, Fortran standard lib

2011-01-14 Thread Nico Schlömer
> No one should set CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES or hard-code
> Fortran runtime libraries.  The set() calls you see in the above-linked
> thread come from files generated by CMake.  The workaround suggested was
> to include a dummy Fortran source file in the client application to
> convince CMake to link to the Fortran libraries too.  That will work for
> your case too.

It does indeed. Another way is to force a Fortran linker by

SET_TARGET_PROPERTIES( ${MY_EXECUTABLE} PROPERTIES LINKER_LANGUAGE Fortran )

Both not very nice.

Your suggestion is correct though: Each package should leave
information behind on how exactly it was built. Now that LAPACK uses
CMake to build, maybe there's a fair chance we get there; I'll ping
them about it.

Cheers,
Nico




On Fri, Jan 14, 2011 at 3:03 PM, Brad King  wrote:
> On 01/13/2011 04:54 PM, Nico Schlömer wrote:
>> about half a year ago, there's been a discussion here about C++
>> linking with dependencies to libgfortran present which did not
>> automatically get resolved. The issue evolved around the Trilinos
>> toolkit.
>
> I think you're referring to this:
>
>  http://www.cmake.org/pipermail/cmake/2010-July/038172.html
>
> Not much has changed.
>
>> both BLAS and LAPACK contain references to the standard Fortran library
>> depending on the platform, a fact that the (C++) client application
>> cannot be aware of.
>
> Unfortunately this is also a fact that CMake cannot know either because
> nothing tells it so.  This is what I explained in the above-linked thread.
>
> This is not specific to CMake, Fortran, or mixed Fortran/C++ code.  It is
> a case of static libraries that have unknown dependencies.  Imagine trying
> to use libtk.a without also linking to libtcl.a.  Everyone who links to
> libtk.a knows that they also need to link to libtcl.a because this is
> well-documented and not platform-specific.  Unfortunately in the case
> under discussion here the dependencies are platform-specific and not
> documented.
>
>> Back then, the following workaround was suggested:
>> The user "knows" what the necessary Fortran libraries are, and
>> manually adds them to the link line of the client application. This
>> could happen via the CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES variable
>> for example.
> [snip]
>> Now, I have a similar code (Trilinos as well, it just so happens) and
>> the same problem. As I'm using the same build system to build the code
>> on several machines, however, I cannot just hardcode the link
>> libraries.
>
> No one should set CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES or hard-code
> Fortran runtime libraries.  The set() calls you see in the above-linked
> thread come from files generated by CMake.  The workaround suggested was
> to include a dummy Fortran source file in the client application to
> convince CMake to link to the Fortran libraries too.  That will work for
> your case too.
>
> A full solution to this problem is to somehow detect the dependencies of
> the blas and lapack static libraries.  Unfortunately there is no telling
> which Fortran compiler, if any, was involved in producing a given archive.
> Furthermore we do not know which objects in the archive might depend on
> Fortran runtime library symbols, or even which symbols to reference in
> a test project to bring in those objects in the first place.  Really it
> needs to be up to the package providing the blas and lapack archives to
> somehow document their dependencies or at least which Fortran compiler
> was used to build them.
>
> -Brad
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] bootstrap search for include files

2011-01-14 Thread Brian Lewis
During bootstrap, I see
-- Looking for include files HAVE_NETDB_H
-- Looking for include files HAVE_NETDB_H - not found.

What is happening there? I don't understand why it's not found, when

# ls -l /usr/include/netdb.h
lrwxrwxrwx   1 root sys   45 Aug  6  2006
/usr/include/netdb.h -> /opt/K/SCO/tcpdev/2.1.1Ga/usr/include/netdb.h
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Anyone gotten OpenSSL to build as an external project?

2011-01-14 Thread Pau Garcia i Quiles
Hi,

I'm trying to get this working on Windows using a self-contained build
environment that does NOT have Perl in path.

It's a .bat file which downloads CMake and Perl and then fires a
CMakeLists.txt with the ExternalProject_Add to build zlib (no problem
after the patches I sent yesterday) and OpenSSL.

One problem I've found is the PATH environment variable.
ExternalProject_Add does not allow to set it, which forces me to use
CMake in command mode + set (ENV{PATH} ... ) + execute_process. Ugly.

Features I'm missing in ExternalProject_Add and I just realized
"thanks" to OpenSSL:
- Add a PATH parameter to ExternalProject_Add,
ExternalProject_Add_Step and execute_process. It should override the
default path. Adding new directories to the path would be possible by
doing PATH "$ENV{PATH}:/my/new/dir/in/path"
- Define variables for SOURCE_DIR, BINARY_DIR, etc even if EP_PREFIX
and EP_BASE are not set
- Allow for multiple CONFIGURE_COMMAND steps (I know, I can add my
custom step, but it's much more complex)

Another more issue I'm seeing with ExternalProject_Add is tarballs
with symlinks on Windows. The OpenSSL contains symlinks, which leads
to a broken source dir because CMake is unable to create some files.
Maybe CMake should pass libarchive some parameter? (if I extract the
OpenSSL tarball with WinRAR, it does not fail)

On Fri, Jan 7, 2011 at 9:34 PM, kent williams  wrote:
> This shouldn't be a big deal -- something like this should work:
>
> ExternalProject_add(OpenSSL
>    URL "http://www.openssl.org/source/openssl-1.0.0c.tar.gz";
>    URL_MD5 ff8fb85610aef328315a9decbb2712e4
>    CONFIGURE_COMMAND ./config --prefix="${CMAKE_CURRENT_BINARY_DIR}/OpenSSL"
>   BUILD_IN_SOURCE 1
>     INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/OpenSSL"
>   )
> set(OPENSSL_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/include")
> link_directories("${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/libs)
> set(OPENSSL_LIBRARIES ssl ssleay32 ssleay32MD)
>
> The problem is that OpenSSL doesn't handle configuration scripts in
> the usual way -- the configure script wants you to specify your
> platform/compiler string.
>
> They provide an 'automatic' script instead called config, so
>
> config --prefix=...
>
> Does mostly what you want, but they make you handle the OS X 64-bit
> case manually -- it wants you to run configure and tell it explicitly
> about the platform:
>
> ./Configure darwin64-x86_64-cc
>
> This is kind of crazy, but OK, whatever. So I need to try and figure
> out at configure time if it's an OS X build and if it's a 64 bit
> build.  I can use
>
> if(APPLE)
>
> to detect an Mac platform, but there's no way I can figure out to
> determine if the currently selected build type is 64 bits.  And I
> think that the stock OpenSSL distribution would completely lose its
> mind if you tried to configure a Universal Binary build!
>
> Any suggestions?
> ___
> 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.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Anyone gotten OpenSSL to build as an external project?

2011-01-14 Thread David Cole
On Fri, Jan 14, 2011 at 3:43 PM, Pau Garcia i Quiles
wrote:

> Hi,
>
> I'm trying to get this working on Windows using a self-contained build
> environment that does NOT have Perl in path.
>
> It's a .bat file which downloads CMake and Perl and then fires a
> CMakeLists.txt with the ExternalProject_Add to build zlib (no problem
> after the patches I sent yesterday) and OpenSSL.
>
> One problem I've found is the PATH environment variable.
> ExternalProject_Add does not allow to set it, which forces me to use
> CMake in command mode + set (ENV{PATH} ... ) + execute_process. Ugly.
>
> Features I'm missing in ExternalProject_Add and I just realized
> "thanks" to OpenSSL:
> - Add a PATH parameter to ExternalProject_Add,
> ExternalProject_Add_Step and execute_process. It should override the
> default path. Adding new directories to the path would be possible by
> doing PATH "$ENV{PATH}:/my/new/dir/in/path"
>

Good suggestion. Actually, we've wanted to add a feature to specify
environment variables to arbitrary calls to add_custom_command for quite a
while, but there are some subtle details behind it, and we haven't found the
time and funding to get that done yet. This would be an easy pass-through
from ExternalProject to such a feature as soon as the underlying feature
exists in add_custom_command.



> - Define variables for SOURCE_DIR, BINARY_DIR, etc even if EP_PREFIX
> and EP_BASE are not set
>

Not sure what you mean here?

If you got a ExternalProject_Get_Property(${proj} source_dir) immediately
after an ExternalProject_Add call you can retrieve the value of its source
dir regardless of if you have EP_PREFIX or EP_BASE set, right? Those only
control some of the default layouts that we had come up with when trying to
organize things.


- Allow for multiple CONFIGURE_COMMAND steps (I know, I can add my
> custom step, but it's much more complex)
>

How many would you like? Why not just run a script as the single configure
command, and then have your script do the multiple steps needed?



> Another more issue I'm seeing with ExternalProject_Add is tarballs
> with symlinks on Windows. The OpenSSL contains symlinks, which leads
> to a broken source dir because CMake is unable to create some files.
> Maybe CMake should pass libarchive some parameter? (if I extract the
> OpenSSL tarball with WinRAR, it does not fail)
>

What does WinRAR give you? Symlinks because the Windows you're using
supports them? Or copies of the linked-to files in place of symlinks? Or
something else?



>
> On Fri, Jan 7, 2011 at 9:34 PM, kent williams 
> wrote:
> > This shouldn't be a big deal -- something like this should work:
> >
> > ExternalProject_add(OpenSSL
> >URL "http://www.openssl.org/source/openssl-1.0.0c.tar.gz";
> >URL_MD5 ff8fb85610aef328315a9decbb2712e4
> >CONFIGURE_COMMAND ./config
> --prefix="${CMAKE_CURRENT_BINARY_DIR}/OpenSSL"
> >   BUILD_IN_SOURCE 1
> > INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/OpenSSL"
> >   )
> > set(OPENSSL_INCLUDE_DIR "${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/include")
> > link_directories("${CMAKE_CURRENT_BINARY_DIR}/OpenSSL/libs)
> > set(OPENSSL_LIBRARIES ssl ssleay32 ssleay32MD)
> >
> > The problem is that OpenSSL doesn't handle configuration scripts in
> > the usual way -- the configure script wants you to specify your
> > platform/compiler string.
> >
> > They provide an 'automatic' script instead called config, so
> >
> > config --prefix=...
> >
> > Does mostly what you want, but they make you handle the OS X 64-bit
> > case manually -- it wants you to run configure and tell it explicitly
> > about the platform:
> >
> > ./Configure darwin64-x86_64-cc
> >
> > This is kind of crazy, but OK, whatever. So I need to try and figure
> > out at configure time if it's an OS X build and if it's a 64 bit
> > build.  I can use
> >
> > if(APPLE)
> >
> > to detect an Mac platform, but there's no way I can figure out to
> > determine if the currently selected build type is 64 bits.  And I
> > think that the stock OpenSSL distribution would completely lose its
> > mind if you tried to configure a Universal Binary build!
> >
> > Any suggestions?
> > ___
> > 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.cmake.org/Wiki/CMake_FAQ
> >
> > Follow this link to subscribe/unsubscribe:
> > http://www.cmake.org/mailman/listinfo/cmake
> >
>
>
>
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
> ___
> 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.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinf

Re: [CMake] problem getting defines quoted properly

2011-01-14 Thread Michael Hertling
On 01/14/2011 08:25 PM, Andreas Pakulat wrote:
> Hi,
> 
> I'm trying to set a define so that it can be used as string-literal in
> C++ code using add_definitions. This:
> 
> add_definition( -DMYFOO=\"BAR BAZ\" )
> 
> works fine on linux, but breaks with MSVC6 on windows. I always thought
> I understood cmake's quoting rules, but apparently I'm wrong :(
> 
> I've already tried:
> add_definition( -DMYFOO=\\\"BAR BAZ\\\" )
> 
> What I didn't think of trying when I was at the machine is
> add_definition( -DMYFOO=\\"BAR BAZ\\" )
> 
> Would that be the correct one? Or do I need even more \?

No, you probably need a configured header. ;)

The documentation of ADD_DEFINITIONS() states

"Flags beginning in -D or /D that look like preprocessor definitions are
automatically added to the COMPILE_DEFINITIONS property for the current
directory."

and from the COMPILE_DEFINITIONS directory property's documentation:

"The VS6 IDE does not support definition values with spaces..."
 ^^^
So, I think your issue is not caused by CMake.

Regards,

Michael
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake



Re: [CMake] problem getting defines quoted properly

2011-01-14 Thread SF Markus Elfring

"The VS6 IDE does not support definition values with spaces..."


By the way:
How do you think about the bug report "rc.exe error in 2.8.4-rc1 if 
ADD_DEFINITITIONS contains definition with space" by Vladislav Vaintroub?

http://public.kitware.com/Bug/view.php?id=11695

Regards,
Markus
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Anyone gotten OpenSSL to build as an external project?

2011-01-14 Thread Pau Garcia i Quiles
On Fri, Jan 14, 2011 at 9:52 PM, David Cole  wrote:
>> - Add a PATH parameter to ExternalProject_Add,
>> ExternalProject_Add_Step and execute_process. It should override the
>> default path. Adding new directories to the path would be possible by
>> doing PATH "$ENV{PATH}:/my/new/dir/in/path"
>
> Good suggestion. Actually, we've wanted to add a feature to specify
> environment variables to arbitrary calls to add_custom_command for quite a
> while, but there are some subtle details behind it, and we haven't found the
> time and funding to get that done yet. This would be an easy pass-through
> from ExternalProject to such a feature as soon as the underlying feature
> exists in add_custom_command.

What are those subtle details?

>> - Define variables for SOURCE_DIR, BINARY_DIR, etc even if EP_PREFIX
>> and EP_BASE are not set
>
> Not sure what you mean here?
>
> If you got a ExternalProject_Get_Property(${proj} source_dir) immediately
> after an ExternalProject_Add call you can retrieve the value of its source
> dir regardless of if you have EP_PREFIX or EP_BASE set, right? Those only
> control some of the default layouts that we had come up with when trying to
> organize things.

For OpenSSL, I need to know ExternalProject_Get_Property(${proj}
source_dir) *while* I am still in ExternalProject_Add. This is still
work in progress but here is what I am doing now:

ExternalProject_Add( openssl
DEPENDS zlib
DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/downloads
URL http://openssl.org/source/openssl-1.0.0c.tar.gz
PATCH_COMMAND ${PROJECT_SOURCE_DIR}/bin/patch.exe -p1 <
${PROJECT_SOURCE_DIR}/downloads/openssl-1.0.0c.patch
CONFIGURE_COMMAND ""
BUILD_COMMAND ${CMAKE_COMMAND} -DWINST_DIR=${PROJECT_SOURCE_DIR}
-DOPENSSL_SOURCE_DIR=${PROJECT_BINARY_DIR}/openssl-prefix/src/openssl/
-DOPENSSL_GENASM_COMMAND=${OPENSSL_GENASM_COMMAND}
-DOPENSSL_CONFIGURE_COMMAND=${OPENSSL_CONFIGURE_COMMAND}
-DOPENSSL_BUILD_COMMAND=${OPENSSL_BUILD_COMMAND}
-DOPENSSL_INSTALL_COMMAND="${OPENSSL_BUILD_COMMAND} install" -P
${PROJECT_SOURCE_DIR}/configure-openssl.cmake
BUILD_IN_SOURCE 1
)

Where configure-openssl.cmake is generates the assembly code, runs
perl Configure, nmake and nmake install. The relevant part here is

-DOPENSSL_SOURCE_DIR=${PROJECT_BINARY_DIR}/openssl-prefix/src/openssl/

in BUILD_COMMAND. OpenSSL must be built in-tree, which means you need
to know where the source tree is while in the ExternalProject_Add
call.

>> - Allow for multiple CONFIGURE_COMMAND steps (I know, I can add my
>> custom step, but it's much more complex)
>
> How many would you like? Why not just run a script as the single configure
> command, and then have your script do the multiple steps needed?

That's what I'm currently doing, which is why I have the problem
above: I need to know the source directory, the build directory, etc
of that ExternalProject. That means you need to pass variables, set
PATH, etc. It'd be easier if an arbitrary number of CONFIGURE_COMMAND
would be run in order before the BUILD_COMMAND.

>> Another more issue I'm seeing with ExternalProject_Add is tarballs
>> with symlinks on Windows. The OpenSSL contains symlinks, which leads
>> to a broken source dir because CMake is unable to create some files.
>> Maybe CMake should pass libarchive some parameter? (if I extract the
>> OpenSSL tarball with WinRAR, it does not fail)
>
> What does WinRAR give you? Symlinks because the Windows you're using
> supports them? Or copies of the linked-to files in place of symlinks? Or
> something else?

Copies of the linked-to files in place of symlinks.

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Tips on cmake with git submodules?

2011-01-14 Thread James C. Sutherland
The recent thread on ctest and git submodules made me start considering
using submodules in a few projects.  My question is how to integrate the two
build systems (both cmake based).

Right now I do a find_package() to resolve the dependent library.  If I move
to a submodule, and both the superproject and subproject are cmake-based, is
there any recipe for how to make them play nice?

Thanks,

James
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] problem getting defines quoted properly

2011-01-14 Thread David Cole
On Fri, Jan 14, 2011 at 4:35 PM, SF Markus Elfring <
elfr...@users.sourceforge.net> wrote:

> "The VS6 IDE does not support definition values with spaces..."
>>
>
> By the way:
> How do you think about the bug report "rc.exe error in 2.8.4-rc1 if
> ADD_DEFINITITIONS contains definition with space" by Vladislav Vaintroub?
> http://public.kitware.com/Bug/view.php?id=11695
>
> Regards,
> Markus
>
>
We're working on it. It's brand new because preprocessor definitions in rc
files were not working right before this with VS10 because of
http://public.kitware.com/Bug/view.php?id=11460



> ___
> 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.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Anyone gotten OpenSSL to build as an external project?

2011-01-14 Thread David Cole
On Fri, Jan 14, 2011 at 4:41 PM, Pau Garcia i Quiles
wrote:

> On Fri, Jan 14, 2011 at 9:52 PM, David Cole 
> wrote:
> >> - Add a PATH parameter to ExternalProject_Add,
> >> ExternalProject_Add_Step and execute_process. It should override the
> >> default path. Adding new directories to the path would be possible by
> >> doing PATH "$ENV{PATH}:/my/new/dir/in/path"
> >
> > Good suggestion. Actually, we've wanted to add a feature to specify
> > environment variables to arbitrary calls to add_custom_command for quite
> a
> > while, but there are some subtle details behind it, and we haven't found
> the
> > time and funding to get that done yet. This would be an easy pass-through
> > from ExternalProject to such a feature as soon as the underlying feature
> > exists in add_custom_command.
>
> What are those subtle details?
>
>
I don't have them written down... every time Brad and I discuss this topic,
though, we go down the rabbit hole and find them again. Next time, I'll try
to write them down somewhere so that I can answer this succinctly. (Sorry, I
know this is a lame cop-out, but it's Friday afternoon...)



> >> - Define variables for SOURCE_DIR, BINARY_DIR, etc even if EP_PREFIX
> >> and EP_BASE are not set
> >
> > Not sure what you mean here?
> >
> > If you got a ExternalProject_Get_Property(${proj} source_dir) immediately
> > after an ExternalProject_Add call you can retrieve the value of its
> source
> > dir regardless of if you have EP_PREFIX or EP_BASE set, right? Those only
> > control some of the default layouts that we had come up with when trying
> to
> > organize things.
>
> For OpenSSL, I need to know ExternalProject_Get_Property(${proj}
> source_dir) *while* I am still in ExternalProject_Add. This is still
> work in progress but here is what I am doing now:
>
> ExternalProject_Add( openssl
>DEPENDS zlib
>DOWNLOAD_DIR ${PROJECT_SOURCE_DIR}/downloads
>URL http://openssl.org/source/openssl-1.0.0c.tar.gz
>PATCH_COMMAND ${PROJECT_SOURCE_DIR}/bin/patch.exe -p1 <
> ${PROJECT_SOURCE_DIR}/downloads/openssl-1.0.0c.patch
>CONFIGURE_COMMAND ""
>BUILD_COMMAND ${CMAKE_COMMAND} -DWINST_DIR=${PROJECT_SOURCE_DIR}
> -DOPENSSL_SOURCE_DIR=${PROJECT_BINARY_DIR}/openssl-prefix/src/openssl/
> -DOPENSSL_GENASM_COMMAND=${OPENSSL_GENASM_COMMAND}
> -DOPENSSL_CONFIGURE_COMMAND=${OPENSSL_CONFIGURE_COMMAND}
> -DOPENSSL_BUILD_COMMAND=${OPENSSL_BUILD_COMMAND}
> -DOPENSSL_INSTALL_COMMAND="${OPENSSL_BUILD_COMMAND} install" -P
> ${PROJECT_SOURCE_DIR}/configure-openssl.cmake
>BUILD_IN_SOURCE 1
>)
>
> Where configure-openssl.cmake is generates the assembly code, runs
> perl Configure, nmake and nmake install. The relevant part here is
>
> -DOPENSSL_SOURCE_DIR=${PROJECT_BINARY_DIR}/openssl-prefix/src/openssl/
>
> in BUILD_COMMAND. OpenSSL must be built in-tree, which means you need
> to know where the source tree is while in the ExternalProject_Add
> call.
>
>
So... just use  as part of a command, and it should substitute
it for you... See
http://cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject --
specifically this section:

"The command line, comment, and working directory of every standard and
custom step is processed to replace tokens , ,
, and  with corresponding property values."



> >> - Allow for multiple CONFIGURE_COMMAND steps (I know, I can add my
> >> custom step, but it's much more complex)
> >
> > How many would you like? Why not just run a script as the single
> configure
> > command, and then have your script do the multiple steps needed?
>
> That's what I'm currently doing, which is why I have the problem
> above: I need to know the source directory, the build directory, etc
> of that ExternalProject. That means you need to pass variables, set
> PATH, etc. It'd be easier if an arbitrary number of CONFIGURE_COMMAND
> would be run in order before the BUILD_COMMAND.
>
>
I'll think about it, but it's hard to see how an abitrary number of steps
(that are not simply custom defined steps with their own names) would be
readable in the ExternalProject_Add interface. It's very useful, but it's
already, at its young age, quite crowded with parameters.

...  ...



> >> Another more issue I'm seeing with ExternalProject_Add is tarballs
> >> with symlinks on Windows. The OpenSSL contains symlinks, which leads
> >> to a broken source dir because CMake is unable to create some files.
> >> Maybe CMake should pass libarchive some parameter? (if I extract the
> >> OpenSSL tarball with WinRAR, it does not fail)
> >
> > What does WinRAR give you? Symlinks because the Windows you're using
> > supports them? Or copies of the linked-to files in place of symlinks? Or
> > something else?
>
> Copies of the linked-to files in place of symlinks.
>

Thanks for the info.



>
> --
> Pau Garcia i Quiles
> http://www.elpauer.org
> (Due to my workload, I may need 10 days to answer)
>
___
Powered by www.kitware.com

Visit other Kitware open-source projects 

Re: [CMake] Anyone gotten OpenSSL to build as an external project?

2011-01-14 Thread Pau Garcia i Quiles
On Fri, Jan 14, 2011 at 11:32 PM, David Cole  wrote:
> On Fri, Jan 14, 2011 at 4:41 PM, Pau Garcia i Quiles 
> wrote:
>>
>> On Fri, Jan 14, 2011 at 9:52 PM, David Cole 
>> wrote:
>> >> - Add a PATH parameter to ExternalProject_Add,
>> >> ExternalProject_Add_Step and execute_process. It should override the
>> >> default path. Adding new directories to the path would be possible by
>> >> doing PATH "$ENV{PATH}:/my/new/dir/in/path"
>> >
>> > Good suggestion. Actually, we've wanted to add a feature to specify
>> > environment variables to arbitrary calls to add_custom_command for quite
>> > a
>> > while, but there are some subtle details behind it, and we haven't found
>> > the
>> > time and funding to get that done yet. This would be an easy
>> > pass-through
>> > from ExternalProject to such a feature as soon as the underlying feature
>> > exists in add_custom_command.
>>
>> What are those subtle details?
>>
>
> I don't have them written down... every time Brad and I discuss this topic,
> though, we go down the rabbit hole and find them again. Next time, I'll try
> to write them down somewhere so that I can answer this succinctly.

Great

> (Sorry, I
> know this is a lame cop-out, but it's Friday afternoon...)

:-)

>> OpenSSL must be built in-tree, which means you need
>> to know where the source tree is while in the ExternalProject_Add
>> call.
>>
>
> So... just use  as part of a command, and it should substitute
> it for you... See
> http://cmake.org/cmake/help/cmake-2-8-docs.html#module:ExternalProject --
> specifically this section:
>
> "The command line, comment, and working directory of every standard and
> custom step is processed to replace tokens , ,
> , and  with corresponding property values."

Oh, cool. I thought those were only placeholders in the documentation.
It works exactly as I wanted!

>> >> - Allow for multiple CONFIGURE_COMMAND steps (I know, I can add my
>> >> custom step, but it's much more complex)
>> >
>> > How many would you like? Why not just run a script as the single
>> > configure
>> > command, and then have your script do the multiple steps needed?
>>
>> That's what I'm currently doing, which is why I have the problem
>> above: I need to know the source directory, the build directory, etc
>> of that ExternalProject. That means you need to pass variables, set
>> PATH, etc. It'd be easier if an arbitrary number of CONFIGURE_COMMAND
>> would be run in order before the BUILD_COMMAND.
>>
>
> I'll think about it, but it's hard to see how an abitrary number of steps
> (that are not simply custom defined steps with their own names) would be
> readable in the ExternalProject_Add interface. It's very useful, but it's
> already, at its young age, quite crowded with parameters.

What do you mean by "readable"? Not having read the implementation of
ExternalProject_add, implementation looks easy, something like

while( nextstr == "CONFIGURE_COMMAND" ) {
...
}

>> >> Another more issue I'm seeing with ExternalProject_Add is tarballs
>> >> with symlinks on Windows. The OpenSSL contains symlinks, which leads
>> >> to a broken source dir because CMake is unable to create some files.
>> >> Maybe CMake should pass libarchive some parameter? (if I extract the
>> >> OpenSSL tarball with WinRAR, it does not fail)
>> >
>> > What does WinRAR give you? Symlinks because the Windows you're using
>> > supports them? Or copies of the linked-to files in place of symlinks? Or
>> > something else?
>>
>> Copies of the linked-to files in place of symlinks.
>
> Thanks for the info.

The libarchive docs show how to extract symlinks, hardlinks, etc

http://code.google.com/p/libarchive/wiki/Examples

-- 
Pau Garcia i Quiles
http://www.elpauer.org
(Due to my workload, I may need 10 days to answer)
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] problem getting defines quoted properly

2011-01-14 Thread Andreas Pakulat
On 14.01.11 21:57:39, Michael Hertling wrote:
> On 01/14/2011 08:25 PM, Andreas Pakulat wrote:
> > Hi,
> > 
> > I'm trying to set a define so that it can be used as string-literal in
> > C++ code using add_definitions. This:
> > 
> > add_definition( -DMYFOO=\"BAR BAZ\" )
> > 
> > works fine on linux, but breaks with MSVC6 on windows. I always thought
> > I understood cmake's quoting rules, but apparently I'm wrong :(
> > 
> > I've already tried:
> > add_definition( -DMYFOO=\\\"BAR BAZ\\\" )
> > 
> > What I didn't think of trying when I was at the machine is
> > add_definition( -DMYFOO=\\"BAR BAZ\\" )
> > 
> > Would that be the correct one? Or do I need even more \?
> 
> No, you probably need a configured header. ;)

Not an option at this point as that would require source-code changes,
which I cannot justify right now.

> The documentation of ADD_DEFINITIONS() states
> 
> "Flags beginning in -D or /D that look like preprocessor definitions are
> automatically added to the COMPILE_DEFINITIONS property for the current
> directory."
> 
> and from the COMPILE_DEFINITIONS directory property's documentation:
> 
> "The VS6 IDE does not support definition values with spaces..."
>  ^^^

Sorry, I guess I should've added that I'm using NMake Makefiles, so the
above shouldn't apply. And at least cl.exe is capable of getting values
with spaces as the existing build-system does exactly that ;)

The problem is that in the generated file thats passed to cl (btw. is
there a way to let cmake not delete this file so I can look into it) the
qupting is incorrect and hence cl considered "BAZ" a source file instead
of part of a define.

Andreas

-- 
Tomorrow will be cancelled due to lack of interest.
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


[CMake] Is HEADER_FILE_ONLY not working in Visual Studio 2010?

2011-01-14 Thread Aaron_Wright
I have a project with custom resource files in it, and unfortunately they 
have the same extension as real resource files, so Visual Studio tries to 
compile them. This obviously doesn't work.

So I set the HEADER_FILE_ONLY property on these files and that fixed it.

Now we're moving to Visual Studio 2010 on Windows 7 32-bit and the problem 
is back. The files are still marked HEADER_FILE_ONLY, but that doesn't 
exclude them from the build anymore. Is there something I can do to get 
the same behavior back I was seeing in Visual Studio 2008? Is there an 
EXCLUDE_FROM_BUILD property? I noticed a bug report on excluding files 
from the build, http://www.itk.org/Bug/view.php?id=6314, but that is 
pretty old.

I'm using CMake 2.8.3

Line from the project:



How can I get it to:


   true


Or something similar with the excluded from build set to true.
---
Aaron Wright
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Tips on cmake with git submodules?

2011-01-14 Thread Andreas Pakulat
On 14.01.11 14:56:22, James C. Sutherland wrote:
> The recent thread on ctest and git submodules made me start considering
> using submodules in a few projects.  My question is how to integrate the two
> build systems (both cmake based).
> 
> Right now I do a find_package() to resolve the dependent library.  If I move
> to a submodule, and both the superproject and subproject are cmake-based, is
> there any recipe for how to make them play nice?

add_subdirectory() and build the submodule as part of the superproject.
Make sure that the submodule also builds standalone and is not
influenced by stuff set in the super-project (move the add_subdirectory
to the top of the cmakelists.txt). Thats all I can think of right now.

Andreas

-- 
Don't tell any big lies today.  Small ones can be just as effective.
___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Qt4 module too restrictive about uic requirement

2011-01-14 Thread Clinton Stimpson

On Jan 14, 2011, at 3:27 AM, Eric Noulard wrote:

> 2011/1/14 Thomas Petazzoni :
>> Hello,
>> 
>> On Fri, 14 Jan 2011 11:06:04 +0100
>> Eric Noulard  wrote:
>> 
>>> Clinton Stimpson is the maintainer of the QT4 module
>>> http://www.cmake.org/Wiki/CMake:Module_Maintainers
>>> 
>>> He is usually responsive so I bet he will be stepping in soon.
>> 
>> Ok, thanks.
>> 
>>> Concerning your issue did you try the workaround:
>>> 
>>> find_package(Qt4 COMPONENTS QtCore)
>>> 
>>> and then
>>> if (QT_QTCORE_FOUND)
>>>   message("OK QtCore found.")
>>>   include(${QT_USE_FILE})
>>> else(QT_QTCORE_FOUND)
>>>   message(FATAL_ERROR "QtCore not found.")
>>> endif(QT_QTCORE_FOUND)
>>> 
>>> I think this "should" work for your case.
>>> However I'm not a Qt user so I may be plain wrong and Clinton will
>>> "fix me" soon.
>> 
>> I don't see how this can fix the issue I'm pointing to.
>> 
>> I'm compiling a software that *needs* QtCore, QtNetwork and QtXml, but
>> not QtGui. However, CMake insists on checking that uic is available
>> even if the QT_GUI component has not be requested.
> 
> Yes this I understand that but ...
> find_package(Qt4 COMPONENTS QtCore QtNetwork QtXml)
> 
> WITHOUT "REQUIRED"
> should say "QT Not Found" but this will not be a fatal error.
> and you may have found your required modules.
> 
>>> By the way you did not tell us which version of CMake / FindQT4 you are 
>>> using?
>> 
>> Tried both 2.8.0 and 2.8.3.
> 
> There is 2.8.4-rc1 just out:
> http://www.cmake.org/files/v2.8/?C=M;O=D
> which includes some fix/evolution w.r.t.  FindQt but none of them since to
> handle your case.
> 
> Trying with the most up-to-date rc would be nice and ease patching.
> 

Sorry it took a while to get in this thread.
I've pushed a fix for the issues brought up in this thread to next by changing 
FindQt4.cmake to use FPHSA.
uic is conditionally checked along with other components.
http://cmake.org/gitweb?p=cmake.git;a=commit;h=43cb9b8276a70d153d56a69d5c61daaf2bc51b78

Thanks,
Clint

___
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.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake