Remove CircularDepsValidator.cmake as is not needed
Summary: We haven't really used this macro, so it's safe to remove as of now. Changelog: [Internal] [Changed] - Remove CircularDepsValidator.cmake as is not needed Reviewed By: javache Differential Revision: D46443083 fbshipit-source-id: 2a48749d7af31c393828668006d53c7a6755ac5d
This commit is contained in:
Родитель
a497882384
Коммит
ea4724b37c
|
@ -19,9 +19,6 @@ endif(CCACHE_FOUND)
|
|||
add_link_options(-Wl,--build-id)
|
||||
add_compile_options(-Wall -Werror -std=c++17)
|
||||
|
||||
# This exposes the check_for_circular_dependencies macro to all the submodules
|
||||
include(CircularDepsValidator.cmake)
|
||||
|
||||
function(add_react_android_subdir relative_path)
|
||||
add_subdirectory(${REACT_ANDROID_DIR}/${relative_path} ReactAndroid/${relative_path})
|
||||
endfunction()
|
||||
|
|
|
@ -1,32 +0,0 @@
|
|||
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||
#
|
||||
# This source code is licensed under the MIT license found in the
|
||||
# LICENSE file in the root directory of this source tree.
|
||||
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
set(CMAKE_VERBOSE_MAKEFILE on)
|
||||
|
||||
# Util function that help us verify that you're not including a header file
|
||||
# which has an invalid import path. Most of the time this is causing a C++ circular dependency.
|
||||
function(check_for_circular_dependencies allowed_imports_paths)
|
||||
file(GLOB headers CONFIGURE_DEPENDS *.h)
|
||||
foreach(file ${headers})
|
||||
file(STRINGS ${file} header_file)
|
||||
while(header_file)
|
||||
list(POP_FRONT header_file line)
|
||||
if (line MATCHES "^#include <react")
|
||||
set(matched_import false)
|
||||
foreach(allowed_import ${allowed_imports_paths})
|
||||
if (line MATCHES "^#include <${allowed_import}")
|
||||
set(matched_import true)
|
||||
continue()
|
||||
endif()
|
||||
endforeach()
|
||||
if (NOT matched_import)
|
||||
message(FATAL_ERROR "!!!!!\nDiscovered an invalid include on file\n${file}\nfor include\n${line}\n")
|
||||
break()
|
||||
endif()
|
||||
endif()
|
||||
endwhile()
|
||||
endforeach()
|
||||
endfunction()
|
Загрузка…
Ссылка в новой задаче