Re: [CMake] CMake 2.8.8-rc1, Ninja generator, and clean target

2012-04-02 Thread Nicolas Desprès
Hi,

It looks like an issue in the generator. The symlink is created as a
side effect of a rule and not mentioned in the output files. That's
why it does not get removed. I have pushed a patch on my CMake's
github clone that should fix the issue without breaking cmake's test
suite. Although it seems to works for your case, I'm not sure it is
the right way to fix this issue. I think you should open a ticket on
the bug tracker.

The branch: https://github.com/polrop/CMake/commits/ninja-clean-lib-symlink
The patch: 
https://github.com/polrop/CMake/commit/7d9c4bec56e8ec34ac715a4e4bda0f0f55002ef0

Peter could you review it please?

Thanks,
-Nico

On Sun, Apr 1, 2012 at 7:42 AM, Clifford Yapp  wrote:
> Trying to run the clean target with the Ninja generator in the latest CMake,
> I noticed that on targets with version properties set like (say):
>
> set_target_properties(libbu PROPERTIES VERSION 19.0.1 SOVERSION 19)
>
> the ninja -t clean command does not remove the libbu.so.19 link.
>
> Has anyone else seen this issue?
>
> Cheers,
> CY
>
> --
>
> 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



-- 
Nicolas Desprès
--

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.8-rc1, Ninja generator, and clean target

2012-04-07 Thread Clifford Yapp
On Mon, Apr 2, 2012 at 8:21 AM, Nicolas Desprès
wrote:

> Hi,
>
> It looks like an issue in the generator. The symlink is created as a
> side effect of a rule and not mentioned in the output files. That's
> why it does not get removed. I have pushed a patch on my CMake's
> github clone that should fix the issue without breaking cmake's test
> suite.


My machine is out of commission at the moment, but I'll give it a try as
soon as I can.  It would be nice to have this fix in 2.8.8, but I notice
rc2 doesn't seem to have it?


> Although it seems to works for your case, I'm not sure it is
> the right way to fix this issue. I think you should open a ticket on
> the bug tracker.
>

I'll try to once my machine is back up... one other thing I notice with
ninja -t clean - it doesn't seem to be removing files added to the
ADDITIONAL_MAKE_CLEAN_FILES directory property.  Is this variable make
specific, and if so is there a generic variable I can use instead to tell
ALL build tools to clean the file(s) in question?

Thanks,
CY
--

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.8-rc1, Ninja generator, and clean target

2012-05-16 Thread Peter Collingbourne
On Mon, Apr 02, 2012 at 02:21:10PM +0200, Nicolas Desprès wrote:
> Hi,
> 
> It looks like an issue in the generator. The symlink is created as a
> side effect of a rule and not mentioned in the output files. That's
> why it does not get removed. I have pushed a patch on my CMake's
> github clone that should fix the issue without breaking cmake's test
> suite. Although it seems to works for your case, I'm not sure it is
> the right way to fix this issue. I think you should open a ticket on
> the bug tracker.
> 
> The branch: https://github.com/polrop/CMake/commits/ninja-clean-lib-symlink
> The patch: 
> https://github.com/polrop/CMake/commit/7d9c4bec56e8ec34ac715a4e4bda0f0f55002ef0
> 
> Peter could you review it please?

Apologies for the slow response.

Perhaps I am being over cautious, but should this conditional:

  if (targetOutputReal == soName) {

read:

  if (targetOutput == soName || targetOutputReal == soName) {

Otherwise, LGTM.

Thanks,
-- 
Peter
--

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.8-rc1, Ninja generator, and clean target

2012-05-18 Thread Nicolas Desprès
On Wed, May 16, 2012 at 11:54 PM, Peter Collingbourne  wrote:
> On Mon, Apr 02, 2012 at 02:21:10PM +0200, Nicolas Desprès wrote:
>> Hi,
>>
>> It looks like an issue in the generator. The symlink is created as a
>> side effect of a rule and not mentioned in the output files. That's
>> why it does not get removed. I have pushed a patch on my CMake's
>> github clone that should fix the issue without breaking cmake's test
>> suite. Although it seems to works for your case, I'm not sure it is
>> the right way to fix this issue. I think you should open a ticket on
>> the bug tracker.
>>
>> The branch: https://github.com/polrop/CMake/commits/ninja-clean-lib-symlink
>> The patch: 
>> https://github.com/polrop/CMake/commit/7d9c4bec56e8ec34ac715a4e4bda0f0f55002ef0
>>
>> Peter could you review it please?
>
> Apologies for the slow response.

No problem.

>
> Perhaps I am being over cautious, but should this conditional:
>
>  if (targetOutputReal == soName) {
>
> read:
>
>  if (targetOutput == soName || targetOutputReal == soName) {
>
> Otherwise, LGTM.

I think you are right according to:

int cmake::SymlinkLibrary(std::vector& args)
{
  int result = 0;
  std::string realName = args[2];
  std::string soName = args[3];
  std::string name = args[4];
  if(soName != realName)
{
if(!cmake::SymlinkInternal(realName, soName))
  {
  cmSystemTools::ReportLastSystemError("cmake_symlink_library");
  result = 1;
  }
}
  if(name != soName)
{
if(!cmake::SymlinkInternal(soName, name))
  {
  cmSystemTools::ReportLastSystemError("cmake_symlink_library");
  result = 1;
  }
}
  return result;
}


I have amended the patch, rebased it on master and pushed it.

Thanks,
-Nico
--

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