CMake, CTest, and AVOGADRO_PLUGIN

On Fri, May 28, 2010 at 10:21 AM, Konstantin Tokarev annulen@yandex.ru wrote:

I copied avogadro_plugin into my CMakeLists.txt and changed MODULE to
SHARED, ran all the extension sources through it, then linked the
plugin target to the test target – works a treat!

I don’t understand, why this thing matters - nothing could be linked to module, but (AFAIK) module could be linked to everything you want…

From what I’ve seen, it’s the other way around – other targets can be
linked to module,

target_link_library(ModuleTarget LibraryTarget) is ok

but the module can’t be linked to a library:

target_link_library(LibraryTarget ModuleTarget) gives CMake errors.

Dave

28.05.10, 18:25, “David Lonie” loniedavid@gmail.com:

On Fri, May 28, 2010 at 10:21 AM, Konstantin Tokarev wrote:

I copied avogadro_plugin into my CMakeLists.txt and changed MODULE to
SHARED, ran all the extension sources through it, then linked the
plugin target to the test target – works a treat!

I don’t understand, why this thing matters - nothing could be linked to module, but (AFAIK) module could be linked to everything you want…

From what I’ve seen, it’s the other way around – other targets can be
linked to module,

target_link_library(ModuleTarget LibraryTarget) is ok

but the module can’t be linked to a library:

target_link_library(LibraryTarget ModuleTarget) gives CMake errors.

out of curiosity: why do you need it? IIRC, you wanted to link static library into module and into test


Regards,
Konstantin

Здесь спама нет http://mail.yandex.ru/nospam/sign

2010/5/28 Konstantin Tokarev annulen@yandex.ru:

target_link_library(ModuleTarget LibraryTarget) is ok

but the module can’t be linked to a library:

target_link_library(LibraryTarget ModuleTarget) gives CMake errors.

out of curiosity: why do you need it? IIRC, you wanted to link static library into module and into test

This way I can just build the extension and link it directly to the
test. The tests need all of the code in the extension, so the other
way seemed too convoluted.

Dave