diff -r -c antlr4-4.6.orig/runtime/Cpp/CMakeLists.txt antlr4-4.6/runtime/Cpp/CMakeLists.txt *** antlr4-4.6.orig/runtime/Cpp/CMakeLists.txt 2016-12-15 20:25:36.000000000 -0200 --- antlr4-4.6/runtime/Cpp/CMakeLists.txt 2017-02-03 04:14:13.447920200 -0200 *************** *** 107,111 **** add_subdirectory(demo) endif(WITH_DEMO) ! install(FILES License.txt README.md VERSION DESTINATION "share/doc/libantlr4") --- 107,119 ---- add_subdirectory(demo) endif(WITH_DEMO) ! if( EXISTS LICENSE.txt) ! install(FILES LICENSE.txt DESTINATION "share/doc/libantlr4") + elseif(EXISTS ../../LICENSE.txt) + install(FILES ../../LICENSE.txt + DESTINATION "share/doc/libantlr4") + endif() + + install(FILES README.md VERSION + DESTINATION "share/doc/libantlr4") diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/CMakeLists.txt antlr4-4.6/runtime/Cpp/runtime/CMakeLists.txt *** antlr4-4.6.orig/runtime/Cpp/runtime/CMakeLists.txt 2016-12-15 20:25:36.000000000 -0200 --- antlr4-4.6/runtime/Cpp/runtime/CMakeLists.txt 2017-02-03 04:14:13.447920200 -0200 *************** *** 59,75 **** # TODO: test in windows. DLL is treated as runtime. # see https://cmake.org/cmake/help/v3.0/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR} ! COMPILE_FLAGS "${disabled_compile_warnings}") set_target_properties(antlr4_static PROPERTIES VERSION ${ANTLR_VERSION} SOVERSION ${ANTLR_VERSION} OUTPUT_NAME antlr4-runtime ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR} ! COMPILE_FLAGS "${disabled_compile_warnings}") install(TARGETS antlr4_shared ! DESTINATION lib) install(TARGETS antlr4_static ARCHIVE DESTINATION lib) --- 59,78 ---- # TODO: test in windows. DLL is treated as runtime. # see https://cmake.org/cmake/help/v3.0/prop_tgt/LIBRARY_OUTPUT_DIRECTORY.html RUNTIME_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR} ! COMPILE_FLAGS "${disabled_compile_warnings}" ! COMPILE_DEFINITIONS "ANTLR4CPP_EXPORTS") set_target_properties(antlr4_static PROPERTIES VERSION ${ANTLR_VERSION} SOVERSION ${ANTLR_VERSION} OUTPUT_NAME antlr4-runtime ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR} ! COMPILE_FLAGS "${disabled_compile_warnings}" ! COMPILE_DEFINITIONS "ANTLR4CPP_EXPORTS;ANTLR4CPP_STATIC") install(TARGETS antlr4_shared ! DESTINATION lib ! RUNTIME DESTINATION bin) install(TARGETS antlr4_static ARCHIVE DESTINATION lib) diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/src/antlr4-common.h antlr4-4.6/runtime/Cpp/runtime/src/antlr4-common.h *** antlr4-4.6.orig/runtime/Cpp/runtime/src/antlr4-common.h 2016-12-15 20:25:36.000000000 -0200 --- antlr4-4.6/runtime/Cpp/runtime/src/antlr4-common.h 2017-02-03 04:14:13.447920200 -0200 *************** *** 36,41 **** --- 36,42 ---- // Defines for the Guid class and other platform dependent stuff. #ifdef _WIN32 + #ifdef _MSC_VER #pragma warning (disable: 4250) // Class inherits by dominance. #pragma warning (disable: 4512) // assignment operator could not be generated *************** *** 43,48 **** --- 44,50 ---- // Before VS 2015 code like "while (true)" will create a (useless) warning in level 4. #pragma warning (disable: 4127) // conditional expression is constant #endif + #endif #define GUID_WINDOWS *************** *** 69,75 **** --- 71,79 ---- #endif #endif + #ifdef _MSC_VER class ANTLR4CPP_PUBLIC std::exception; // Needed for VS 2015. + #endif #elif __APPLE__ #define GUID_CFUUID diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/src/ANTLRFileStream.cpp antlr4-4.6/runtime/Cpp/runtime/src/ANTLRFileStream.cpp *** antlr4-4.6.orig/runtime/Cpp/runtime/src/ANTLRFileStream.cpp 2016-12-15 20:25:36.000000000 -0200 --- antlr4-4.6/runtime/Cpp/runtime/src/ANTLRFileStream.cpp 2017-02-03 04:14:13.463544300 -0200 *************** *** 20,26 **** return; } ! #ifdef _WIN32 std::ifstream stream(antlrcpp::s2ws(fileName), std::ios::binary); #else std::ifstream stream(fileName, std::ios::binary); --- 20,26 ---- return; } ! #ifdef _MSC_VER std::ifstream stream(antlrcpp::s2ws(fileName), std::ios::binary); #else std::ifstream stream(fileName, std::ios::binary); diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/src/support/Any.h antlr4-4.6/runtime/Cpp/runtime/src/support/Any.h *** antlr4-4.6.orig/runtime/Cpp/runtime/src/support/Any.h 2016-12-15 20:25:36.000000000 -0200 --- antlr4-4.6/runtime/Cpp/runtime/src/support/Any.h 2017-02-03 04:14:13.463544300 -0200 *************** *** 9,15 **** #include "antlr4-common.h" ! #ifdef _WIN32 #pragma warning(push) #pragma warning(disable: 4521) // 'antlrcpp::Any': multiple copy constructors specified #endif --- 9,15 ---- #include "antlr4-common.h" ! #ifdef _MSC_VER #pragma warning(push) #pragma warning(disable: 4521) // 'antlrcpp::Any': multiple copy constructors specified #endif *************** *** 139,144 **** } // namespace antlrcpp ! #ifdef _WIN32 #pragma warning(pop) #endif --- 139,144 ---- } // namespace antlrcpp ! #ifdef _MSC_VER #pragma warning(pop) #endif diff -r -c antlr4-4.6.orig/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp antlr4-4.6/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp *** antlr4-4.6.orig/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp 2016-12-15 20:25:36.000000000 -0200 --- antlr4-4.6/runtime/Cpp/runtime/src/tree/pattern/ParseTreePatternMatcher.cpp 2017-02-03 04:18:45.432636000 -0200 *************** *** 100,106 **** throw e; #else } catch (std::exception & /*e*/) { ! std::throw_with_nested("Cannot invoke start rule"); // Wrap any other exception. We should however probably use one of the ANTLR exceptions here. #endif } --- 100,106 ---- throw e; #else } catch (std::exception & /*e*/) { ! std::throw_with_nested((const char*)"Cannot invoke start rule"); // Wrap any other exception. We should however probably use one of the ANTLR exceptions here. #endif }