Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix MSVC errors #180

Merged
merged 2 commits into from
Nov 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ elseif(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
# GCC's arry bounds, maybe uninitialized, and restrict warning seems to have false positives.
target_compile_options(lexy_dev INTERFACE -Wno-array-bounds -Wno-maybe-uninitialized -Wno-restrict)
elseif(MSVC)
target_compile_options(lexy_dev INTERFACE /WX /W3 /D _CRT_SECURE_NO_WARNINGS /wd5105)
target_compile_options(lexy_dev INTERFACE /WX /W3 /D _CRT_SECURE_NO_WARNINGS /wd5105 /utf-8)
endif()

# Link to have FILE I/O.
Expand Down
1 change: 0 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ target_compile_definitions(lexy_test_base PUBLIC LEXY_TEST)
if(MSVC AND NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang")
target_compile_options(lexy_test_base PUBLIC
/Zc:preprocessor # need a conforming preprocessor for stringifying escape characters
"/utf-8" # use utf-8 instead of current code page
/bigobj # some of the object files are really big for some reason
)
endif()
Expand Down
2 changes: 1 addition & 1 deletion tests/lexy/detail/string_view.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ constexpr auto fn()

TEST_CASE("make_cstr")
{
constexpr auto str = lexy::_detail::make_cstr<+fn>;
constexpr auto str = lexy::_detail::make_cstr<&fn>;
foonathan marked this conversation as resolved.
Show resolved Hide resolved
REQUIRE(str == lexy::_detail::string_view("ab"));
}

Loading