From c2cc06aba51851e46729475a135ffad759b2f77b Mon Sep 17 00:00:00 2001 From: Thomas Boyer Chammard <49786685+thomas-bc@users.noreply.github.com> Date: Fri, 4 Aug 2023 09:18:10 -0700 Subject: [PATCH] Revert "Adding prevent_prescan to CMake API (#2021)" This reverts commit 38b40ecd4b8546297d3f01085827b2842d474552. --- cmake/API.cmake | 35 +++++------------------------------ 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/cmake/API.cmake b/cmake/API.cmake index d355ccb398a..9bf7a33d255 100644 --- a/cmake/API.cmake +++ b/cmake/API.cmake @@ -29,36 +29,11 @@ set(FPRIME_AUTOCODER_TARGET_LIST "" CACHE INTERNAL "FPRIME_AUTOCODER_TARGET_LIST ##### macro(restrict_platforms) set(__CHECKER ${ARGN}) - if (NOT CMAKE_SYSTEM_NAME IN_LIST __CHECKER) - get_module_name("${CMAKE_CURRENT_LIST_DIR}") - message(STATUS "Platform ${CMAKE_SYSTEM_NAME} not supported for module ${MODULE_NAME}") - return() - endif() -endmacro() - -#### -# Macro `prevent_prescan`: -# -# Prevents a CMakeLists.txt file from being processed in the prescan phase of the project. Will generate fake targets -# for all those targets specified to ensure that dependencies may be attached to these targets in the larger system. -# -# Usage: -# prevent_prescan(target1 target2 ...) # Generate fake targets and skip prescan -# -# Args: -# ARGN: list of targets to synthesize -##### -macro(prevent_prescan) - set(__CHECKER_TARGETS ${ARGN}) - if (DEFINED FPRIME_PRESCAN) - foreach (__TARGET IN LISTS __CHECKER_TARGETS) - add_custom_target(${__TARGET}) - endforeach() - string(REPLACE ";" " " __SPACE_LIST_TARGETS "${__CHECKER_TARGETS}") - get_module_name("${CMAKE_CURRENT_LIST_DIR}") - message(STATUS "Skipping ${MODULE_NAME} during prescan, adding faux libraries: ${__SPACE_LIST_TARGETS}") - return() - endif() + if (NOT CMAKE_SYSTEM_NAME IN_LIST __CHECKER) + get_module_name("${CMAKE_CURRENT_LIST_DIR}") + message(STATUS "Platform ${CMAKE_SYSTEM_NAME} not supported for module ${MODULE_NAME}") + return() + endif() endmacro() ####