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:
Nicola Corti 2023-06-06 05:40:20 -07:00 коммит произвёл Facebook GitHub Bot
Родитель a497882384
Коммит ea4724b37c
2 изменённых файлов: 0 добавлений и 35 удалений

Просмотреть файл

@ -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()