add_test failed to run cmd.exe
cmake_minimum_required(VERSION 3.23)
project(Test)
enable_testing()
add_test(CMD cmd.exe /?)
Run ctest --verbose
, the output does not match cmd.exe /?
, but actually md.exe /?
.
test 1
Start 1: CMD
1: Test command: C:\Windows\System32\cmd.exe "/?"
1: Test timeout computed to be: 10000000
1: Creates a directory.
1:
1: MKDIR [drive:]path
1: MD [drive:]path
1:
1: If Command Extensions are enabled MKDIR changes as follows:
1:
1: MKDIR creates any intermediate directories in the path, if needed.
1: For example, assume \a does not exist then:
1:
1: mkdir \a\b\c\d
1:
1: is the same as:
1:
1: mkdir \a
1: chdir \a
1: mkdir b
1: chdir b
1: mkdir c
1: chdir c
1: mkdir d
1:
1: which is what you would have to type if extensions were disabled.
1/1 Test #1: CMD ..............................***Failed 0.06 sec