lordgamez commented on code in PR #2214:
URL: https://github.com/apache/nifi-minifi-cpp/pull/2214#discussion_r3639377436


##########
cmake/GenerateGrafanaLokiProto.cmake:
##########
@@ -0,0 +1,74 @@
+# 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.
+
+set(LOKI_PROTOBUF_GENERATED_DIR 
${CMAKE_BINARY_DIR}/grafana-loki-protobuf-generated)
+file(MAKE_DIRECTORY ${LOKI_PROTOBUF_GENERATED_DIR})
+
+if(MINIFI_GRPC_SOURCE STREQUAL "CONAN")
+    find_package(protobuf CONFIG REQUIRED)
+    find_package(gRPC CONFIG REQUIRED)
+
+    find_program(LOKI_PROTOC_EXECUTABLE
+        NAMES protoc
+        PATHS "${protobuf_INCLUDE_DIR}/../bin"
+        NO_DEFAULT_PATH
+        REQUIRED)
+
+    add_custom_command(
+        OUTPUT
+            ${LOKI_PROTOBUF_GENERATED_DIR}/grafana-loki-push.grpc.pb.cc
+            ${LOKI_PROTOBUF_GENERATED_DIR}/grafana-loki-push.grpc.pb.h
+            ${LOKI_PROTOBUF_GENERATED_DIR}/grafana-loki-push.pb.h
+            ${LOKI_PROTOBUF_GENERATED_DIR}/grafana-loki-push.pb.cc
+        COMMAND ${LOKI_PROTOC_EXECUTABLE}
+        ARGS
+            --plugin=protoc-gen-grpc=$<TARGET_FILE:gRPC::grpc_cpp_plugin>
+            --proto_path=.
+            --grpc_out=${LOKI_PROTOBUF_GENERATED_DIR}
+            --cpp_out=${LOKI_PROTOBUF_GENERATED_DIR}
+            grafana-loki-push.proto
+        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/protos
+        DEPENDS
+            ${LOKI_PROTOC_EXECUTABLE}
+            gRPC::grpc_cpp_plugin
+            ${CMAKE_CURRENT_SOURCE_DIR}/protos/grafana-loki-push.proto

Review Comment:
   Changed in 
https://github.com/apache/nifi-minifi-cpp/pull/2214/commits/538e0622c37b90f9b9c7c9d2bf876b612cf43c85



##########
cmake/GetDate.cmake:
##########
@@ -0,0 +1,58 @@
+# 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.
+
+if (WIN32)
+    include(FetchContent)
+
+    # tzdata and windowsZones.xml from unicode cldr-common are required to be 
installed for date-tz operation on Windows
+    FetchContent_Declare(tzdata
+        URL         
https://data.iana.org/time-zones/releases/tzdata2026b.tar.gz
+        URL_HASH    
SHA256=114543d9f19a6bfeb5bca43686aea173d38755a3db1f2eec112647ae92c6f544
+        SYSTEM
+    )
+    FetchContent_GetProperties(tzdata)
+    if (NOT tzdata_POPULATED)
+        FetchContent_Populate(tzdata)
+    endif()
+
+    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/tzdata)
+
+    file(COPY 
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cldr-common-38.1/common/supplemental/windowsZones.xml
+        DESTINATION ${CMAKE_BINARY_DIR}/tzdata)

Review Comment:
   Fixed in 
https://github.com/apache/nifi-minifi-cpp/pull/2214/commits/538e0622c37b90f9b9c7c9d2bf876b612cf43c85



##########
cmake/GetDate.cmake:
##########
@@ -0,0 +1,58 @@
+# 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.
+
+if (WIN32)
+    include(FetchContent)
+
+    # tzdata and windowsZones.xml from unicode cldr-common are required to be 
installed for date-tz operation on Windows
+    FetchContent_Declare(tzdata
+        URL         
https://data.iana.org/time-zones/releases/tzdata2026b.tar.gz
+        URL_HASH    
SHA256=114543d9f19a6bfeb5bca43686aea173d38755a3db1f2eec112647ae92c6f544
+        SYSTEM
+    )
+    FetchContent_GetProperties(tzdata)
+    if (NOT tzdata_POPULATED)
+        FetchContent_Populate(tzdata)
+    endif()
+
+    file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/tzdata)
+
+    file(COPY 
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cldr-common-38.1/common/supplemental/windowsZones.xml
+        DESTINATION ${CMAKE_BINARY_DIR}/tzdata)
+
+    file(COPY ${tzdata_SOURCE_DIR}/
+        DESTINATION ${CMAKE_BINARY_DIR}/tzdata)
+
+    install(DIRECTORY ${tzdata_SOURCE_DIR}/
+        DESTINATION tzdata
+        COMPONENT bin)
+
+    install(FILES 
${CMAKE_CURRENT_SOURCE_DIR}/thirdparty/cldr-common-38.1/common/supplemental/windowsZones.xml
+        DESTINATION tzdata
+        COMPONENT bin)

Review Comment:
   Fixed in 
https://github.com/apache/nifi-minifi-cpp/pull/2214/commits/538e0622c37b90f9b9c7c9d2bf876b612cf43c85



-- 
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]

Reply via email to