Skip to content

Commit

Permalink
Rename yyalloc to avoid duplicate definitions with LTO
Browse files Browse the repository at this point in the history
This is for CMake only as we haven't currently got an LTO set-up for
Makefile builds.
  • Loading branch information
tautschnig authored and rurban committed Dec 22, 2023
1 parent 3fd599a commit 0bfbcce
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ macro(generic_bison name)
endif()

set(bison_source "${name}_y.tab.cpp")
set_source_files_properties(${bison_source} PROPERTIES COMPILE_FLAGS -Dyyalloc=${name}_yyalloc)
if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${bison_source}")
message(FATAL_ERROR "Generated file ${bison_source} found in source tree. If you previously built with `make`, run `make clean` and try again")
endif()
Expand Down

0 comments on commit 0bfbcce

Please sign in to comment.