Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?

2012-07-27 Thread David Cole
On Fri, Jul 27, 2012 at 4:27 PM, Alexander Neundorf  wrote:
> On Thursday 05 July 2012, David Cole wrote:
>
>> On Thu, Jul 5, 2012 at 12:29 PM, Clinton Stimpson 
>> wrote:
>
>> > On Thursday, July 05, 2012 06:20:56 PM Alexander Neundorf wrote:
>
>> >> On Thursday, 5. July 2012 17:37:21 Clinton Stimpson wrote:
>
>> >> > On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote:
>
>> >> > > Hi,
>
>> >> > >
>
>> >> > > attached is a small patch which sets the OBJECT_DEPENDS property of
>
>> >> > > a
>
>> >> > > moced file to the generated moc file.
>
>> >> > > This has the effect that before the cpp file is built, moc has been
>
>> >> > > run
>
>> >> > > on it. We have that in KDE's version of qt4_generate_moc() this way
>
>> >> > > since 2006 and it works for us.
>
>> >> > > In cmake's version, it was removed January 11th 2008, the removed
>
>> >> > > call to MACRO_ADD_FILE_DEPENDENCIES():
>
>> >> > >
>> >> > > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fb
>
>> >> > > b541c 4e7 e4731de9bfbd483
>
>> >> > >
>
>> >> > > Now since we are trying to get rid of our custom stuff in KDE, we
>
>> >> > > hit
>
>> >> > > that issue when trying to build parts of KDE with FindQt4.cmake
>> >> > > from
>
>> >> > > cmake.
>
>> >> > >
>
>> >> > > Do you remember why this line was removed ?
>
>> >> > > What do you think about adding it again, as the attached patch does
>
>> >> > > ?
>
>> >> > >
>
>> >> > > Alex
>
>> >> >
>
>> >> > It was probably removed because I thought add_custom_command()
>> >> > already
>
>> >> > added the needed dependency information.
>
>> >> >
>
>> >> > It should already have this:
>
>> >> > mocable.h -> moc_mocable.cpp -> moc_mocable.o
>
>> >>
>
>> >> This works if the generated moc file is listed as source file for a
>
>> >> target. In several places we did not do this, and relied instead on the
>
>> >> OBJECT_DEPENDS.
>
>> >> Ahh, this was in places where the moc file is generated from a cpp
>> >> file,
>
>> >> which includes the moc file.
>
>> >> In those cases the OBJECT_DEPENDS makes it work.
>
>> >>
>
>> >> We fixed this in the meantime by adding the generated moc file to the
>
>> >> source list (which is not too bad, since the developer explicitely
>
>> >> names the moc file, so it is ok).
>
>> >>
>
>> >> So, I would like to have that dependency, but I'm unsure whether it
>
>> >> might have any unwanted side effects.
>
>> >
>
>> > Ah, so for the case
>
>> > mocable.h -> mocable.moc -> mocable.cpp (includes mocable.moc)
>
>> > the mocable.moc is not listed in the sources of the target.
>
>> >
>
>> > I can't think of any possible unwanted side effects.
>
>> > I agree that we need to have this patch.
>
>> >
>
>> > --
>
>> > Clinton Stimpson
>
>> > Elemental Technologies, Inc
>
>> > Computational Simulation Software, LLC
>
>> > www.csimsoft.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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
>
>>
>
>> If somebody pushes this to 'next' today or tomorrow, I'll make sure we
>
>> can get it into 2.8.9-rc2.
>
> Too late now for 2.8.9 ?
>
> Alex


Unless you tell me it's absolutely critical, and the fix is 99.%
safe, then, yes, it's too late.

But 2.8.10 is right around the corner if you adopt the right viewpoint. :-)
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] Use OBJECT_DEPENDS in qt4_generate_moc() ?

