mirror of https://github.com/YosysHQ/nextpnr.git
37 lines
1.3 KiB
CMake
37 lines
1.3 KiB
CMake
set(HIMBAECHEL_UARCHES example gowin xilinx ng-ultra)
|
|
|
|
set(HIMBAECHEL_UARCH "" CACHE STRING "Microarchitectures for nextpnr-himbaechel build")
|
|
set_property(CACHE HIMBAECHEL_UARCH PROPERTY STRINGS ${HIMBAECHEL_UARCHES})
|
|
|
|
if (NOT HIMBAECHEL_UARCH)
|
|
message(STATUS "Microarchitecture needs to be set, set desired one with -DHIMBAECHEL_UARCH=xxx")
|
|
message(STATUS "Supported Himbaechel microarchitectures are :")
|
|
message(STATUS " all")
|
|
foreach (item ${HIMBAECHEL_UARCHES})
|
|
message(STATUS " ${item}")
|
|
endforeach()
|
|
message(FATAL_ERROR "Microarchitecture setting is mandatory")
|
|
endif()
|
|
|
|
if (HIMBAECHEL_UARCH STREQUAL "all")
|
|
set(HIMBAECHEL_UARCH ${HIMBAECHEL_UARCHES})
|
|
endif()
|
|
|
|
foreach (uarch ${HIMBAECHEL_UARCH})
|
|
if (NOT uarch IN_LIST HIMBAECHEL_UARCHES)
|
|
message(FATAL_ERROR "Microarchitecture ${uarch} is not a supported Himbaechel microarchitecture")
|
|
endif()
|
|
|
|
add_subdirectory(uarch/${uarch})
|
|
aux_source_directory(uarch/${uarch} HM_UARCH_FILES)
|
|
foreach (target ${family_targets})
|
|
target_sources(${target} PRIVATE ${HM_UARCH_FILES})
|
|
endforeach()
|
|
if (BUILD_TESTS)
|
|
foreach (target ${family_test_targets})
|
|
aux_source_directory(uarch/${uarch}/tests/ HM_UARCH_TEST_FILES)
|
|
target_sources(${target} PRIVATE ${HM_UARCH_TEST_FILES})
|
|
endforeach()
|
|
endif()
|
|
endforeach()
|