Skip to content

Commit

Permalink
fix for #147
Browse files Browse the repository at this point in the history
Added NOMINMAX option for building with MSVC
Set C++ standard to C++20
  • Loading branch information
Ingo Berg committed Dec 10, 2024
1 parent d9e2df6 commit 4f1ed2a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# CMake based on work from @xantares
cmake_minimum_required (VERSION 3.15.0)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

# By default, build in Release mode. Must appear before project() command
Expand Down Expand Up @@ -28,6 +28,7 @@ endif()

# Credit: https://stackoverflow.com/questions/2368811/how-to-set-warning-level-in-cmake/3818084
if(MSVC)
add_compile_definitions(NOMINMAX)
# Force to always compile with W4
if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
Expand Down
2 changes: 1 addition & 1 deletion include/muParserDef.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ namespace mu
static const int MaxLenExpression = 20000;
static const int MaxLenIdentifier = 100;
static const string_type ParserVersion = string_type(_T("2.3.4 (Develop)"));
static const string_type ParserVersionDate = string_type(_T("20231224"));
static const string_type ParserVersionDate = string_type(_T("20241210"));
} // end of namespace

#if defined(_MSC_VER)
Expand Down

0 comments on commit 4f1ed2a

Please sign in to comment.