diff options
Diffstat (limited to 'src/parser')
-rw-r--r-- | src/parser/CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/parser/CMakeLists.txt b/src/parser/CMakeLists.txt index b18573fe5..6cde56c62 100644 --- a/src/parser/CMakeLists.txt +++ b/src/parser/CMakeLists.txt @@ -95,3 +95,13 @@ target_compile_definitions(cvc4parser PRIVATE -D__BUILDING_CVC4PARSERLIB) target_link_libraries(cvc4parser cvc4 ${ANTLR_LIBRARIES}) target_include_directories(cvc4parser PRIVATE ${ANTLR_INCLUDE_DIR}) install(TARGETS cvc4parser DESTINATION lib) + +# The generated lexer/parser files define some functions as +# __declspec(dllexport) via the ANTLR3_API macro, which leads to lots of +# unresolved symbols when linking against libcvc4parser. +# -Wl,--export-all-symbols makes sure that all symbols are exported when +# building a DLL. +if(CVC4_WINDOWS_BUILD) + set_target_properties(cvc4parser + PROPERTIES LINK_FLAGS "-Wl,--export-all-symbols") +endif() |