From 120e8672473ade7c4bdb84f65cd4f7ddebcbc668 Mon Sep 17 00:00:00 2001 From: Lubosz Sarnecki Date: Fri, 3 Oct 2025 15:30:58 +0200 Subject: [PATCH] spec/build: Don't specify version controlled header as BYPRODUCTS. This resolves an issue of the isa.h header being incorrectly regenerated when invoking the build a second time using the Ninja generator. This resulted in a broken build due to isa_disassembler being undefined in the regenerated header. Due to differences in CMake generators regarding to BYPRODUCS, the issue was not reproducible using the Unix Makefile generator https://cmake.org/cmake/help/latest/command/add_custom_target.html In general BYPRODUCTS is not intended to overwrite version controlled source files. This fixes issue #144. --- specification/aie2ps/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/specification/aie2ps/CMakeLists.txt b/specification/aie2ps/CMakeLists.txt index 2e55f6575..889474ded 100644 --- a/specification/aie2ps/CMakeLists.txt +++ b/specification/aie2ps/CMakeLists.txt @@ -8,7 +8,6 @@ add_custom_target(cpp-assembler-stubs ${AIEBU_SOURCE_DIR}/specification/aie2ps/isa-spec.yaml ${AIEBU_SOURCE_DIR}/templates/aie2ps generate_cpp_assembler_stubs > ${AIEBU_SOURCE_DIR}/specification/aie2ps/isa.h - BYPRODUCTS ${AIEBU_SOURCE_DIR}/specification/aie2ps/isa.h WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} SOURCES ${AIEBU_SOURCE_DIR}/specification/spec_tool.py ${AIEBU_SOURCE_DIR}/specification/aie2ps/isa-spec.yaml