[CMake] Using ${CMAKE_CFG_INTDIR} in ADD_TEST property WORKING_DIRECTORY

Rolf Eike Beer eike at sf-mail.de
Thu Jul 5 02:53:20 EDT 2012


Guillaume Blanc wrote:
> Some tests that I run need to access files (using a relative path) that are
> located in the same directory as the test executable itself. So I'm trying
> to use ADD_TEST property WORKING_DIRECTORY in the following way:
> 
> ADD_TEST(
>   NAME mytest
>   WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}
>   COMMAND myexec)

WORKING_DIRECTORY $<TARGET_FILE_DIR:mytest>

Eike
-- 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120705/5b101204/attachment-0001.pgp>


More information about the CMake mailing list