diff --git a/libs/antlr4.patch b/libs/antlr4.patch new file mode 100644 index 000000000..694dd2e39 --- /dev/null +++ b/libs/antlr4.patch @@ -0,0 +1,43 @@ +diff --git a/runtime/Cpp/runtime/CMakeLists.txt b/runtime/Cpp/runtime/CMakeLists.txt +index a8503bb..11362cf 100644 +--- a/runtime/Cpp/runtime/CMakeLists.txt ++++ b/runtime/Cpp/runtime/CMakeLists.txt +@@ -5,8 +5,8 @@ set(THIRDPARTY_DIR ${CMAKE_BINARY_DIR}/runtime/thirdparty) + set(UTFCPP_DIR ${THIRDPARTY_DIR}/utfcpp) + ExternalProject_Add( + utfcpp +- GIT_REPOSITORY "git://github.com/nemtrif/utfcpp" +- GIT_TAG "v3.1.1" ++ GIT_REPOSITORY "https://github.com/nemtrif/utfcpp" ++ GIT_TAG "v3.2.1" + SOURCE_DIR ${UTFCPP_DIR} + UPDATE_DISCONNECTED 1 + CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${UTFCPP_DIR}/install -Dgtest_force_shared_crt=ON +@@ -118,7 +118,7 @@ set_target_properties(antlr4_static + ARCHIVE_OUTPUT_DIRECTORY ${LIB_OUTPUT_DIR} + COMPILE_FLAGS "${disabled_compile_warnings} ${extra_static_compile_flags}") + +-install(TARGETS antlr4_shared ++install(TARGETS antlr4_shared OPTIONAL + DESTINATION lib + EXPORT antlr4-targets) + install(TARGETS antlr4_static +diff --git a/runtime/Cpp/runtime/src/support/Any.h b/runtime/Cpp/runtime/src/support/Any.h +index 468db98..65a473b 100644 +--- a/runtime/Cpp/runtime/src/support/Any.h ++++ b/runtime/Cpp/runtime/src/support/Any.h +@@ -122,12 +122,12 @@ private: + } + + private: +- template<int N = 0, typename std::enable_if<N == N && std::is_nothrow_copy_constructible<T>::value, int>::type = 0> ++ template<int N = 0, typename std::enable_if<N == N && std::is_copy_constructible<T>::value, int>::type = 0> + Base* clone() const { + return new Derived<T>(value); + } + +- template<int N = 0, typename std::enable_if<N == N && !std::is_nothrow_copy_constructible<T>::value, int>::type = 0> ++ template<int N = 0, typename std::enable_if<N == N && !std::is_copy_constructible<T>::value, int>::type = 0> + Base* clone() const { + return nullptr; + } diff --git a/libs/setup.sh b/libs/setup.sh index 2a91eccba..66b7bf92a 100755 --- a/libs/setup.sh +++ b/libs/setup.sh @@ -164,14 +164,9 @@ file_get_try_double "${primary_urls[antlr4-generator]}" "${secondary_urls[antlr4 antlr4_tag="4.9.2" # v4.9.2 repo_clone_try_double "${primary_urls[antlr4-code]}" "${secondary_urls[antlr4-code]}" "antlr4" "$antlr4_tag" true -# remove shared library from install dependencies -sed -i 's/install(TARGETS antlr4_shared/install(TARGETS antlr4_shared OPTIONAL/' antlr4/runtime/Cpp/runtime/CMakeLists.txt -# fix issue https://github.com/antlr/antlr4/issues/3194 - should update Antlr commit once the PR related to the issue gets merged -sed -i 's/std::is_nothrow_copy_constructible/std::is_copy_constructible/' antlr4/runtime/Cpp/runtime/src/support/Any.h -# replace the utf8cpp version which is used because the older one uses gtest that doesn't -# compile with the newer compilers because of uninitialized variable -# the newer utf8cpp switched to ftest -sed -i 's/v3.1.1/v3.2.1/' antlr4/runtime/Cpp/runtime/CMakeLists.txt +pushd antlr4 +git apply ../antlr4.patch +popd # cppitertools v2.0 2019-12-23 cppitertools_ref="cb3635456bdb531121b82b4d2e3afc7ae1f56d47"