MINIFICPP-1310 Fix the CMakeSettings.json file used by Visual Studio

* Change build type to 32-bit RelWithDebInfo
* Copy all the variable settings from win_build_vs.bat
* Set up the search path for mc.exe correctly (mixing individual items and lists doesn't work)
* Update Windows.md

MINIFICPP-1310 Change STRICT_GSL_CHECKS to ON

Signed-off-by: Arpad Boda <aboda@apache.org>

This closes #854
diff --git a/CMakeSettings.json b/CMakeSettings.json
index 96f2694..4ce388e 100644
--- a/CMakeSettings.json
+++ b/CMakeSettings.json
@@ -2,41 +2,45 @@
   // See https://go.microsoft.com//fwlink//?linkid=834763 for more information about this file.
   "configurations": [
     {
-      "name": "x64-Release",
-      "generator": "Visual Studio 15 2017 Win64",
+      "name": "x86-RelWithDebInfo",
+      "generator": "Visual Studio 15 2017",
       "configurationType": "RelWithDebInfo",
-      "inheritEnvironments": [ "msvc_x64_x64" ],
+      "inheritEnvironments": [ "msvc_x86" ],
       "buildRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\build\\${name}",
       "installRoot": "${env.USERPROFILE}\\CMakeBuilds\\${workspaceHash}\\install\\${name}",
       "cmakeCommandArgs": "",
-      "buildCommandArgs": "-m -v:minimal",
+      "buildCommandArgs": "",
       "variables": [
         {
+          "name": "INSTALLER_MERGE_MODULES",
+          "value": "OFF"
+        },
+        {
+          "name": "ENABLE_SQL",
+          "value": "OFF"
+        },
+        {
+          "name": "CMAKE_BUILD_TYPE_INIT",
+          "value": "RelWithDebInfo"
+        },
+        {
+          "name": "WIN32",
+          "value": "WIN32"
+        },
+        {
+          "name": "ENABLE_LIBRDKAFKA",
+          "value": "OFF"
+        },
+        {
+          "name": "ENABLE_JNI",
+          "value": "OFF"
+        },
+        {
           "name": "OPENSSL_OFF",
           "value": "OFF"
         },
         {
-          "name": "CMAKE_BUILD_TYPE",
-          "value": "RelWithDebInfo"
-        },
-        {
-          "name": "USE_SYSTEM_OPENSSL",
-          "value": "OFF"
-        },
-        {
-          "name": "PORTABLE",
-          "value": "ON"
-        },
-        {
-          "name": "USE_SYSTEM_ZLIB",
-          "value": "OFF"
-        },
-        {
-          "name": "DISABLE_CONTROLLER",
-          "value": "TRUE"
-        },
-        {
-          "name": "USE_SYSTEM_UUID",
+          "name": "ENABLE_COAP",
           "value": "OFF"
         },
         {
@@ -44,55 +48,51 @@
           "value": "OFF"
         },
         {
+          "name": "DISABLE_CONTROLLER",
+          "value": "ON"
+        },
+        {
+          "name": "BUILD_ROCKSDB",
+          "value": "ON"
+        },
+        {
           "name": "FORCE_WINDOWS",
           "value": "ON"
         },
         {
-          "name": "DISABLE_ROCKSDB",
-          "value": "FALSE"
+          "name": "USE_SYSTEM_UUID",
+          "value": "OFF"
         },
         {
-          "name": "FAIL_ON_WARNINGS",
+          "name": "DISABLE_LIBARCHIVE",
           "value": "OFF"
         },
         {
+          "name": "DISABLE_SCRIPTING",
+          "value": "ON"
+        },
+        {
+          "name": "EXCLUDE_BOOST",
+          "value": "ON"
+        },
+        {
           "name": "ENABLE_WEL",
           "value": "TRUE"
         },
         {
-          "name": "ENABLE_SQL",
-          "value": "TRUE"
-        },
-        {
-          "name": "ENABLE_LIBRDKAFKA",
+          "name": "FAIL_ON_WARNINGS",
           "value": "OFF"
         },
         {
-          "name": "DISABLE_CURL",
+          "name": "SKIP_TESTS",
           "value": "OFF"
         },
         {
-          "name": "FORCE_WINDOWS",
+          "name": "STRICT_GSL_CHECKS",
           "value": "ON"
-        },
-        {
-          "name": "ENABLE_COAP",
-          "value": "OFF"
-        },
-        {
-          "name": "DISABLE_LIBARCHIVE",
-          "value": "TRUE"
-        },
-        {
-          "name": "DISABLE_SCRIPTING",
-          "value": "TRUE"
-        },
-        {
-          "name": "EXCLUDE_BOOST",
-          "value": "TRUE"
         }
       ],
       "ctestCommandArgs": ""
     }
   ]
-}
\ No newline at end of file
+}
diff --git a/Windows.md b/Windows.md
index 4726628..d453955 100644
--- a/Windows.md
+++ b/Windows.md
@@ -36,15 +36,17 @@
 
 ## Building with Visual Studio 
 
