Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2015-02-21 Thread Stephen Kelly
René Tschirley wrote:

> Simplified
> the problem and verified if the set_directory_properties trick works. It
> does not work for me.
> 
> Used software: Windows7 SP1, CMake 3.1.2, Ninja 1.5.3.

> Am I forgetting something obvious? Is this an unfixed CMake bug?

Yes, it is: 

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

Thanks,

Steve.


-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake

[CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2015-02-12 Thread René Tschirley
Hi all,


I have the problem that my automatically generated Qt files are not cleaned up, 
similar to the problem described in 
http://www.cmake.org/pipermail/cmake/2013-April/054555.html. Simplified the 
problem and verified if the set_directory_properties trick works. It does not 
work for me.

Used software: Windows7 SP1, CMake 3.1.2, Ninja 1.5.3.

Makefiles configuration is done by

cmake -G "Eclipse CDT4 - Ninja" ../source

in my build folder. Build is usually started using 'ninja' and a clean is 
triggered by 'ninja clean'.

My top level CMakeLists.txt contains for testing purposes

set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES 
"foo.txt")
set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES 
"${CMAKE_CURRENT_BINARY_DIR}/foo.txt")
MESSAGE(STATUS "CMAKE_CURRENT_BINARY_DIR = ${CMAKE_CURRENT_BINARY_DIR}")

and when creating that file (manually, in my CMAKE_CURRENT_BINARY_DIR), it is 
still not cleaned up on 'ninja clean'.

Am I forgetting something obvious? Is this an unfixed CMake bug?


Cheers,
Rene

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake


Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-05-07 Thread Alexander Neundorf
On Tuesday 07 May 2013, Glenn Coombs wrote:
> I won't bother just yet then.  Let me know if I can be of any help in
> testing your fix.
> 
> BTW, is your fix likely to make it into the pending 2.8.11 release ?

Don't know, probably it's too late.

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-05-07 Thread Glenn Coombs
I won't bother just yet then.  Let me know if I can be of any help in
testing your fix.

BTW, is your fix likely to make it into the pending 2.8.11 release ?

--
Glenn

On 5 May 2013 19:33, Alexander Neundorf  wrote:

> On Sunday 05 May 2013, Glenn Coombs wrote:
> > Alex,
> >
> > Would you like me to file a bug report on this ?
>
> you can do so, but I'm working on a fix already anyway.
>
> 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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-05-05 Thread Alexander Neundorf
On Sunday 05 May 2013, Glenn Coombs wrote:
> Alex,
> 
> Would you like me to file a bug report on this ?

you can do so, but I'm working on a fix already anyway.

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-05-05 Thread Glenn Coombs
Alex,

Would you like me to file a bug report on this ?

--
Glenn


On 1 May 2013 08:33, Glenn Coombs  wrote:

