MantisBT - CMake
View Issue Details
0012033CMakeCTestpublic2011-03-31 09:452011-03-31 11:12
Patrick Spendrin 
Brad King 
normalminoralways
closedno change required 
WindowsWindows 7
CMake 2.8.4 
 
0012033: CMAKE_RUNTIME_OUTPUT_DIRECTORY ignored in the add_test() command.
see bug 9464 for description: I couldn't reopen the bug, so I'll add my findings here:
Output got with the attached test file:
Test project R:/tmp/cmake_bug_9464/build
    Start 1: myfirsttest
Could not find executable myfirsttest
Looked in the following places:
myfirsttest
myfirsttest.exe
Release/myfirsttest
Release/myfirsttest.exe
Debug/myfirsttest
Debug/myfirsttest.exe
MinSizeRel/myfirsttest
MinSizeRel/myfirsttest.exe
RelWithDebInfo/myfirsttest
RelWithDebInfo/myfirsttest.exe
Deployment/myfirsttest
Deployment/myfirsttest.exe
Development/myfirsttest
Development/myfirsttest.exe
Unable to find executable: myfirsttest
1/1 Test #1: myfirsttest ......................***Not Run 0.00 sec

0% tests passed, 1 tests failed out of 1

Total Test time (real) = 2.30 sec

The following tests FAILED:
          1 - myfirsttest (Not Run)
Errors while running CTest
on attached file:
mkdir build && cd build
cmake .. -G "NMake Makefiles" && nmake && nmake test
No tags attached.
txt CMakeLists.txt (291) 2011-03-31 09:45
https://public.kitware.com/Bug/file/3791/CMakeLists.txt
Issue History
2011-03-31 09:45Patrick SpendrinNew Issue
2011-03-31 09:45Patrick SpendrinFile Added: CMakeLists.txt
2011-03-31 11:12Brad KingNote Added: 0025984
2011-03-31 11:12Brad KingStatusnew => closed
2011-03-31 11:12Brad KingAssigned To => Brad King
2011-03-31 11:12Brad KingResolutionopen => no change required

Notes
(0025984)
Brad King   
2011-03-31 11:12   
See command documentation here:

  http://www.cmake.org/cmake/help/cmake-2-8-docs.html#command:add_test [^]

The raw add_test() command takes your commands verbatim. The add_test(NAME) signature handles the target names:

  add_test(NAME myfirsttest COMMAND myfirsttest)