-In order to support Visual Studio you must install [plugins capable of building CMake](https://devblogs.microsoft.com/cppblog/cmake-support-in-visual-studio/). We also advise
+Make sure your Visual Studio installation includes the "Visual C++ tools for CMake" and "Visual C++ ATL for x86 and x64" options.
+You can also add these after installation using the Visual Studio Installer app. We also advise
 installing WiX and Visual Studio Command Prompt via the marketplace. To do this please go to the Tools Menu, followed by Extensions and Updates. Once the popup displays you
 may install additional features from Online sources in the Online menu.
 
 A file named CMakeSettings.json provides the CMake configuration.
 
 CMake must generate its cache, under Cache in the CMake Menu. After that is complete go to 'Build Only' under the CMake menu. Due to limitations in Visual Studio's CMake support, it is advised
-that you build `minifi.lib` then `minifiexe` targets. Once you have built these targets, you may use the `cpack` command to build your MSI. If you are building with JNI functionality the MSI will be
-significantly larger ( about 160 MB ) since it contains the base NARs to run the standard set of Apache NiFi processors. 
+that you build `minifi.lib` then `minifi.exe` targets.  `Build All` works, too, but it takes much longer.
+Once you have built these targets, you may use the `cpack` command to build your MSI. If you are building with JNI functionality the MSI will be
+significantly larger (about 160 MB) since it contains the base NARs to run the standard set of Apache NiFi processors. 
 
 ## Building via the build script
 
@@ -60,6 +62,7 @@
 | /J | Enables JNI |
 | /64 | Creates 64-bit build instead of a 32-bit one |
 | /D | Builds RelWithDebInfo build instead of Release |
+| /CI | Sets STRICT_GSL_CHECKS to AUDIT |
 
 Examples:
  - 32-bit build with kafka, disabling tests, enabling MSI creation: `win_build_vs.bat build32 /T /K /P`
@@ -78,8 +81,8 @@
 ```
 mkdir build
 cd build
-cmake -G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE_INIT=Release -DCMAKE_BUILD_TYPE=Release -DWIN32=WIN32 -DENABLE_LIBRDKAFKA=OFF -DENABLE_JNI=OFF -DOPENSSL_OFF=OFF -DENABLE_COAP=OFF -DUSE_SHARED_LIBS=OFF -DDISABLE_CONTROLLER=ON  -DBUILD_ROCKSDB=ON -DFORCE_WINDOWS=ON -DUSE_SYSTEM_UUID=OFF -DDISABLE_LIBARCHIVE=ON -DDISABLE_SCRIPTING=ON -DEXCLUDE_BOOST=ON -DENABLE_WEL=TRUE -DFAIL_ON_WARNINGS=OFF -DSKIP_TESTS=OFF ..
-msbuild /m nifi-minifi-cpp.sln /property:Configuration=Release /property:Platform=x64
+cmake -G "Visual Studio 15 2017" -DINSTALLER_MERGE_MODULES=OFF -DENABLE_SQL=OFF -DCMAKE_BUILD_TYPE_INIT=Release -DCMAKE_BUILD_TYPE=Release -DWIN32=WIN32 -DENABLE_LIBRDKAFKA=OFF -DENABLE_JNI=OFF -DOPENSSL_OFF=OFF -DENABLE_COAP=OFF -DUSE_SHARED_LIBS=OFF -DDISABLE_CONTROLLER=ON  -DBUILD_ROCKSDB=ON -DFORCE_WINDOWS=ON -DUSE_SYSTEM_UUID=OFF -DDISABLE_LIBARCHIVE=OFF -DDISABLE_SCRIPTING=ON -DEXCLUDE_BOOST=ON -DENABLE_WEL=TRUE -DFAIL_ON_WARNINGS=OFF -DSKIP_TESTS=OFF ..
+msbuild /m nifi-minifi-cpp.sln /property:Configuration=Release /property:Platform=Win32
 copy main\Release\minifi.exe main\
 cpack
 ctest -C Release
diff --git a/cmake/FindMessageCompiler.cmake b/cmake/FindMessageCompiler.cmake
index 22c1a70..4f930a3 100644
--- a/cmake/FindMessageCompiler.cmake
+++ b/cmake/FindMessageCompiler.cmake
@@ -21,29 +21,28 @@
         get_filename_component(kit10wow_dir "[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows Kits\\Installed Roots;KitsRoot10]" REALPATH)
         file(GLOB kit10_list ${kit10_dir}/bin/10.* ${kit10wow_dir}/bin/10.*)
         if (CMAKE_SIZEOF_VOID_P EQUAL 8)
-            set(env_bindir "$ENV{WindowsSdkVerBinPath}/x64")
-            set(sdk_bindir "${sdk_dir}/bin/x64")
-            set(kit_bindir "${kit_dir}/bin/x64")
-            set(kit81_bindir "${kit81_dir}/bin/x64")
+            list(APPEND tools_bin_dir_list "$ENV{WindowsSdkVerBinPath}/x64")
+            list(APPEND tools_bin_dir_list "${sdk_dir}/bin/x64")
+            list(APPEND tools_bin_dir_list "${kit_dir}/bin/x64")
+            list(APPEND tools_bin_dir_list "${kit81_dir}/bin/x64")
             foreach (tmp_elem ${kit10_list})
                 if (IS_DIRECTORY ${tmp_elem})
-                    list(APPEND kit10_bindir "${tmp_elem}/x64")
+                    list(APPEND tools_bin_dir_list "${tmp_elem}/x64")
                 endif()
             endforeach()
         else ()
-            set(env_bindir "$ENV{WindowsSdkVerBinPath}/x86")
-            set(sdk_bindir "${sdk_dir}/bin")
-            set(kit_bindir "${kit_dir}/bin/x86")
-            set(kit81_bindir "${kit81_dir}/bin/x86")
+            list(APPEND tools_bin_dir_list "$ENV{WindowsSdkVerBinPath}/x86")
+            list(APPEND tools_bin_dir_list "${sdk_dir}/bin")
+            list(APPEND tools_bin_dir_list "${kit_dir}/bin/x86")
+            list(APPEND tools_bin_dir_list "${kit81_dir}/bin/x86")
             foreach (tmp_elem ${kit10_list})
                 if (IS_DIRECTORY ${tmp_elem})
-                    list(APPEND kit10_bindir "${tmp_elem}/x86")
+                    list(APPEND tools_bin_dir_list "${tmp_elem}/x86")
                 endif()
             endforeach()
         endif ()
     endif ()
-    find_program(CMAKE_MC_COMPILER mc.exe HINTS "${env_bindir}" "${sdk_bindir}" "${kit_bindir}" "${kit81_bindir}" "${kit10_bindir}"
-            DOC "path to message compiler")
+    find_program(CMAKE_MC_COMPILER mc.exe HINTS ${tools_bin_dir_list} DOC "path to message compiler")
 
     include(FindPackageHandleStandardArgs)
     find_package_handle_standard_args(MessageCompiler