> I select "Clean Solution" from the Build menu which is a complete clean.
> The output looks like this:
>
> 1>-- Skipped Clean: Project: INSTALL, Configuration: Debug Win32 --
> 1>Project not selected to build for this solution configuration
> 2>-- Clean started: Project: ALL_BUILD, Configuration: Debug Win32
> --
> 3>-- Clean started: Project: yuv_player, Configuration: Debug Win32
> --
> 4>-- Clean started: Project: yuv_player_automoc, Configuration: Debug
> Win32 --
> 5>-- Clean started: Project: ZERO_CHECK, Configuration: Debug Win32
> --
> == Clean: 4 succeeded, 0 failed, 1 skipped ==
>
> The yuv_player_automoc project looks like it is being cleaned but the
> associated moc_*.cpp and yuv_player_automoc.cpp files are never deleted.
> After doing a "Clean Solution" and manually deleting the
> yuv_player_automoc.cpp file a build works as expected:
>
> 1>-- Build started: Project: ZERO_CHECK, Configuration: Debug Win32
> --
> 2>-- Build started: Project: yuv_player_automoc, Configuration: Debug
> Win32 --
> 1>  Checking Build System
> 2>  Automoc for target yuv_player
> 1>  CMake does not need to re-run because
> C:/data/perforceCheckouts/sim/tools/yuvplayer/DEV/glenn.coombs/cmake/CMakeFiles/generate.stamp
> is up-to-date.
> 2>  Generating moc_ctrlBasic.cpp
> 2>  Generating moc_ctrlmenu.cpp
> 2>  Generating moc_infoWin.cpp
> 2>  Generating moc_imageDisplay.cpp
> 2>  Generating moc_imageDisplayGL.cpp
> 2>  Generating moc_imageDisplayQt.cpp
> 2>  Generating moc_multiWindow.cpp
> 2>  Generating moc_videoGeneric.cpp
> ...
>
> with the moc_*.cpp files being regenerated.  If I don't manually delete
> the yuv_player_automoc.cpp file then the moc_*.cpp files are never
> regenerated even if they are out of date compared to the header files they
> are generated from.
>
> --
> Glenn
>
>
>
> On 29 April 2013 17:15, Alexander Neundorf wrote:
>
>> On Monday 29 April 2013, Glenn Coombs wrote:
>> > I added these lines:
>> >
>> > set_directory_properties(
>> > PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
>> > "${CMAKE_CURRENT_BINARY_DIR}/abc.txt"
>> > )
>> >
>> > # check the location where abc.txt is supposed to be deleted from
>> > message("CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
>> >
>> > to the end of my CMakeLists.txt and then created abc.txt in the cmake
>> build
>> > directory.  I can confirm that the abc.txt file was not deleted by a
>> clean
>> > solution.  I tried this with Visual Studio 2012 and Visual Studio 2008
>> > (both installs are the Express editions) and the results were identical.
>>
>> I don't have Windows here so this is kind of hard for me...
>> Did you do a "complete" clean or just a clean of some part of the whole
>> project ?
>>
>> 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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-05-01 Thread Glenn Coombs
I select "Clean Solution" from the Build menu which is a complete clean.
The output looks like this:

1>-- Skipped Clean: Project: INSTALL, Configuration: Debug Win32 --
1>Project not selected to build for this solution configuration
2>-- Clean started: Project: ALL_BUILD, Configuration: Debug Win32
--
3>-- Clean started: Project: yuv_player, Configuration: Debug Win32
--
4>-- Clean started: Project: yuv_player_automoc, Configuration: Debug
Win32 --
5>-- Clean started: Project: ZERO_CHECK, Configuration: Debug Win32
--
== Clean: 4 succeeded, 0 failed, 1 skipped ==

The yuv_player_automoc project looks like it is being cleaned but the
associated moc_*.cpp and yuv_player_automoc.cpp files are never deleted.
After doing a "Clean Solution" and manually deleting the
yuv_player_automoc.cpp file a build works as expected:

1>-- Build started: Project: ZERO_CHECK, Configuration: Debug Win32
--
2>-- Build started: Project: yuv_player_automoc, Configuration: Debug
Win32 --
1>  Checking Build System
2>  Automoc for target yuv_player
1>  CMake does not need to re-run because
C:/data/perforceCheckouts/sim/tools/yuvplayer/DEV/glenn.coombs/cmake/CMakeFiles/generate.stamp
is up-to-date.
2>  Generating moc_ctrlBasic.cpp
2>  Generating moc_ctrlmenu.cpp
2>  Generating moc_infoWin.cpp
2>  Generating moc_imageDisplay.cpp
2>  Generating moc_imageDisplayGL.cpp
2>  Generating moc_imageDisplayQt.cpp
2>  Generating moc_multiWindow.cpp
2>  Generating moc_videoGeneric.cpp
...

with the moc_*.cpp files being regenerated.  If I don't manually delete the
yuv_player_automoc.cpp file then the moc_*.cpp files are never regenerated
even if they are out of date compared to the header files they are
generated from.

--
Glenn


On 29 April 2013 17:15, Alexander Neundorf  wrote:

> On Monday 29 April 2013, Glenn Coombs wrote:
> > I added these lines:
> >
> > set_directory_properties(
> > PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
> > "${CMAKE_CURRENT_BINARY_DIR}/abc.txt"
> > )
> >
> > # check the location where abc.txt is supposed to be deleted from
> > message("CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
> >
> > to the end of my CMakeLists.txt and then created abc.txt in the cmake
> build
> > directory.  I can confirm that the abc.txt file was not deleted by a
> clean
> > solution.  I tried this with Visual Studio 2012 and Visual Studio 2008
> > (both installs are the Express editions) and the results were identical.
>
> I don't have Windows here so this is kind of hard for me...
> Did you do a "complete" clean or just a clean of some part of the whole
> project ?
>
> 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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-04-29 Thread Alexander Neundorf
On Monday 29 April 2013, Glenn Coombs wrote:
> I added these lines:
> 
> set_directory_properties(
> PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
> "${CMAKE_CURRENT_BINARY_DIR}/abc.txt"
> )
> 
> # check the location where abc.txt is supposed to be deleted from
> message("CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
> 
> to the end of my CMakeLists.txt and then created abc.txt in the cmake build
> directory.  I can confirm that the abc.txt file was not deleted by a clean
> solution.  I tried this with Visual Studio 2012 and Visual Studio 2008
> (both installs are the Express editions) and the results were identical.

I don't have Windows here so this is kind of hard for me...
Did you do a "complete" clean or just a clean of some part of the whole 
project ?

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-04-29 Thread Glenn Coombs
I added these lines:

set_directory_properties(
PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
"${CMAKE_CURRENT_BINARY_DIR}/abc.txt"
)

# check the location where abc.txt is supposed to be deleted from
message("CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")

to the end of my CMakeLists.txt and then created abc.txt in the cmake build
directory.  I can confirm that the abc.txt file was not deleted by a clean
solution.  I tried this with Visual Studio 2012 and Visual Studio 2008
(both installs are the Express editions) and the results were identical.

--
Glenn


On 28 April 2013 11:53, Alexander Neundorf  wrote:

> On Sunday 28 April 2013, Glenn Coombs wrote:
> > No, cleaning the project didn't remove that file.
>
> Can you manually set the ADDITIONAL_MAKE_CLEAN_FILES directory property to
> some file and check whether this file is deleted when you clean ?
>
> Something like
>
> set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
> "${CMAKE_CURRENT_BINARY_DIR}/abc.txt" )
>
>
> then just create such a file in the build dir, and clean.
> It should be removed then.
> If it is not, then this is the reason why clean doesn't clean automoc
> properly.
>
> 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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-04-28 Thread Alexander Neundorf
On Sunday 28 April 2013, Glenn Coombs wrote:
> No, cleaning the project didn't remove that file.

Can you manually set the ADDITIONAL_MAKE_CLEAN_FILES directory property to 
some file and check whether this file is deleted when you clean ?

Something like

set_directory_properties(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES
"${CMAKE_CURRENT_BINARY_DIR}/abc.txt" )
 

then just create such a file in the build dir, and clean.
It should be removed then.
If it is not, then this is the reason why clean doesn't clean automoc 
properly.

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-04-28 Thread Glenn Coombs
No, cleaning the project didn't remove that file.

--
Glenn

On 26 April 2013 17:28, Alexander Neundorf  wrote:

> On Friday 26 April 2013, Glenn Coombs wrote:
> > No, the yuv_player_automoc.cpp file is not removed on a clean (nor are
> the
> > other moc_*.cpp files).  Having just modified ctrlBasic.cpp and
> > ctrlBasic.h:
> >
> > $ ls -ltr moc* ../ctrlMenu/ctrlBasic.*
> > -rwxr-xr-x+ 1 glenn.coombs Domain Users  4366 Apr 25 15:04
> > moc_ctrlBasic.cpp*
> > -rwxr-xr-x+ 1 glenn.coombs Domain Users 11912 Apr 25 15:04
> > moc_ctrlmenu.cpp* -rwxr-xr-x+ 1 glenn.coombs Domain Users  8203 Apr 25
> > 15:04 moc_infoWin.cpp* -rwxr-xr-x+ 1 glenn.coombs Domain Users  3508 Apr
> > 25 15:04
> > moc_qglDisplay.cpp*
> > -rwxr-xr-x+ 1 glenn.coombs Domain Users  6493 Apr 25 15:04
> > moc_qglMultiWindow.cpp*
> > -rwxr-xr-x+ 1 glenn.coombs Domain Users  2529 Apr 25 15:04
> > moc_qglWindow.cpp*
> > -rwxr-xr-x+ 1 glenn.coombs Domain Users  4242 Apr 25 15:04
> > moc_videoGeneric.cpp*
> > -rwxr-xr-x+ 1 glenn.coombs Domain Users  8513 Apr 26 08:27
> > ../ctrlMenu/ctrlBasic.cpp*
> > -rwxr-xr-x+ 1 glenn.coombs Domain Users  1237 Apr 26 08:28
> > ../ctrlMenu/ctrlBasic.h*
> >
> > I would expect the moc_ctrlBasic.cpp file to be regenerated but it isn't.
> > In fact, if I manually delete moc_ctrlBasic.cpp then the build fails:
> >
> > 1>-- Build started: Project: yuv_player, Configuration: Debug Win32
> > --
> > 1>  yuv_player_automoc.cpp
> > 1>yuv_player_automoc.cpp(2): fatal error C1083: Cannot open include file:
> > 'moc_ctrlBasic.cpp': No such file or directory
> >
> > The only way to get moc_ctrlBasic.cpp regenerated that I have found so
> far
> > is to manually delete both it and yuv_player_automoc.cpp.
>
> yuv_player_automoc.cpp is the "key" file. If you remove it, everything
> should
> be regenerated.
>
> So "cleaning" the project did not remove that file ?
>
> I'll have a look.
>
> 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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-04-26 Thread Alexander Neundorf
On Friday 26 April 2013, Glenn Coombs wrote:
> No, the yuv_player_automoc.cpp file is not removed on a clean (nor are the
> other moc_*.cpp files).  Having just modified ctrlBasic.cpp and
> ctrlBasic.h:
> 
> $ ls -ltr moc* ../ctrlMenu/ctrlBasic.*
> -rwxr-xr-x+ 1 glenn.coombs Domain Users  4366 Apr 25 15:04
> moc_ctrlBasic.cpp*
> -rwxr-xr-x+ 1 glenn.coombs Domain Users 11912 Apr 25 15:04
> moc_ctrlmenu.cpp* -rwxr-xr-x+ 1 glenn.coombs Domain Users  8203 Apr 25
> 15:04 moc_infoWin.cpp* -rwxr-xr-x+ 1 glenn.coombs Domain Users  3508 Apr
> 25 15:04
> moc_qglDisplay.cpp*
> -rwxr-xr-x+ 1 glenn.coombs Domain Users  6493 Apr 25 15:04
> moc_qglMultiWindow.cpp*
> -rwxr-xr-x+ 1 glenn.coombs Domain Users  2529 Apr 25 15:04
> moc_qglWindow.cpp*
> -rwxr-xr-x+ 1 glenn.coombs Domain Users  4242 Apr 25 15:04
> moc_videoGeneric.cpp*
> -rwxr-xr-x+ 1 glenn.coombs Domain Users  8513 Apr 26 08:27
> ../ctrlMenu/ctrlBasic.cpp*
> -rwxr-xr-x+ 1 glenn.coombs Domain Users  1237 Apr 26 08:28
> ../ctrlMenu/ctrlBasic.h*
> 
> I would expect the moc_ctrlBasic.cpp file to be regenerated but it isn't.
> In fact, if I manually delete moc_ctrlBasic.cpp then the build fails:
> 
> 1>-- Build started: Project: yuv_player, Configuration: Debug Win32
> --
> 1>  yuv_player_automoc.cpp
> 1>yuv_player_automoc.cpp(2): fatal error C1083: Cannot open include file:
> 'moc_ctrlBasic.cpp': No such file or directory
> 
> The only way to get moc_ctrlBasic.cpp regenerated that I have found so far
> is to manually delete both it and yuv_player_automoc.cpp.

yuv_player_automoc.cpp is the "key" file. If you remove it, everything should 
be regenerated.

So "cleaning" the project did not remove that file ?

I'll have a look.

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://www.cmake.org/mailman/listinfo/cmake


Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-04-26 Thread Glenn Coombs
No, the yuv_player_automoc.cpp file is not removed on a clean (nor are the
other moc_*.cpp files).  Having just modified ctrlBasic.cpp and ctrlBasic.h:

$ ls -ltr moc* ../ctrlMenu/ctrlBasic.*
-rwxr-xr-x+ 1 glenn.coombs Domain Users  4366 Apr 25 15:04
moc_ctrlBasic.cpp*
-rwxr-xr-x+ 1 glenn.coombs Domain Users 11912 Apr 25 15:04 moc_ctrlmenu.cpp*
-rwxr-xr-x+ 1 glenn.coombs Domain Users  8203 Apr 25 15:04 moc_infoWin.cpp*
-rwxr-xr-x+ 1 glenn.coombs Domain Users  3508 Apr 25 15:04
moc_qglDisplay.cpp*
-rwxr-xr-x+ 1 glenn.coombs Domain Users  6493 Apr 25 15:04
moc_qglMultiWindow.cpp*
-rwxr-xr-x+ 1 glenn.coombs Domain Users  2529 Apr 25 15:04
moc_qglWindow.cpp*
-rwxr-xr-x+ 1 glenn.coombs Domain Users  4242 Apr 25 15:04
moc_videoGeneric.cpp*
-rwxr-xr-x+ 1 glenn.coombs Domain Users  8513 Apr 26 08:27
../ctrlMenu/ctrlBasic.cpp*
-rwxr-xr-x+ 1 glenn.coombs Domain Users  1237 Apr 26 08:28
../ctrlMenu/ctrlBasic.h*

I would expect the moc_ctrlBasic.cpp file to be regenerated but it isn't.
In fact, if I manually delete moc_ctrlBasic.cpp then the build fails:

1>-- Build started: Project: yuv_player, Configuration: Debug Win32
--
1>  yuv_player_automoc.cpp
1>yuv_player_automoc.cpp(2): fatal error C1083: Cannot open include file:
'moc_ctrlBasic.cpp': No such file or directory

The only way to get moc_ctrlBasic.cpp regenerated that I have found so far
is to manually delete both it and yuv_player_automoc.cpp.

--
Glenn

On 25 April 2013 21:23, Alexander Neundorf  wrote:

> On Thursday 25 April 2013, Glenn Coombs wrote:
> > Hi,
> >
> > I have a Qt4 program that I'm working on and ran into an issue yesterday
> > with the automoc cpp files.  I had added a new slot and connected a
> > comboxbox currentIndexChanged signal to it but when I ran the program I
> > could see messages on stdout complaining that my slot didn't exist.  I
> > tracked the problem down to the fact that the moc_ctrlBasic.cpp file was
> > not being regenerated.  If I look in my cmake build directory I currently
> > have 8 moc cpp files:
> >
> > ./moc_ctrlBasic.cpp
> > ./moc_ctrlmenu.cpp
> > ./moc_infoWin.cpp
> > ./moc_qglDisplay.cpp
> > ./moc_qglMultiWindow.cpp
> > ./moc_qglWindow.cpp
> > ./moc_videoGeneric.cpp
> > ./yuv_player_automoc.cpp
> >
> > I am using CMake 2.8.10.1 with Visual Studio 11 and when I do a clean
> > solution these 8 moc cpp files are not deleted.
>
> That's ok so far.
> automoc should create a file yuv_player_automoc.cpp, and this file should
> be
> removed when you clean.
> Is that the case ?
> This missing file should then trigger a rerun of automoc.
>
> 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://www.cmake.org/mailman/listinfo/cmake

Re: [CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-04-25 Thread Alexander Neundorf
On Thursday 25 April 2013, Glenn Coombs wrote:
> Hi,
> 
> I have a Qt4 program that I'm working on and ran into an issue yesterday
> with the automoc cpp files.  I had added a new slot and connected a
> comboxbox currentIndexChanged signal to it but when I ran the program I
> could see messages on stdout complaining that my slot didn't exist.  I
> tracked the problem down to the fact that the moc_ctrlBasic.cpp file was
> not being regenerated.  If I look in my cmake build directory I currently
> have 8 moc cpp files:
> 
> ./moc_ctrlBasic.cpp
> ./moc_ctrlmenu.cpp
> ./moc_infoWin.cpp
> ./moc_qglDisplay.cpp
> ./moc_qglMultiWindow.cpp
> ./moc_qglWindow.cpp
> ./moc_videoGeneric.cpp
> ./yuv_player_automoc.cpp
> 
> I am using CMake 2.8.10.1 with Visual Studio 11 and when I do a clean
> solution these 8 moc cpp files are not deleted.  

That's ok so far.
automoc should create a file yuv_player_automoc.cpp, and this file should be 
removed when you clean.
Is that the case ?
This missing file should then trigger a rerun of automoc.

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://www.cmake.org/mailman/listinfo/cmake


[CMake] Problem with CMAKE_AUTOMOC files not being regenerated or cleaned

2013-04-25 Thread Glenn Coombs
Hi,

I have a Qt4 program that I'm working on and ran into an issue yesterday
with the automoc cpp files.  I had added a new slot and connected a
comboxbox currentIndexChanged signal to it but when I ran the program I
could see messages on stdout complaining that my slot didn't exist.  I
tracked the problem down to the fact that the moc_ctrlBasic.cpp file was
not being regenerated.  If I look in my cmake build directory I currently
have 8 moc cpp files:

./moc_ctrlBasic.cpp
./moc_ctrlmenu.cpp
./moc_infoWin.cpp
./moc_qglDisplay.cpp
./moc_qglMultiWindow.cpp
./moc_qglWindow.cpp
./moc_videoGeneric.cpp
./yuv_player_automoc.cpp

I am using CMake 2.8.10.1 with Visual Studio 11 and when I do a clean
solution these 8 moc cpp files are not deleted.  In order to get my new
slot recognised I had to manually delete these moc files and then after a
rebuild everything worked as expected.  None of my cpp files #include
"moc_xxx.cpp" but that isn't necessary from my reading of the AUTOMOC
property (i.e. ctrlBasic.cpp only does a #include "ctrlBasic.h").  What am
I doing wrong in my CMakeLists.txt file which looks like this:

cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)

project(yuv_player)

find_package(OpenGL REQUIRED)

find_package(Qt4 REQUIRED)
set(QT_USE_QTMAIN true)
set(QT_USE_QTOPENGL true)
include(${QT_USE_FILE})

set(CMAKE_AUTOMOC true)

if (MSVC)
add_definitions(/MP)# build in parallel
# disable the security warnings for fopen, scanf etc.
add_definitions(/D"_CRT_SECURE_NO_WARNINGS" /D"_SCL_SECURE_NO_WARNINGS")
endif()

set(sources
main.cpp
yuv_tools.cpp
ctrlMenu/ctrlBasic.cpp
ctrlMenu/ctrlmenu.cpp
multiWindow/qglMultiWindow.cpp
multiWindow/qglDisplay.cpp
multiWindow/qglWindow.cpp
utils/readYuv.cpp
utils/readOut2.cpp
video_tools.cpp
ctrlMenu/infoWin.cpp
videoGeneric.cpp
)

set(headers
yuv_tools.h
ctrlMenu/ctrlBasic.h
ctrlMenu/ctrlmenu.h
ctrlMenu/infoWin.h
multiWindow/qglDisplay.h
multiWindow/qglMultiWindow.h
multiWindow/qglWindow.h
utils/readYuv.h
utils/readOut2.h
video_tools.h
ctrlMenu/infoWin.h
videoGeneric.h
defs.h
)

include_directories(
.
multiWindow
ctrlMenu
)

add_executable(yuv_player WIN32 ${sources} ${headers})

target_link_libraries(yuv_player ${QT_LIBRARIES} ${OPENGL_LIBRARIES})

--
Glenn
--

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