fgerlits commented on a change in pull request #1104:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1104#discussion_r649261591
##########
File path: .github/workflows/ci.yml
##########
@@ -154,7 +111,7 @@ jobs:
run: |
PATH %PATH%;C:\Program Files (x86)\Windows
Kits\10\bin\10.0.19041.0\x64
PATH %PATH%;C:\Program Files (x86)\Microsoft Visual
Studio\2019\Enterprise\MSBuild\Current\Bin\Roslyn
- win_build_vs.bat build /2019 /64 /CI /S /A /PDH /K /L /R
+ win_build_vs.bat build /64 /CI /S /A /PDH /K /L /R
Review comment:
`/Z` (Azure) was only enabled in the other Windows build; if we'll only
have this one, we should enable it here.
##########
File path: cmake/BundledAzureSdkCpp.cmake
##########
@@ -16,8 +16,13 @@
# under the License.
function(use_bundled_libazure SOURCE_DIR BINARY_DIR)
- set(PATCH_FILE
"${SOURCE_DIR}/thirdparty/azure-sdk-cpp-for-cpp/azure-sdk-for-cpp-old-compiler.patch")
- set(PC "${Patch_EXECUTABLE}" -R -p1 -s -f --dry-run -i "${PATCH_FILE}" ||
"${Patch_EXECUTABLE}" -p1 -i "${PATCH_FILE}")
+ set(PATCH_FILE1
"${SOURCE_DIR}/thirdparty/azure-sdk-cpp-for-cpp/azure-sdk-for-cpp-old-compiler.patch")
+ set(PATCH_FILE2
"${SOURCE_DIR}/thirdparty/azure-sdk-cpp-for-cpp/fix-illegal-qualified-name-in-member.patch")
+ set(PC bash -c "set -x && (\"${Patch_EXECUTABLE}\" -p1 -N -i
\"${PATCH_FILE1}\" &&\
+ \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE2}\") ||\
+ (\"${Patch_EXECUTABLE}\" -p1 -R --dry-run -i \"${PATCH_FILE1}\" &&\
+ \"${Patch_EXECUTABLE}\" -p1 -R --dry-run -i \"${PATCH_FILE2}\")")
Review comment:
Isn't this backwards? We want to "dry-run" the reverse patch first, and
only run the real patch if the dry-run failed:
```suggestion
set(PC bash -c "set -x &&\
(\"${Patch_EXECUTABLE}\" -p1 -R --dry-run -i \"${PATCH_FILE1}\"
|| \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE1}\") &&\
(\"${Patch_EXECUTABLE}\" -p1 -R --dry-run -i
\"${PATCH_FILE2}\")" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE2}\") ")
```
##########
File path: cmake/CppVersion.cmake
##########
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+function(set_cpp_version)
+ if (MSVC)
+ if ((MSVC_VERSION GREATER "1910") OR (MSVC_VERSION EQUAL "1910"))
+ add_compile_options("/std:c++latest")
+ add_compile_options("/permissive-")
+ else()
+ message(STATUS "The compiler ${CMAKE_CXX_COMPILER} has no C++17
support. Please use a different C++ compiler.")
Review comment:
This error message is misleading, as we aren't checking C++17 support
directly.
```suggestion
message(STATUS "The Visual Studio C++ compiler
${CMAKE_CXX_COMPILER} is not supported. Please use Visual Studio 2017 or
newer.")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]