Skip to content

Conversation

MakeDecisionWorth
Copy link
Contributor

This commit is to prevent tests\test-grammar-integration.cpp(483,13): error C2001: newline in constant showing up in non-UTF8 windows system while using MSVC.

@github-actions github-actions bot added the build Compilation issues label Oct 21, 2024
CMakeLists.txt Outdated
add_compile_definitions(_CRT_SECURE_NO_WARNINGS)
endif()

if (NOT GGML_CUDA)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the reason for disabling this with GGML_CUDA? Shouldn't these changes only apply to C/C++ sources anyway?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's because these changes will cause cuda failed to build.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this work?

if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
    add_compile_options("$<$<COMPILE_LANGUAGE:C>:/source-charset:utf-8>")
    add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:/source-charset:utf-8>")
    add_compile_options("$<$<COMPILE_LANGUAGE:C>:/execution-charset:utf-8>")
    add_compile_options("$<$<COMPILE_LANGUAGE:CX>:/execution-charset:utf-8>")
endif()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It works.

@slaren slaren merged commit 342397d into ggml-org:master Nov 19, 2024
54 checks passed
arthw pushed a commit to arthw/llama.cpp that referenced this pull request Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Compilation issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants