Error in download_test_data.vcxproj when compiling with Visual Studio 2019 16.7.7 Professional msbuild on Windows 10 2004 Professional #2594
Labels
kind: bug
platform: visual studio
related to MSVC
solution: proposed fix
a fix for the issue has been proposed and waits for confirmation
I get the following error in the CustomBuild step of test\download_test_data.vcxproj when compiling with Visual Studio 2019 16.7.7 Professional msbuild on Windows 10 2004 Professional:
CustomBuild:
Downloading test data from https://github.com/nlohmann/json_test_data (v3.0.0)
Der Befehl "test" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Building Custom Rule ./test/CMakeLists.txt
The Command "test" is not found, because it does not exist on Windows.
"test -d json_test_data" is found in the CustomBuild step of the test\download_test_data.vcxproj project.
The problem is located in download_test_data.cmake "COMMAND test -d json_test_data || ...",
here "COMMAND if not exist json_test_data ..." should be used on Windows.
Please describe the steps to reproduce the issue.
What is the expected behavior?
No error.
And what is the actual behavior instead?
Step 6:
CustomBuild:
Downloading test data from https://github.com/nlohmann/json_test_data (v3.0.0)
Der Befehl "test" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
Building Custom Rule ./test/CMakeLists.txt
Step 7:
CustomBuild:
Downloading test data from https://github.com/nlohmann/json_test_data (v3.0.0)
Der Befehl "test" ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
fatal: destination path 'json_test_data' already exists and is not an empty directory.
c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(234,5): error MSB6006: "cmd.exe" wurde mit dem Code 128 beendet. [build\test\download_test_data.vcxproj]
Which compiler and operating system are you using?
Which version of the library did you use?
If you experience a compilation error: can you compile and run the unit tests?
did not work, there is mising a -C in the command
would do the job, but an error is reported about json_test_data.
After deleting the json_test_data folder and executing
it works.
Is also works without deleting the folder when "if exist" is used instead of "test" as reported on top of this post.
Total Test time (real) = 381.65 sec
The following tests FAILED:
51 - cmake_import_configure (Failed)
52 - cmake_import_build (Not Run)
53 - cmake_import_minver_configure (Failed)
54 - cmake_import_minver_build (Not Run)
57 - cmake_fetch_content_configure (Failed)
58 - cmake_fetch_content_build (Not Run)
Errors while running CTest
The text was updated successfully, but these errors were encountered: