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

Clang compiler settings break clang-cl compilation on windows #207

Closed
fknfilewalker opened this issue Jul 18, 2024 · 3 comments
Closed

Clang compiler settings break clang-cl compilation on windows #207

fknfilewalker opened this issue Jul 18, 2024 · 3 comments

Comments

@fknfilewalker
Copy link
Contributor

Environment

  • OS: Windows
  • Compiler clang-cl
@syoyo syoyo closed this as not planned Won't fix, can't repro, duplicate, stale Jul 19, 2024
@syoyo
Copy link
Owner

syoyo commented Jul 19, 2024

You should describe details

@fknfilewalker
Copy link
Contributor Author

fknfilewalker commented Jul 19, 2024

Oh yes sorry

In the cmake the following line gets executed when the compiler used is clang.

set_source_files_properties(${TINYEXR_SOURCES} PROPERTIES COMPILE_FLAGS "-Weverything -Werror -Wno-padded -Wno-c++98-compat-pedantic -Wno-documentation -Wno-unused-member-function")

The problem here is that there are some warnings that get turned into errors now on the windows side making the code not compile with clang-cl.

So either we fix the code in tinyexr.cc so that these warnings/errors for windows get resolved or we deactivate these compiler flags for clang-cl on windows.

@syoyo
Copy link
Owner

syoyo commented Jul 19, 2024

Ah, o=it is needed to wrap it with MSVC to detect clang-cl.

if (MSVC) 
  if (CMAKE_CXX_COMPILER_ID SQTEQUAL "Clang")
    // clang-cl
  else() 
    // cl.exe
  endif()
endif ()

You can contribute! PR is much appreciated.

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

No branches or pull requests

2 participants