Skip to content

Conversation

dankmeme01
Copy link
Contributor

@dankmeme01 dankmeme01 commented Feb 26, 2025

When using the library with Clang on Windows (not clang-cl and not MSYS2), an error is thrown by the compiler:

clang: error: no such file or directory: '/permissive-'

This is caused by these lines in CMakeLists.txt:

if(MSVC_VERSION GREATER 1910)
  target_compile_options(fast_float INTERFACE /permissive-)
endif()

Clang on Windows defines MSVC_VERSION, but does not support MSVC-like compiler flags. This PR adds an extra check to make sure the flag is only added when the used compiler supports it.

Presumably fixes #304, although it seems that CI only has MSYS2 Clang and MSVC Clang-cl workflows, neither of which are impacted by this issue, so I've only verified that it works on my machine.

@lemire
Copy link
Member

lemire commented Feb 26, 2025

Running tests.

@lemire lemire merged commit 8e5e92b into fastfloat:main Mar 9, 2025
37 checks passed
@lemire
Copy link
Member

lemire commented Mar 9, 2025

This will be part of the next release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

flags for Windows
2 participants