summaryrefslogtreecommitdiff
path: root/src/parser/CMakeLists.txt
diff options
context:
space:
mode:
authorMathias Preiner <mathias.preiner@gmail.com>2018-09-18 17:20:25 -0700
committerMathias Preiner <mathias.preiner@gmail.com>2018-09-22 16:30:59 -0700
commited8d326cbdec820d347d8b4b5ee7b23c3367d169 (patch)
treef5cb0da35a74e1e1155849e97fc6c644072c054b /src/parser/CMakeLists.txt
parent4a96ecb64741a78b6e138c75fcd7155058658849 (diff)
cmake: Add support for cross-compiling for Windows.
Diffstat (limited to 'src/parser/CMakeLists.txt')
-rw-r--r--src/parser/CMakeLists.txt10
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()
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback