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 @@
if (NOT IMPORT_BBA_FILES)
include(FindTrellis) include(FindTrellis)
endif()
set(SOURCES set(SOURCES
arch.cc arch.cc

View File

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

View File

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

View File

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

View File

@ -1,4 +1,6 @@
if (NOT IMPORT_BBA_FILES)
include(FindTrellis) include(FindTrellis)
endif()
set(SOURCES set(SOURCES
arch.cc 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) 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_sources(nextpnr-${family}-core PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/machxo2_available.h)
target_include_directories(nextpnr-${family}-core INTERFACE ${CMAKE_CURRENT_BINARY_DIR}) 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}) foreach (device ${MACHXO2_DEVICES})
if (NOT device IN_LIST ALL_MACHXO2_DEVICES) if (NOT device IN_LIST ALL_MACHXO2_DEVICES)

View File

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