Skip to content

Commit

Permalink
Try to add /std:c++latest on Windows.
Browse files Browse the repository at this point in the history
Otherwise;
```
D:\a\fasm\fasm\src\ParseFasm.cpp(296,29): error C7555: use of designated initializers requires at least '/std:c++latest' [D:\a\fasm\fasm\build\temp.win-amd64-3.6\Release\parse_fasm_tests.vcxproj]
```

Signed-off-by: Tim 'mithro' Ansell <[email protected]>
  • Loading branch information
mithro committed Feb 8, 2021
1 parent 74b9385 commit 40eca87
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ project(parse_fasm)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../third_party/antlr4/runtime/Cpp/cmake)

set(CMAKE_CXX_STANDARD 11)
if (MSVC_VERSION GREATER_EQUAL "1900")
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("/std:c++latest" _cpp_latest_flag_supported)
if (_cpp_latest_flag_supported)
add_compile_options("/std:c++latest")
endif()
endif()

if(ANTLR_RUNTIME_TYPE STREQUAL "static")
# Required if linking to static library
Expand Down

0 comments on commit 40eca87

Please sign in to comment.