From 43078ef71316b2a8ff41192f4092f83e554c3d53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Risto=20Peja=C5=A1inovi=C4=87?= Date: Thu, 10 Oct 2024 22:19:26 +0200 Subject: [PATCH] fix modelsim compile_definitions --- cmake/sim/modelsim/modelsim.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/sim/modelsim/modelsim.cmake b/cmake/sim/modelsim/modelsim.cmake index d36fc0b..f92cb10 100644 --- a/cmake/sim/modelsim/modelsim.cmake +++ b/cmake/sim/modelsim/modelsim.cmake @@ -148,8 +148,15 @@ function(modelsim IP_LIB) list(APPEND MODELSIM_COMP_TARGETS ${IP_LIB}_modelsim_compile_lib) endif() + get_ip_compile_definitions(COMP_DEFS ${IP_LIB} VHDL SYSTEMVERILOG VERILOG) + + foreach(def ${COMP_DEFS}) + list(APPEND CMP_DEFS_ARG +${def}) + endforeach() + set(__VSIM_CMD vsim ${LIB_ARGS} + ${CMP_DEFS_ARG} -c ${LIBRARY}.${ARG_TOP_MODULE} -do "run -all\; quit"