OCL Compilation Problem related to the uninstall target
Submitted by peter on Thu, 2011-02-03 15:00 |
On Thu, Feb 3, 2011 at 12:44 PM, Charles Lesire-Cabaniols
<Charles [dot] Lesire [..] ...> wrote:
> Hi guys,
>
> I am facing errors while installing OCL from the master branch (using
> autoproj).
> I have CMake 2.8.2.
>
> The problem is that the 'uninstall' target is defined several times in the
> CMake build logic. It comes from the fact that each subpart of OCL is built
> by the 'orocos_generate_package' macro, which tries to define the uninstall
> target. I join the build log.
>
> I installed correctly toolchain-2.2, so I guess this issue is only present
> in the master branch.
>
> The (ugly) way I have solved this is by adding a
> CMAKE_POLICY(SET CMP0002 OLD)
> to the OCL CMake file.
>
> The good way is probably by removing the definition of the uninstall target
> in the 'orocos_generate_package' macro, and have people explicitly call
> 'orocos_uninstall_target' only once in the build logic.
>
> If there is no objection, I can try to propose a patch for this issue.
It's OCL not nicely using the 'orocos_generate_package' macro. It
wants to generate multiple .pc files instead of one (normally it's one
.pc file per package). I think it's better to extend this macro to
detect if the uninstall target was already set, and skip setting it if
so, using a helper variable ORO_UNINSTALL_SET or so.
I don't want the users to write down this boilerplate code again in
each CMakeLists.txt file, that's why all the housekeeping is done
within orocos_generate_package.
Peter
OCL Compilation Problem related to the uninstall target
On 03/02/2011 15:59, Peter Soetens wrote:
> On Thu, Feb 3, 2011 at 12:44 PM, Charles Lesire-Cabaniols
> <Charles [dot] Lesire [..] ...> wrote:
>> Hi guys,
>>
>> I am facing errors while installing OCL from the master branch (using
>> autoproj).
>> I have CMake 2.8.2.
>>
>> The problem is that the 'uninstall' target is defined several times in the
>> CMake build logic. It comes from the fact that each subpart of OCL is built
>> by the 'orocos_generate_package' macro, which tries to define the uninstall
>> target. I join the build log.
>>
>> I installed correctly toolchain-2.2, so I guess this issue is only present
>> in the master branch.
>>
>> The (ugly) way I have solved this is by adding a
>> CMAKE_POLICY(SET CMP0002 OLD)
>> to the OCL CMake file.
>>
>> The good way is probably by removing the definition of the uninstall target
>> in the 'orocos_generate_package' macro, and have people explicitly call
>> 'orocos_uninstall_target' only once in the build logic.
>>
>> If there is no objection, I can try to propose a patch for this issue.
> It's OCL not nicely using the 'orocos_generate_package' macro. It
> wants to generate multiple .pc files instead of one (normally it's one
> .pc file per package). I think it's better to extend this macro to
> detect if the uninstall target was already set, and skip setting it if
> so, using a helper variable ORO_UNINSTALL_SET or so.
Ok. I can try to modify that, but I am quite busy tomorrow and Monday,
so I will probably not propose a merge before next Tuesday.
Do you want me to look at it, or are you too hurry?
> I don't want the users to write down this boilerplate code again in
> each CMakeLists.txt file, that's why all the housekeeping is done
> within orocos_generate_package.
>
> Peter
OCL Compilation Problem related to the uninstall target
On 03/02/2011 15:59, Peter Soetens wrote:
> On Thu, Feb 3, 2011 at 12:44 PM, Charles Lesire-Cabaniols
> <Charles [dot] Lesire [..] ...> wrote:
>> Hi guys,
>>
>> I am facing errors while installing OCL from the master branch (using
>> autoproj).
>> I have CMake 2.8.2.
>>
>> The problem is that the 'uninstall' target is defined several times in the
>> CMake build logic. It comes from the fact that each subpart of OCL is built
>> by the 'orocos_generate_package' macro, which tries to define the uninstall
>> target. I join the build log.
>>
>> I installed correctly toolchain-2.2, so I guess this issue is only present
>> in the master branch.
>>
>> The (ugly) way I have solved this is by adding a
>> CMAKE_POLICY(SET CMP0002 OLD)
>> to the OCL CMake file.
>>
>> The good way is probably by removing the definition of the uninstall target
>> in the 'orocos_generate_package' macro, and have people explicitly call
>> 'orocos_uninstall_target' only once in the build logic.
>>
>> If there is no objection, I can try to propose a patch for this issue.
> It's OCL not nicely using the 'orocos_generate_package' macro. It
> wants to generate multiple .pc files instead of one (normally it's one
> .pc file per package). I think it's better to extend this macro to
> detect if the uninstall target was already set, and skip setting it if
> so, using a helper variable ORO_UNINSTALL_SET or so.
Ok. I can try to modify that, but I am quite busy tomorrow and Monday,
so I will probably not propose a merge before next Tuesday.
Do you want me to look at it, or are you too hurry?
> I don't want the users to write down this boilerplate code again in
> each CMakeLists.txt file, that's why all the housekeeping is done
> within orocos_generate_package.
>
> Peter
OCL Compilation Problem related to the uninstall target
On Thu, Feb 3, 2011 at 4:03 PM, Charles Lesire-Cabaniols <
Charles [dot] Lesire [..] ...> wrote:
> On 03/02/2011 15:59, Peter Soetens wrote:
> > On Thu, Feb 3, 2011 at 12:44 PM, Charles Lesire-Cabaniols
> > <Charles [dot] Lesire [..] ...> wrote:
> >> Hi guys,
> >>
> >> I am facing errors while installing OCL from the master branch (using
> >> autoproj).
> >> I have CMake 2.8.2.
> >>
> >> The problem is that the 'uninstall' target is defined several times in
> the
> >> CMake build logic. It comes from the fact that each subpart of OCL is
> built
> >> by the 'orocos_generate_package' macro, which tries to define the
> uninstall
> >> target. I join the build log.
> >>
> >> I installed correctly toolchain-2.2, so I guess this issue is only
> present
> >> in the master branch.
> >>
> >> The (ugly) way I have solved this is by adding a
> >> CMAKE_POLICY(SET CMP0002 OLD)
> >> to the OCL CMake file.
> >>
> >> The good way is probably by removing the definition of the uninstall
> target
> >> in the 'orocos_generate_package' macro, and have people explicitly call
> >> 'orocos_uninstall_target' only once in the build logic.
> >>
> >> If there is no objection, I can try to propose a patch for this issue.
> > It's OCL not nicely using the 'orocos_generate_package' macro. It
> > wants to generate multiple .pc files instead of one (normally it's one
> > .pc file per package). I think it's better to extend this macro to
> > detect if the uninstall target was already set, and skip setting it if
> > so, using a helper variable ORO_UNINSTALL_SET or so.
>
You can check the existence of a target in cmake using the TARGET signature
of the if command:
if(TARGET target-name)
Adolfo
> Ok. I can try to modify that, but I am quite busy tomorrow and Monday,
> so I will probably not propose a merge before next Tuesday.
> Do you want me to look at it, or are you too hurry?
>
> > I don't want the users to write down this boilerplate code again in
> > each CMakeLists.txt file, that's why all the housekeeping is done
> > within orocos_generate_package.
> >
> > Peter
>
> --
> Orocos-Dev mailing list
> Orocos-Dev [..] ...
> http://lists.mech.kuleuven.be/mailman/listinfo/orocos-dev
>
OCL Compilation Problem related to the uninstall target
On Thursday 03 February 2011 16:30:35 Adolfo Rodríguez Tsouroukdissian wrote:
> On Thu, Feb 3, 2011 at 4:03 PM, Charles Lesire-Cabaniols <
>
> Charles [dot] Lesire [..] ...> wrote:
> > On 03/02/2011 15:59, Peter Soetens wrote:
> > > On Thu, Feb 3, 2011 at 12:44 PM, Charles Lesire-Cabaniols
> > >
> > > <Charles [dot] Lesire [..] ...> wrote:
> > >> Hi guys,
> > >>
> > >> I am facing errors while installing OCL from the master branch (using
> > >> autoproj).
> > >> I have CMake 2.8.2.
> > >>
> > >> The problem is that the 'uninstall' target is defined several times in
> >
> > the
> >
> > >> CMake build logic. It comes from the fact that each subpart of OCL is
> >
> > built
> >
> > >> by the 'orocos_generate_package' macro, which tries to define the
> >
> > uninstall
> >
> > >> target. I join the build log.
> > >>
> > >> I installed correctly toolchain-2.2, so I guess this issue is only
> >
> > present
> >
> > >> in the master branch.
> > >>
> > >> The (ugly) way I have solved this is by adding a
> > >> CMAKE_POLICY(SET CMP0002 OLD)
> > >> to the OCL CMake file.
> > >>
> > >> The good way is probably by removing the definition of the uninstall
> >
> > target
> >
> > >> in the 'orocos_generate_package' macro, and have people explicitly
> > >> call 'orocos_uninstall_target' only once in the build logic.
> > >>
> > >> If there is no objection, I can try to propose a patch for this issue.
> > >
> > > It's OCL not nicely using the 'orocos_generate_package' macro. It
> > > wants to generate multiple .pc files instead of one (normally it's one
> > > .pc file per package). I think it's better to extend this macro to
> > > detect if the uninstall target was already set, and skip setting it if
> > > so, using a helper variable ORO_UNINSTALL_SET or so.
>
> You can check the existence of a target in cmake using the TARGET signature
> of the if command:
>
> if(TARGET target-name)
Thanks Adolfo, that will probably do it. I pushed this fix to master.
Peter