szaszm commented on code in PR #1793:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1793#discussion_r1754357747
##########
cmake/BundledRocksDB.cmake:
##########
@@ -63,10 +64,17 @@ function(use_bundled_rocksdb SOURCE_DIR BINARY_DIR)
-DROCKSDB_INSTALL_ON_WINDOWS=ON
-DWITH_XPRESS=ON)
else()
+ if(MINIFI_ZSTD_SOURCE STREQUAL "CONAN" AND MINIFI_ZLIB_SOURCE STREQUAL
"CONAN")
+ list(APPEND ROCKSDB_CMAKE_ARGS
+ -DWITH_ZLIB=OFF
+ -DWITH_ZSTD=OFF)
+ else()
Review Comment:
I think we should fix RocksDB with Conan zlib and zstd instead, if that's
possible. Or is that not possible or feasible?
##########
cmake/GetZstd.cmake:
##########
@@ -0,0 +1,27 @@
+# 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(get_zstd)
+ if(MINIFI_ZSTD_SOURCE STREQUAL "CONAN")
+ message("Using Conan Packager to manage installing prebuilt zstd
external lib")
Review Comment:
```suggestion
message("Using Conan Packager to install zstd")
```
##########
cmake/GetZLIB.cmake:
##########
@@ -0,0 +1,27 @@
+# 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(get_zlib SOURCE_DIR BINARY_DIR)
+ if(MINIFI_ZLIB_SOURCE STREQUAL "CONAN")
+ message("Using Conan Packager to manage installing prebuilt zlib
external lib")
Review Comment:
```suggestion
message("Using Conan to install zlib")
```
##########
cmake/GetZstd.cmake:
##########
@@ -0,0 +1,27 @@
+# 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(get_zstd)
+ if(MINIFI_ZSTD_SOURCE STREQUAL "CONAN")
+ message("Using Conan Packager to manage installing prebuilt zstd
external lib")
+ find_package(zstd REQUIRED)
+ add_library(zstd::zstd ALIAS zstd::libzstd_static)
+ elseif(MINIFI_ZSTD_SOURCE STREQUAL "BUILD")
+ message("Using CMAKE's ExternalProject_Add to manage source building
zstd external lib")
Review Comment:
```suggestion
message("Using CMake to build zstd from source")
```
##########
etc/conan/profiles/release-linux:
##########
@@ -0,0 +1,12 @@
+[settings]
+os=Linux
+arch=x86_64
+build_type=Release
+compiler=gcc
+compiler.cppstd=gnu20
Review Comment:
We generally prefer ISO standard over GNU.
```suggestion
compiler.cppstd=20
```
##########
cmake/GetZLIB.cmake:
##########
@@ -0,0 +1,27 @@
+# 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(get_zlib SOURCE_DIR BINARY_DIR)
+ if(MINIFI_ZLIB_SOURCE STREQUAL "CONAN")
+ message("Using Conan Packager to manage installing prebuilt zlib
external lib")
+ find_package(ZLIB REQUIRED)
+ elseif(MINIFI_ZLIB_SOURCE STREQUAL "BUILD")
+ message("Using CMAKE's ExternalProject_Add to manage source building
zlib external lib")
Review Comment:
```suggestion
message("Using CMake to build zlib from source")
```
--
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]