Bug 336604 - target property RUNTIME_OUTPUT_DIRECTORY is not recognized by unit test view
Summary: target property RUNTIME_OUTPUT_DIRECTORY is not recognized by unit test view
Status: RESOLVED WORKSFORME
Alias: None
Product: kdevelop
Classification: Applications
Component: Build tools: CMake (other bugs)
Version First Reported In: 4.6.60
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdevelop-bugs-null
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-23 08:00 UTC by Torbjörn K.
Modified: 2022-12-10 05:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjörn K. 2014-06-23 08:00:03 UTC
When I explicitly set the CMake target property RUNTIME_OUTPUT_DIRECTORY for a unit test, the unit test view/plugin does not find the executable and tries to find it in $CMAKE_BINARY_DIR.

In my CMakeLists.txt

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${my_project_SOURCE_DIRECTORY}/dist/bin")
# setting up the test
set_target_properties(test-my_test
    PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tests
)
add_test(NAME test-my_test
    COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/tests/test-my_test --gtest_output=xml:test-my_test_out.xml
)

When running `make test` in the build directory manually:

Running tests...
/usr/bin/ctest --force-new-ctest-process 
Test project /home/USER/projects/my_project/build
    Start 1: test-my_test
1/1 Test #1: test-my_test ..................   Passed    0.00 sec

100% tests passed, 0 tests failed out of 1

Total Test time (real) =   0.01 sec


When running/clicking on the unit test in the unit test view I get a Process Error with "*** Could not start program '/home/USER/projects/my_project/build/tests/test-my_test --gtest_output=xml:test-my_test_out.xml'. Make sure that the path is specified correctly ***"
Comment 1 Jeremy W. Murphy 2017-12-14 07:53:12 UTC
I'm experiencing this issue in 5.2.1 and it is quite annoying.
Any thoughts on whether it would be a simple or difficult fix?
It's not just unit tests but executable targets in general.
Comment 2 Justin Zobel 2022-11-10 22:32:33 UTC
Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version?

If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you!
Comment 3 Bug Janitor Service 2022-11-25 05:15:50 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 4 Bug Janitor Service 2022-12-10 05:13:08 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!