|
| 1 | +# ############################################################################## |
| 2 | +# apps/testing/fff/CMakeLists.txt |
| 3 | +# |
| 4 | +# Licensed to the Apache Software Foundation (ASF) under one or more contributor |
| 5 | +# license agreements. See the NOTICE file distributed with this work for |
| 6 | +# additional information regarding copyright ownership. The ASF licenses this |
| 7 | +# file to you under the Apache License, Version 2.0 (the "License"); you may not |
| 8 | +# use this file except in compliance with the License. You may obtain a copy of |
| 9 | +# the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, software |
| 14 | +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT |
| 15 | +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the |
| 16 | +# License for the specific language governing permissions and limitations under |
| 17 | +# the License. |
| 18 | +# |
| 19 | +# ############################################################################## |
| 20 | + |
| 21 | +if(CONFIG_TESTING_FFF) |
| 22 | + |
| 23 | + set(FFF_UNPACK ${CMAKE_CURRENT_LIST_DIR}/fff) |
| 24 | + set(FFF_URL https://github.com/meekrosoft/fff/archive/refs/heads/master.zip) |
| 25 | + |
| 26 | + if(NOT EXISTS ${FFF_UNPACK}) |
| 27 | + |
| 28 | + FetchContent_Declare( |
| 29 | + fff_fetch |
| 30 | + URL ${FFF_URL} SOURCE_DIR ${FFF_UNPACK} BINARY_DIR |
| 31 | + ${CMAKE_BINARY_DIR}/apps/testing/fff/fff |
| 32 | + DOWNLOAD_NO_PROGRESS true |
| 33 | + TIMEOUT 30) |
| 34 | + |
| 35 | + FetchContent_GetProperties(fff_fetch) |
| 36 | + if(NOT fff_fetch_POPULATED) |
| 37 | + FetchContent_Populate(fff_fetch) |
| 38 | + endif() |
| 39 | + |
| 40 | + endif() |
| 41 | + |
| 42 | + set(INCDIR ${FFF_UNPACK}) |
| 43 | + |
| 44 | + set_property( |
| 45 | + TARGET nuttx |
| 46 | + APPEND |
| 47 | + PROPERTY NUTTX_INCLUDE_DIRECTORIES ${INCDIR}) |
| 48 | + |
| 49 | +endif() |
0 commit comments