james94 commented on code in PR #1793:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1793#discussion_r1632099378
##########
cmake/MiNiFiOptions.cmake:
##########
@@ -42,6 +42,7 @@ add_minifi_option(DOCKER_SKIP_TESTS "Skip building tests in
docker image targets
add_minifi_option(DOCKER_PUSH "Push created images to the specified tags" OFF)
add_minifi_option(PORTABLE "Instructs the compiler to remove architecture
specific optimizations" ON)
+add_minifi_option(MINIFI_USE_CONAN_PACKAGER "Instructs cmake to use conan
packager to install external libs & build MiNiFi C++" OFF)
Review Comment:
@szaszm I think I see where you are talking about with a custom option that
has multiple possible values. This is the example I found in MiNiFiOptions.cmake
~~~cmake
# Option: STRICT_GSL_CHECKS
# AUDIT: Enable all checks, including gsl_ExpectsAudit() and
gsl_EnsuresAudit()
# ON: Enable all checks, excluding gsl_ExpectsAudit() and gsl_EnsuresAudit()
(GSL default)
# DEBUG_ONLY: Like ON in the Debug configuration, OFF in others (MiNiFi C++
default)
# OFF: Throw on contract checking and assertion failures instead of calling
std::terminate()
set(STRICT_GSL_CHECKS "DEBUG_ONLY" CACHE STRING "Contract checking and
assertion failures call terminate")
list(APPEND STRICT_GSL_CHECKS_Values AUDIT ON DEBUG_ONLY OFF)
set_property(CACHE STRICT_GSL_CHECKS PROPERTY STRINGS
${STRICT_GSL_CHECKS_Values})
~~~
I agree I think it would be great to create new the CMake options for the
source of how we retrieve external libs like the following:
~~~cmake
# Option: MINIFI_LIBCURL_SOURCE
# BUILD: MiNiFi LibCURL source retrieved from CMake's ExternalProject,
FetchContent, etc
# CONAN: MiNiFi LibCURL source retrieved from conan packager
# SYSTEM: MiNiFi LibCURL source retrieved from native OS system
set(MINIFI_LIBCURL_SOURCE "BUILD" CACHE STRING "Builds LibCURL from source
using standalone CMake approach"
list(APPEND MINIFI_LIBCURL_SOURCE_Values SYSTEM BUILD CONAN)
set_property(MINIFI_LIBCURL_SOURCE PROPERTY STRINGS
${MINIFI_LIBCURL_SOURCE_Values})
~~~
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]