[ https://issues.apache.org/jira/browse/MINIFI-177?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16033363#comment-16033363 ]
ASF GitHub Bot commented on MINIFI-177: --------------------------------------- Github user apiri commented on a diff in the pull request: https://github.com/apache/nifi-minifi-cpp/pull/103#discussion_r119681851 --- Diff: cmake/RunApacheRAT.cmake --- @@ -0,0 +1,44 @@ +# 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. + +# Find the preferred Apache mirror to use for the download by querying the list of mirrors and filtering out 'preferred' +execute_process(COMMAND curl -s https://www.apache.org/dyn/closer.lua/?asjson=1 + COMMAND grep preferred + COMMAND awk "{print $2}" + COMMAND tr -d "\"" + TIMEOUT 10 + OUTPUT_STRIP_TRAILING_WHITESPACE + OUTPUT_VARIABLE MIRROR_URL ) + +ExternalProject_Add( --- End diff -- adjusted this to use the script mode of cmake and perform that check/download only when the specific target is invoked. what is a little tricky is that CMake handles the file downloading across at configuration time and also has the built in facilities to handle this wherever CMake runs. May be a better way, but this one came to mind without having to sling around additional arguments/variables for the invoking command > Incorporate RAT into C++ build > ------------------------------ > > Key: MINIFI-177 > URL: https://issues.apache.org/jira/browse/MINIFI-177 > Project: Apache NiFi MiNiFi > Issue Type: Task > Components: Build, C++ > Reporter: Aldrin Piri > Assignee: Aldrin Piri > > To aid in releases and compliance, it would be helpful to incorporate the RAT > into the C++ build process. -- This message was sent by Atlassian JIRA (v6.3.15#6346)