EXECUTABLE_OUTPUT_PATH for tests

Alexander Neundorf neundorf at kde.org
Thu Sep 20 00:40:16 CEST 2007


Hi,

currently KDE4_ADD_TEST_EXECUTABLE and KDE4_ADD_UNIT_TEST set 
EXECUTABLE_OUTPUT_PATH back from bin/ to the current directory.

I think this is a bad idea in general.

Imagine this cmake code:

add_executable(foo main.cpp)
add_executable(bar bar.c)

 
As it is now both foo and bar will end up in bin/.
Now somebody adds a test executable:

add_executable(foo main.cpp)
kde4_add_test_executable(test1 test.cpp)
add_executable(bar bar.c)


Now foo and bar will no longer be created in bin/, but in the current 
directory.
It is very unobvious why this happens.

If there are no really good reasons for this behaviour I am very much in 
favour of removing the modification of EXECUTABLE_OUTPUT_PATH in the 
KDE4_ADD_TEST_EXECUTABLE (which will be part of KDE4_ADD_EXECUTABLE next 
week) and also from KDE4_ADD_UNIT_TEST.

Alex


More information about the Kde-buildsystem mailing list