CMake 2.6 issue with current Avogadro

Moin folks.

KitWare released rc6 of CMake 2.6 which is supposed to be usable. KDE will
move to it after KDE 4.1 as far as I know, but the KDE devs are encouraged to
update from 2.4.x.

So did I and ran into the issue attached. Shortversion:

[ 7%] Generating ui_bsdysettingswidget.h
/home/kde-devel/kde/src/avo-git/libavogadro/src/engines/bsdyengine.h:117:
Error: Undefined interface
make[2]: *** [libavogadro/src/bsdyengine.moc] Error 1

Currently I have no time to have a closer look, I just wanted to inform the
list.

Carsten

Moin again.

And for those without CMake 2.6 I ran the command. I hope you can make sense
out of it, my CMake-foo is to small for this one.

Carsten

kde-devel@moinmoin:~/kde/build/avo-git> cmake --help-policy CMP0002
cmake version 2.6-patch 0 RC-6

CMP0002
Logical target names must be globally unique.

   Targets names created with add_executable, add_library, or
   add_custom_target are logical build target names.  Logical target
   names must be globally unique because:

     - Unique names may be referenced unambiguously both in CMake
       code and on make tool command lines.
     - Logical names are used by Xcode and VS IDE generators
       to produce meaningful project names for the targets.

   The logical name of executable and library targets does not have to
   correspond to the physical file names built.  Consider using the
   OUTPUT_NAME target property to create two targets with the same
   physical name while keeping logical names distinct.  Custom targets
   must simply have globally unique names (unless one uses the global
   property ALLOW_DUPLICATE_CUSTOM_TARGETS with a Makefiles generator).

   This policy was introduced in CMake version 2.6.0.  CMake version 2.6
   warns when the policy is not set and uses OLD behavior.  Use the
   cmake_policy command to set it to OLD or NEW explicitly.

On Tuesday 08 April 2008 13:27:47 Carsten Niehaus wrote:

Moin folks.

KitWare released rc6 of CMake 2.6 which is supposed to be usable. KDE will
move to it after KDE 4.1 as far as I know, but the KDE devs are encouraged
to update from 2.4.x.

So did I and ran into the issue attached. Shortversion:

[ 7%] Generating ui_bsdysettingswidget.h
/home/kde-devel/kde/src/avo-git/libavogadro/src/engines/bsdyengine.h:117:
Error: Undefined interface
make[2]: *** [libavogadro/src/bsdyengine.moc] Error 1

Currently I have no time to have a closer look, I just wanted to inform the
list.

I think I spotted the moc error - I called automoc twice for bsdyengine by
mistake. I removed the extra call and hopefully all is well now. I didn’t hit
this so please confirm if this fixes the issue.

The other issue I will try to look at soon. I will see about upgrading cmake
myself so that I can check it out.