Visual Studio allows the build configuration to be set at *build* time,
and it does not make use of CMAKE_BUILD_TYPE. As a result, the location
of the FileCheck/not executables, which lit's test suite depends upon,
is not known until build time. To inform lit's test suite of where to
find these executables, pass --build_configuration as a --param.
This fixes a test failure when running the lit test suite via Visual
Studio.
Test plan:
On a Windows development environment with Visual Studio installed, run
the following and verify that it succeeds:
cmake \ C:\Users\modocache\Source\llvm\llvm \ -G "Visual Studio 14 2015" \ -DCMAKE_INSTALL_PREFIX=C:\Users\modocache\Source\llvm\install cmake \ --build C:\Users\modocache\Source\llvm\build \ --target check-lit \ --config Debug
add_lit_target in AddLLVM.cmake already appends "--param build_mode=${CMAKE_CFG_INTDIR}" to the lit args so you should be able to just make use of that param rather than adding a new one.