[Kmymoney-devel] cmake errors
Alvaro Soliverez
asoliverez at gmail.com
Wed May 19 19:29:52 CEST 2010
On Wed, May 19, 2010 at 1:43 PM, Jack <ostroffjh at users.sourceforge.net> wrote:
> On 2010.05.19 10:40, David Houlden wrote:
>> OK. I've been investigating a bit more. These errors only occur if I
>> use the CMakeLists.txt which I get from running createtarball.rb. I
>> do this so I can build kmymoney from source with all the
>> documentation. I'm just following the instructions to do this which
>> Alvaro posted here back in March. Should I be doing something
>> different since the release of 3.98?
>>
>> On Tuesday 18 May 2010 David Houlden wrote:
>> > Hi,
>> >
>>> I have been building the svn version for a very long time with few
>>> problems but tonight I did an svn update to 1128271 and then got
>>> errors when running cmake .. in my build directory. Here are some of
>>> the errors.
>> >
>> > CMake Error at /usr/share/apps/cmake/modules/FindGettext.cmake:229
>> > (ADD_CUSTOM_TARGET):
>> > add_custom_target cannot create target "pofiles" because another
>> target
>> > with the same name already exists. The existing target is a
>> custom
>> > target created in source directory
>> > "/usr/local/src/extras/kmymoney-svn-kde4/kmymoney/po/bg". See
>> > documentation for policy CMP0002 for more details.
>> > Call Stack (most recent call first):
>> > po/ca/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES)
>
> OK. This is indeed strange. I did a complete successful compile from
> createtarball two days ago. I tried it again today, and get those same
> errors - one for each directory under .../kmymoney-3.98.0/po except the
> first (bg).
>
> However - line 5 in kmymoney-3.98.0/CMakeLists.txt changed from
> "CMAKE_MINIMUM_REQUIRED(VERSION 2.6)" as of two days ago to
> "CMAKE_MINIMUM_REQUIRED(VERSION 2.6.4)" today. The only other changes
> are some new png files in the doc directory and differences in the
> kmymoney.po files for pt, pt_BR, sk, sv, and uk. If I change the 2.6.4
> to 2.6, then cmake succeeds.
>
> Why did this change, and why would it change the behavior? Is it
> telling gettext to apply a different policy regarding the apparent
> duplicate target?
can you try adding this to the main CMakeLists.txt?
set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS 1)
I'm trying it here, and it seems to work with CMake 2.6.4
More information about the KMyMoney-devel
mailing list