stiga-huang commented on code in PR #1889:
URL: https://github.com/apache/orc/pull/1889#discussion_r1575763100


##########
c++/orcConfig.cmake.in:
##########
@@ -0,0 +1,70 @@
+# 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.
+
+@PACKAGE_INIT@
+
+set(ORC_VENDOR_DEPENDENCIES "@ORC_VENDOR_DEPENDENCIES@")
+set(ORC_SYSTEM_DEPENDENCIES "@ORC_SYSTEM_DEPENDENCIES@")
+
+if(DEFINED CMAKE_MODULE_PATH)
+  set(ORC_CMAKE_MODULE_PATH_OLD ${CMAKE_MODULE_PATH})
+else()
+  unset(ORC_CMAKE_MODULE_PATH_OLD)
+endif()
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
+
+include(CMakeFindDependencyMacro)
+foreach(dependency ${ORC_SYSTEM_DEPENDENCIES})
+  find_dependency(${dependency})

Review Comment:
   I might not understand this correctly. If this file is expected to be used 
by downstream projects, can we add an option to skip this? Impala finds the 
dependencies by itself and don't need the ORC lib to do so. Got an error like 
this in a quick try:
   ```
   CMake Error at 
/home/quanlong/workspace/orc/build/install/lib/cmake/orc/FindSnappy.cmake:70 
(message):
     Could not find Snappy in system search paths.
   Call Stack (most recent call first):
     
toolchain/toolchain-packages-gcc10.4.0/cmake-3.22.2/share/cmake-3.22/Modules/CMakeFindDependencyMacro.cmake:47
 (find_package)
     
/home/quanlong/workspace/orc/build/install/lib/cmake/orc/orcConfig.cmake:56 
(find_dependency)
     CMakeLists.txt:362 (find_package)
   ```



##########
c++/orcConfig.cmake.in:
##########
@@ -0,0 +1,70 @@
+# 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.
+

Review Comment:
   I might not understand this correctly. If this file is expected to be used 
by downstream projects, can we add some comments about the result variables? 
E.g. 
https://github.com/Kitware/CMake/blob/d41252c91fd9d7c8fb95b7202adca278524780da/Modules/FindBoost.cmake#L42-L95
   or
   
https://github.com/apache/impala/blob/9b05a205fec397fa1e19ae467b1cc406ca43d948/cmake_modules/FindOrc.cmake#L21-L24



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