Details
-
Bug
-
Resolution: Out of scope
-
P3: Somewhat important
-
None
-
5.15.7
-
MSVC 2019 x64, Win 10, Cmake
Description
Test library seems to add a definition QT_TESTCASE_BUILDDIR using compiler option -D and the value is the path to the build directory. However, if there are any percent sign characters in the path those get passed unmodified directly to the compiler potentially causing the build to fail with an error:
cl : Command line error D8038 : invalid argument 'QT_TESTCASE_BUILDDIR="C:/test_dir/foo%2bar/build"'
According to MS docs at https://docs.microsoft.com/en-us/cpp/build/reference/d-preprocessor-definitions?view=msvc-160#remarks percent sign should be written as %% when passing it to the compiler with -D.
Steps to reproduce the problem:
- Build the attached project in a directory called "foo%2bar"