Skip to content

Commit

Permalink
CMake: Add include guards when IMPORT_BBA_FILES is used
Browse files Browse the repository at this point in the history
  • Loading branch information
mmicko committed Jan 23, 2025
1 parent 1623243 commit 2c82ebe
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 6 deletions.
4 changes: 3 additions & 1 deletion ecp5/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include(FindTrellis)
if (NOT IMPORT_BBA_FILES)
include(FindTrellis)
endif()

set(SOURCES
arch.cc
Expand Down
4 changes: 3 additions & 1 deletion gowin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include(FindApycula)
if (NOT IMPORT_BBA_FILES)
include(FindApycula)
endif()

set(SOURCES
arch.cc
Expand Down
4 changes: 3 additions & 1 deletion himbaechel/uarch/gowin/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include(FindApycula)
if (NOT IMPORT_BBA_FILES)
include(FindApycula)
endif()

set(SOURCES
constids.inc
Expand Down
4 changes: 3 additions & 1 deletion ice40/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include(FindIceStorm)
if (NOT IMPORT_BBA_FILES)
include(FindIceStorm)
endif()

set(SOURCES
arch.cc
Expand Down
7 changes: 6 additions & 1 deletion machxo2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include(FindTrellis)
if (NOT IMPORT_BBA_FILES)
include(FindTrellis)
endif()

set(SOURCES
arch.cc
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion nexus/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
include(FindOxide)
if (NOT IMPORT_BBA_FILES)
include(FindOxide)
endif()

set(SOURCES
arch.cc
Expand Down

0 comments on commit 2c82ebe

Please sign in to comment.