You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by fg...@apache.org on 2023/11/28 12:26:46 UTC
(nifi-minifi-cpp) 02/03: MINIFICPP-2263 Fix debug build
This is an automated email from the ASF dual-hosted git repository.
fgerlits pushed a commit to branch merge_2023-11-28
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit 7a3605271e901a2db1625cc9a45d55ad5fd8835e
Author: Gabor Gyimesi <ga...@gmail.com>
AuthorDate: Fri Nov 17 10:27:14 2023 +0100
MINIFICPP-2263 Fix debug build
Signed-off-by: Ferenc Gerlits <fg...@gmail.com>
This closes #1696
---
.github/workflows/ci.yml | 2 +-
cmake/BundledLibcURL.cmake | 13 +++++++++++--
.../expression-language/tests/ExpressionLanguageTests.cpp | 4 ++++
win_build_vs.bat | 8 +++++---
4 files changed, 21 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index f1702c860..e3878c188 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -111,7 +111,7 @@ jobs:
- name: build
run: |
for /f "usebackq delims=" %%i in (`vswhere.exe -latest -property installationPath`) do if exist "%%i\Common7\Tools\vsdevcmd.bat" call "%%i\Common7\Tools\vsdevcmd.bat" -arch=x64 -host_arch=x64
- win_build_vs.bat ..\b /64 /CI /S /A /PDH /SPLUNK /GCP /ELASTIC /K /L /R /Z /N /RO /PR /PYTHON_SCRIPTING /LUA_SCRIPTING /MQTT /SCCACHE /NINJA
+ win_build_vs.bat ..\b /64 /CI /PDH /R /N /RO /SCCACHE /NINJA
sccache --show-stats
shell: cmd
- name: sccache cache save
diff --git a/cmake/BundledLibcURL.cmake b/cmake/BundledLibcURL.cmake
index f17e55bc1..c21a82bd6 100644
--- a/cmake/BundledLibcURL.cmake
+++ b/cmake/BundledLibcURL.cmake
@@ -21,13 +21,22 @@ function(use_bundled_curl SOURCE_DIR BINARY_DIR)
set(PC ${Bash_EXECUTABLE} -c "set -x && \
(\"${Patch_EXECUTABLE}\" -p1 -R -s -f --dry-run -i \"${PATCH_FILE_1}\" || \"${Patch_EXECUTABLE}\" -p1 -N -i \"${PATCH_FILE_1}\")")
# Define byproducts
+ string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type)
if (WIN32)
- set(BYPRODUCT "lib/libcurl.lib")
+ if (build_type MATCHES relwithdebinfo OR build_type MATCHES release)
+ set(BYPRODUCT "lib/libcurl.lib")
+ else()
+ set(BYPRODUCT "lib/libcurl-d.lib")
+ endif()
else()
include(GNUInstallDirs)
string(REPLACE "/" ";" LIBDIR_LIST ${CMAKE_INSTALL_LIBDIR})
list(GET LIBDIR_LIST 0 LIBDIR)
- set(BYPRODUCT "${LIBDIR}/libcurl.a")
+ if (build_type MATCHES relwithdebinfo OR build_type MATCHES release)
+ set(BYPRODUCT "${LIBDIR}/libcurl.a")
+ else()
+ set(BYPRODUCT "${LIBDIR}/libcurl-d.a")
+ endif()
endif()
# Set build options
diff --git a/extensions/expression-language/tests/ExpressionLanguageTests.cpp b/extensions/expression-language/tests/ExpressionLanguageTests.cpp
index 8992a647d..b414949c3 100644
--- a/extensions/expression-language/tests/ExpressionLanguageTests.cpp
+++ b/extensions/expression-language/tests/ExpressionLanguageTests.cpp
@@ -22,7 +22,11 @@
#include <string>
#ifndef DISABLE_CURL
#ifdef WIN32
+#ifdef _DEBUG
+#pragma comment(lib, "libcurl-d.lib")
+#else
#pragma comment(lib, "libcurl.lib")
+#endif
#pragma comment(lib, "Ws2_32.lib")
#pragma comment(lib, "legacy_stdio_definitions.lib")
#pragma comment(lib, "crypt32.lib")
diff --git a/win_build_vs.bat b/win_build_vs.bat
index 35327912e..416ce2434 100755
--- a/win_build_vs.bat
+++ b/win_build_vs.bat
@@ -46,15 +46,17 @@ set enable_pcap=OFF
set enable_python_scripting=ON
set enable_sensors=OFF
set enable_usb_camera=OFF
+set enable_nanofi=OFF
+set enable_opencv=OFF
+set enable_prometheus=ON
+set enable_gcp=ON
+set enable_elastic=ON
set test_custom_wel_provider=OFF
set generator="Visual Studio 17 2022"
set cpack=OFF
set installer_merge_modules=OFF
set strict_gsl_checks=
set redist=
-set enable_nanofi=OFF
-set enable_opencv=OFF
-set enable_prometheus=ON
set real_odbc=OFF
set sccache_arg=