Skip to content

Commit

Permalink
Patch exprtk on Clang (#3971)
Browse files Browse the repository at this point in the history
  • Loading branch information
tresf authored Nov 14, 2017
1 parent 231cc82 commit 28a4eb2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions plugins/Xpressive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_rtl_io_file")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Dexprtk_disable_rtl_vecops")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WERROR_FLAGS} -fexceptions")

# See https://github.com/ArashPartow/exprtk/pull/9
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
EXECUTE_PROCESS(COMMAND patch exprtk/exprtk.hpp exprtk.hpp.patch
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_QUIET)
ENDIF()

IF(LMMS_BUILD_WIN32)
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wa,-mbig-obj -Dexprtk_disable_enhanced_features")
ENDIF()
Expand Down
13 changes: 13 additions & 0 deletions plugins/Xpressive/exprtk.hpp.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/exprtk.hpp b/exprtk.hpp
index 916e74b..ae7de24 100644
--- a/exprtk.hpp
+++ b/exprtk.hpp
@@ -1962,7 +1962,7 @@ namespace exprtk
template <typename T>
inline bool string_to_real(const std::string& s, T& t)
{
- const typename numeric::details::number_type<T>::type num_type;
+ typename numeric::details::number_type<T>::type num_type;

const char_t* begin = s.data();
const char_t* end = s.data() + s.size();

0 comments on commit 28a4eb2

Please sign in to comment.