Cmake integration

We are using CMake with Visual Studio 2017 for C/C++ based source code. We would like to integrate SonarQube Static code analyzer so that it executes every time the build is run in Visual Studio. What is the best way to achieve this? We tried setting “build-wrapper-win-x86-64.exe --out-dir build_wrapper_output_directory cl.exe” to the cmake CMAKE_CXX_COMPILER & CMAKE_C_COMPILER but that approach did not work as these 2 variables only takes complier exectuable. Is there a CMake variable that allows to set the build wrapper exectuable and the build wrapper output directory? If not, is there a way to integrate the SonarQube directly with Visual Studio 2017 to invoke code scan on build automatically. If anyone has successfully done this integration we would like to hear from you. Thank you!