Enable compilation and runnning of mtests on Windows with MSVC
This is a placeholder issue to discuss the work needed for enabling the use of mtests under Windows with MSVC.
At the moment mtests can be compiled and run under Linux (see CI Travis example for the source code).
It was possible to compile and run mtests under MacOS and under Windows with MinGW, but I don't know the state of these (i.e. if they still compile fine and successfully run).
Since the main compiler under Windows has become MSVC (since some time) and a lot of (new) developers use this compiler, it would be very useful to be able to locally check the results of mtests also for this compiler.
I tried an initial work to port the mtests to MSVC.
The results at the moment can be seen here:
I used MSVC 2017 and command line (i.e. no Visual Studio interface) to compile them.
Here are the steps:
- Compile MuseScore for Windows (I used Debug version, and I used the msvc_build.bat script) and install it (e.g. to its default location MuseScore\msvc.install_x64
cmake --build .
cmake --build . --target INSTALL
- add the binary dir to the PATH, e.g.
- add the folder where diff.exe for Windows is located (for example msys2/usr/bin if msys2 is installed) to the PATH
- run the tests with