CMake: Add include guards when IMPORT_BBA_FILES is used (#1438)

This commit is contained in:
Miodrag Milanović 2025-01-23 10:54:37 +01:00 committed by GitHub
parent 1623243d50
commit e12093201a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 21 additions and 6 deletions

View File

@ -1,4 +1,6 @@
include(FindTrellis)
if (NOT IMPORT_BBA_FILES)
include(FindTrellis)
endif()
set(SOURCES
arch.cc

View File

@ -1,4 +1,6 @@
include(FindApycula)
if (NOT IMPORT_BBA_FILES)
include(FindApycula)
endif()
set(SOURCES
arch.cc

View File

@ -1,4 +1,6 @@
include(FindApycula)
if (NOT IMPORT_BBA_FILES)
include(FindApycula)
endif()
set(SOURCES
constids.inc

View File

@ -1,4 +1,6 @@
include(FindIceStorm)
if (NOT IMPORT_BBA_FILES)
include(FindIceStorm)
endif()
set(SOURCES
arch.cc

View File

@ -1,4 +1,6 @@
include(FindTrellis)
if (NOT IMPORT_BBA_FILES)
include(FindTrellis)
endif()
set(SOURCES
arch.cc
@ -36,6 +38,9 @@ message(STATUS "Enabled MachXO2/XO3 devices: ${MACHXO2_DEVICES}")
configure_file(machxo2_available.h.in ${CMAKE_CURRENT_BINARY_DIR}/machxo2_available.h)
target_sources(nextpnr-${family}-core PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/machxo2_available.h)
target_include_directories(nextpnr-${family}-core INTERFACE ${CMAKE_CURRENT_BINARY_DIR})
if (BUILD_GUI)
target_include_directories(nextpnr-${family}-gui PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
endif()
foreach (device ${MACHXO2_DEVICES})
if (NOT device IN_LIST ALL_MACHXO2_DEVICES)

View File

@ -1,4 +1,6 @@
include(FindOxide)
if (NOT IMPORT_BBA_FILES)
include(FindOxide)
endif()
set(SOURCES
arch.cc