[CMake] Potential bug to set a working directory for test
Martin Weber
m.weber at razorcat.com
Thu Apr 4 08:53:43 EDT 2013
Am 27.03.2013 17:57, schrieb Klaim - Joël Lamotte:
> Hi,
>
> I'm using CMake 2.10.2 the VS2012(VC11) generator.
> I summed-up my problem in the last paragraph.
>
> I'm trying to do this:
>
> add_test(
> NAME ${TEST_PROJECT_NAME}
> WORKING_DIRECTORY ${TEST_WORKING_DIR}
> COMMAND ${TEST_PROJECT_NAME}
> )
[...]
> Unfortunately this cannot work as with the current generator the
> ${TEST_PROJECT_NAME} is converted to a windows-specific path which is the
> relative path from the CMakeLists.txt file.
> So the generated commands are something like
>
> cd E:/projects/myprojects/final/Debug
If your binary dir resides on a different drive than E:, the generated
command will not work. Remember, cd on windows does not change the drive.
The generated command should be
cd /D E:/projects...
I think it's a bug.
Martin
More information about the CMake
mailing list