2012-07-27 Thread Alexander Neundorf
On Thursday 05 July 2012, David Cole wrote:
> On Thu, Jul 5, 2012 at 12:29 PM, Clinton Stimpson  
wrote:
> > On Thursday, July 05, 2012 06:20:56 PM Alexander Neundorf wrote:
> >> On Thursday, 5. July 2012 17:37:21 Clinton Stimpson wrote:
> >> > On Friday, June 15, 2012 09:56:51 PM Alexander Neundorf wrote:
> >> > > Hi,
> >> > > 
> >> > > attached is a small patch which sets the OBJECT_DEPENDS  property of
> >> > > a
> >> > > moced file to the generated moc file.
> >> > > This has the effect that before the cpp file is built, moc has been
> >> > > run
> >> > > on it. We have that in KDE's version of qt4_generate_moc() this way
> >> > > since 2006 and it works for us.
> >> > > In cmake's version, it was removed January 11th 2008, the removed
> >> > > call to MACRO_ADD_FILE_DEPENDENCIES():
> >> > > http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=510f578f8b53858fb
> >> > > b541c 4e7 e4731de9bfbd483
> >> > > 
> >> > > Now since we are trying to get rid of our custom stuff in KDE, we
> >> > > hit
> >> > > that issue when trying to build parts of KDE with FindQt4.cmake from
> >> > > cmake.
> >> > > 
> >> > > Do you remember why this line was removed ?
> >> > > What do you think about adding it again, as the attached patch does
> >> > > ?
> >> > > 
> >> > > Alex
> >> > 
> >> > It was probably removed because I thought add_custom_command() already
> >> > added the needed dependency information.
> >> > 
> >> > It should already have this:
> >> > mocable.h -> moc_mocable.cpp ->  moc_mocable.o
> >> 
> >> This works if the generated moc file is listed as source file for a
> >> target. In several places we did not do this, and relied instead on the
> >> OBJECT_DEPENDS.
> >> Ahh, this was in places where the moc file is generated from a cpp file,
> >> which includes the moc file.
> >> In those cases the OBJECT_DEPENDS makes it work.
> >> 
> >> We fixed this in the meantime by adding the generated moc file to the
> >> source list (which is not too bad, since the developer explicitely
> >> names the moc file, so it is ok).
> >> 
> >> So, I would like to have that dependency, but I'm unsure whether it
> >> might have any unwanted side effects.
> > 
> > Ah, so for the case
> > mocable.h -> mocable.moc -> mocable.cpp (includes mocable.moc)
> > the mocable.moc is not listed in the sources of the target.
> > 
> > I can't think of any possible unwanted side effects.
> > I agree that we need to have this patch.
> > 
> > --
> > Clinton Stimpson
> > Elemental Technologies, Inc
> > Computational Simulation Software, LLC
> > www.csimsoft.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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
> 
> If somebody pushes this to 'next' today or tomorrow, I'll make sure we
> can get it into 2.8.9-rc2.

Too late now for 2.8.9 ?

Alex

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] [CMake] ADD_DEPENDENCIES() and NonExisitngDependent is NOT an error?

2012-07-27 Thread David Cole
Sorry I don't have the bandwidth to chime in on this very much, but
just so you don't waste any more of your time on this (unless you're
really passionate about it and would do it anyhow...):

I'm not going to rush a change like this into CMake just before the
2.8.9 release.

The best possible scenario here is for a change like this to go into
'master' right after the 2.8.9 release and be ready for when 2.8.10
rolls around.

This "bug" has been around for a mighty long time, and once you know
about it, you just "don't do that" anymore.

Having said that, we're not going to put in a semi-fix for this one
"for now" and then fix it up more later: we'll spend the effort and
time on it to get it right the first time, or we'll just leave well
enough alone.


Thanks,
David


On Fri, Jul 27, 2012 at 2:02 PM, Claus Klein  wrote:
> Third try ...
>
> I have a Problem to really break the generation if the target does not
> exist:
>
> claus-kleins-macbook-pro:build clausklein$
> /Users/clausklein/Downloads/CmakeBuildDir/bin/cmake -G Ninja ..
> -- Configuring done
> CMake Error:
> Policy CMP0019 is not set: add_dependencies() Dependent targets must all
> exist.  Run "cmake --help-policy CMP0019" for policy details.  Use the
> cmake_policy command to set the policy and suppress this warning.
> ftpcpp: Adding dependency to non-existent target:
> target_that_does_not_exist_now_but_will_be_added_later
>
> -- Generating done
> -- Build files have been written to:
> /Users/clausklein/Workspace/cpp/ftplibpp-2.0.2/build
> claus-kleins-macbook-pro:build clausklein$
>
>
> Can anyone please help?
>
> Thanks in advance
> Best Regards
> Claus
>
> On 27.07.2012, at 12:24, Claus Klein wrote:
>
> new patch with policy handling uploaded.
> http://public.kitware.com/Bug/view.php?id=9188
>
> Not sure if all is right, but as a basis for integration...
>
>
>
> --
>
> 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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] ADD_DEPENDENCIES() and NonExisitngDependent is NOT an error?

2012-07-27 Thread Claus Klein

Third try ...

I have a Problem to really break the generation if the target does not  
exist:


claus-kleins-macbook-pro:build clausklein$ /Users/clausklein/Downloads/ 
CmakeBuildDir/bin/cmake -G Ninja ..

