Skip to content

Commit 069ab34

Browse files
tautschnigrurban
authored andcommitted
Rename yyalloc to avoid duplicate definitions with LTO
This is for CMake only as we haven't currently got an LTO set-up for Makefile builds.
1 parent 53d4fb5 commit 069ab34

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ macro(generic_bison name)
2323
endif()
2424

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

0 commit comments

Comments
 (0)