Skip to content

Commit 8bf34a5

Browse files
authored
FPGA: fix anr cmake file (#1420)
The anr sample cmake file was not allowing to target parts that did not contain the keywords "agilex" or "a10" or "s10". This PR addresses this gap.
1 parent 8e57073 commit 8bf34a5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

DirectProgramming/C++SYCL_FPGA/ReferenceDesigns/anr/src/CMakeLists.txt

+6-4
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@ else()
2121
set(DEVICE_FLAG "S10")
2222
elseif(FPGA_DEVICE_NAME MATCHES ".*agilex.*")
2323
set(DEVICE_FLAG "Agilex")
24-
else()
25-
message(FATAL_ERROR "An unrecognized or custom board was passed, but DEVICE_FLAG was not specified. \
26-
Please make sure you have set -DDEVICE_FLAG=A10, -DDEVICE_FLAG=S10 or \
27-
-DDEVICE_FLAG=Agilex.")
2824
endif()
2925
message(STATUS "Configuring the design with the following target: ${FPGA_DEVICE}")
3026

@@ -38,6 +34,12 @@ else()
3834
endif()
3935
endif()
4036

37+
if(NOT DEFINED DEVICE_FLAG)
38+
message(FATAL_ERROR "An unrecognized or custom board was passed, but DEVICE_FLAG was not specified. \
39+
Please make sure you have set -DDEVICE_FLAG=A10, -DDEVICE_FLAG=S10 or \
40+
-DDEVICE_FLAG=Agilex.")
41+
endif()
42+
4143
# These are Windows-specific flags:
4244
# 1. /EHsc This is a Windows-specific flag that enables exception handling in host code
4345
# 2. /Qactypes Include ac_types headers and link against ac_types emulation libraries

0 commit comments

Comments
 (0)