arcolight commented on code in PR #7718: URL: https://github.com/apache/ignite-3/pull/7718#discussion_r2982946213
########## modules/platforms/cpp/cmake/ignite_compile_headers.cmake: ########## @@ -0,0 +1,83 @@ + # +# 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. +# + +# Compile-time check for public headers (always enabled when ENABLE_CLIENT=ON). +# +# For every public header of ignite3-client, compiles a minimal .cpp that +# includes ONLY that header against the INSTALLED package. This catches: +# 1. Headers missing their own #include dependencies. +# 2. Public headers that #include internal (non-installed) headers. +# 3. Headers missing from the installed package. +# +# The check installs the already-built client to a temporary prefix inside +# the build tree, then configures a sub-project under +# tests/package-test/compile_public_headers/ against that prefix. +# Because INSTALL_INTERFACE is used, the compiler only sees the installed +# include tree — internal headers absent from the package are not accessible. +# +# Target produced: +# compile-public-headers + +if (NOT ENABLE_CLIENT) + message(STATUS "compile-public-headers: ENABLE_CLIENT=OFF, skipping.") +else() + if (NOT IGNITE3_CLIENT_PUBLIC_HEADERS) + message(WARNING "compile-public-headers: IGNITE3_CLIENT_PUBLIC_HEADERS is empty. " + "Check ignite/client/CMakeLists.txt.") + else() + set(_hcc_dir "${CMAKE_BINARY_DIR}/hcc") + + # Write the list of public headers to a cmake file that the + # sub-project will include. This avoids command-line quoting + # issues when passing a list with semicolons. Review Comment: Fixed -- 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]