-- Configuring done
CMake Error:
Policy CMP0019 is not set: add_dependencies() Dependent targets must  
all exist.  Run "cmake --help-policy CMP0019" for policy details.  Use  
the cmake_policy command to set the policy and suppress this warning.
ftpcpp: Adding dependency to non-existent target:  
target_that_does_not_exist_now_but_will_be_added_later


-- Generating done
-- Build files have been written to: /Users/clausklein/Workspace/cpp/ 
ftplibpp-2.0.2/build

claus-kleins-macbook-pro:build clausklein$


Can anyone please help?

Thanks in advance
Best Regards
Claus

On 27.07.2012, at 12:24, Claus Klein wrote:


new patch with policy handling uploaded.
http://public.kitware.com/Bug/view.php?id=9188

Not sure if all is right, but as a basis for integration...



--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] CMake, Xcode 4.4, and Mountain Lion

2012-07-27 Thread Brad King
On 07/27/2012 12:50 PM, Ho Cheung wrote:
> If this is the case, how would one go about enabling compiler options 
> specifically for Xcode?
> 
> My project currently supports gcc and msvc which I check with 
> CMAKE_COMPILER_IS_GNUCC or MSVC variables respectively.
> 
> Since Xcode uses clang but CMAKE_C_COMPILER is set to gcc, the gcc compiler 
> flags are being passed to clang.

One workaround is to use the CheckCCompilerFlag module:

 http://www.cmake.org/cmake/help/v2.8.8/cmake.html#module:CheckCCompilerFlag
 
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CheckCCompilerFlag.cmake;hb=v2.8.8
 
http://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/CheckCXXCompilerFlag.cmake;hb=v2.8.8

to test for the flag in question.

As I said in my last response this is a bug in the Xcode
generator but so far it hasn't been painful enough to motivate
anyone to fix it.

-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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] CMake, Xcode 4.4, and Mountain Lion

2012-07-27 Thread Ho Cheung
If this is the case, how would one go about enabling compiler options 
specifically for Xcode?

My project currently supports gcc and msvc which I check with 
CMAKE_COMPILER_IS_GNUCC or MSVC variables respectively.

Since Xcode uses clang but CMAKE_C_COMPILER is set to gcc, the gcc compiler 
flags are being passed to clang.

-Ho

On Jul 26, 2012, at 12:10 PM, Ho Cheung  wrote:

> Hi developers,
> 
> As some of you have heard, Apple released Mountain Lion yesterday alongside a 
> new release of Xcode (4.4).
> 
> Back in XCode 4.2, Apple decided to make the clang/LLVM compiler the default 
> in XCode
> 
> Whenever I run the Xcode generator and Configure my project, I noticed that 
> CMAKE_C_COMPILER is pointing to /usr/bin/gcc. However, when I open the 
> project up in Xcode, I noticed that the compiler is still set to Default 
> (LLVM 3.0) and all the messages indicate that clang is being run.
> 
> I'm not sure this behavior is new to Xcode 4.4 or Mountain Lion or regresses 
> back to Lion/Xcode 4.3 as I haven't used Xcode for development of my project 
> since Snow Leopard/Xcode 3.x.
> 
> Could anyone advise?
> 
> Thanks,
> 
> Ho Cheung

--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


[cmake-developers] CMake coverage

2012-07-27 Thread Rolf Eike Beer
I was just wondering: have there ever existed plans to add code coverage 
support for CMake files?

This could be a cool project for something like Google Summer of Code or 
something like that, no?

Eike

signature.asc
Description: This is a digitally signed message part.
--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Re: [cmake-developers] CMake, Xcode 4.4, and Mountain Lion

2012-07-27 Thread Brad King
On 07/26/2012 01:10 PM, Ho Cheung wrote:
> Xcode generator and Configure my project, I noticed that CMAKE_C_COMPILER
> is pointing to /usr/bin/gcc.

AFAIK the Xcode generator has always left CMAKE_*_COMPILER set
to values that it doesn't really use for generation.  It should
probably be taught to detect the path to the internal compiler
Xcode uses and set the CMAKE_*_COMPILER variables accordingly
(or at least to just the compiler basename like "gcc" or "clang").
So far no one has cared enough about this to propose a specific
solution.

-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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers


Re: [cmake-developers] [CMake] ADD_DEPENDENCIES() and NonExisitngDependent is NOT an error?

2012-07-27 Thread Claus Klein

Update,

new patch with policy handling uploaded.
http://public.kitware.com/Bug/view.php?id=9188

Not sure if all is right, but as a basis for integration...

Claus

On 26.07.2012, at 23:25, Claus Klein wrote:


Thanks David,

here is my patch, I have tested it today which "ninja Experimental"



--

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://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers