You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "lordgamez (via GitHub)" <gi...@apache.org> on 2024/02/08 12:42:46 UTC
[PR] MINIFICPP-2231 Replace global CXX flags with target specific ones [nifi-minifi-cpp]
lordgamez opened a new pull request, #1724:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1724
https://issues.apache.org/jira/browse/MINIFICPP-2231
----------------
Thank you for submitting a contribution to Apache NiFi - MiNiFi C++.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [ ] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [ ] Does your PR title start with MINIFICPP-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
- [ ] Has your PR been rebased against the latest commit within the target branch (typically main)?
- [ ] Is your initial contribution a single, squashed commit?
### For code changes:
- [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file?
- [ ] If applicable, have you updated the NOTICE file?
### For documentation related changes:
- [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
### Note:
Please ensure that once the PR is submitted, you check GitHub Actions CI results for build issues and submit an update to your PR as soon as possible.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINIFICPP-2231 Replace global CXX flags with target specific ones [nifi-minifi-cpp]
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #1724:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1724#discussion_r1505711051
##########
extensions/coap/CMakeLists.txt:
##########
@@ -31,8 +31,8 @@ include_directories(../http-curl/)
file(GLOB CSOURCES "nanofi/*.c")
file(GLOB SOURCES "*.cpp" "protocols/*.cpp" "processors/*.cpp" "controllerservice/*.cpp" "server/*.cpp" )
-add_library(nanofi-coap-c STATIC ${CSOURCES})
-add_library(minifi-coap SHARED ${SOURCES})
+add_minifi_library(nanofi-coap-c STATIC "${CSOURCES}")
+add_minifi_library(minifi-coap SHARED "${SOURCES}")
Review Comment:
Good point, it is not needed and recently we had a problem with a similar issue, so I removed the `""`s in 6953ccd12db3eb633d8016a4f3c3ffd88d0411b9
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINIFICPP-2231 Replace global CXX flags with target specific ones [nifi-minifi-cpp]
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #1724:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1724#discussion_r1486368105
##########
CMakeLists.txt:
##########
@@ -325,20 +325,33 @@ include(MagicEnum)
# Setup warning flags
if(MSVC)
+set(MINIFI_CPP_COMPILE_OPTIONS ${MINIFI_CPP_COMPILE_OPTIONS} /W3)
if(FAIL_ON_WARNINGS)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+ set(MINIFI_CPP_COMPILE_OPTIONS ${MINIFI_CPP_COMPILE_OPTIONS} /WX)
endif()
else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
+ set(MINIFI_CPP_COMPILE_OPTIONS ${MINIFI_CPP_COMPILE_OPTIONS} -Wall -Wextra -Wno-reorder)
Review Comment:
Good point, it was set in libminifi for some reason so I moved it to the minificpp compile options. I removed it and fixed the libminifi issues in f53b73d0a9f001cc4b7d4b1d82950b50855b43af
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINIFICPP-2231 Replace global CXX flags with target specific ones [nifi-minifi-cpp]
Posted by "fgerlits (via GitHub)" <gi...@apache.org>.
fgerlits commented on code in PR #1724:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1724#discussion_r1505650786
##########
extensions/coap/CMakeLists.txt:
##########
@@ -31,8 +31,8 @@ include_directories(../http-curl/)
file(GLOB CSOURCES "nanofi/*.c")
file(GLOB SOURCES "*.cpp" "protocols/*.cpp" "processors/*.cpp" "controllerservice/*.cpp" "server/*.cpp" )
-add_library(nanofi-coap-c STATIC ${CSOURCES})
-add_library(minifi-coap SHARED ${SOURCES})
+add_minifi_library(nanofi-coap-c STATIC "${CSOURCES}")
+add_minifi_library(minifi-coap SHARED "${SOURCES}")
Review Comment:
Are you sure we want to add these new `""`s? I would expect this means that now we are passing the list of sources as a single argument instead of a list of separate arguments; do we need to / do we want to do that?
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINIFICPP-2231 Replace global CXX flags with target specific ones [nifi-minifi-cpp]
Posted by "szaszm (via GitHub)" <gi...@apache.org>.
szaszm commented on code in PR #1724:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1724#discussion_r1483629400
##########
CMakeLists.txt:
##########
@@ -227,8 +230,7 @@ endif()
if(NOT WIN32)
if (ENABLE_JNI)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_JNI")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_JNI")
+ set(MINIFI_CPP_COMPILE_DEFINITIONS ${MINIFI_CPP_COMPILE_DEFINITIONS} ENABLE_JNI)
Review Comment:
Maybe a list would be more appropriate
```suggestion
list(APPEND MINIFI_CPP_COMPILE_DEFINITIONS ENABLE_JNI)
```
##########
CMakeLists.txt:
##########
@@ -325,20 +325,33 @@ include(MagicEnum)
# Setup warning flags
if(MSVC)
+set(MINIFI_CPP_COMPILE_OPTIONS ${MINIFI_CPP_COMPILE_OPTIONS} /W3)
if(FAIL_ON_WARNINGS)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /WX")
+ set(MINIFI_CPP_COMPILE_OPTIONS ${MINIFI_CPP_COMPILE_OPTIONS} /WX)
endif()
else()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra")
+ set(MINIFI_CPP_COMPILE_OPTIONS ${MINIFI_CPP_COMPILE_OPTIONS} -Wall -Wextra -Wno-reorder)
Review Comment:
Why `-Wno-reorder`? I think it's a useful warning.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINIFICPP-2231 Replace global CXX flags with target specific ones [nifi-minifi-cpp]
Posted by "lordgamez (via GitHub)" <gi...@apache.org>.
lordgamez commented on code in PR #1724:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1724#discussion_r1486366848
##########
CMakeLists.txt:
##########
@@ -227,8 +230,7 @@ endif()
if(NOT WIN32)
if (ENABLE_JNI)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DENABLE_JNI")
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DENABLE_JNI")
+ set(MINIFI_CPP_COMPILE_DEFINITIONS ${MINIFI_CPP_COMPILE_DEFINITIONS} ENABLE_JNI)
Review Comment:
Updated in f53b73d0a9f001cc4b7d4b1d82950b50855b43af
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] MINIFICPP-2231 Replace global CXX flags with target specific ones [nifi-minifi-cpp]
Posted by "fgerlits (via GitHub)" <gi...@apache.org>.
fgerlits closed pull request #1724: MINIFICPP-2231 Replace global CXX flags with target specific ones
URL: https://github.com/apache/nifi-minifi-cpp/pull/1724
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org