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

[BUILD] OpenVDB passes gcc style flags to MSVC #1546

Closed
LazyDodo opened this issue Dec 11, 2022 · 1 comment
Closed

[BUILD] OpenVDB passes gcc style flags to MSVC #1546

LazyDodo opened this issue Dec 11, 2022 · 1 comment

Comments

@LazyDodo
Copy link

Environment

Operating System: Win10
Version / Commit SHA: VDB 10.0
CMake Version: 3.24.2
Compiler: msvc 2019

Describe the problem

When setting -DOPENVDB_SIMD=SSE42 OpenVDB's cmake passes the GCC style flags directly to MSVC over in CMakeLists.txt@386

To Reproduce

Steps to reproduce the behavior:

  1. Build with -DOPENVDB_SIMD=SSE42 or -DOPENVDB_SIMD=AVX with MSVC
  2. cl : Command line warning D9002: ignoring unknown option '-msse4.2' [c:\db\build\S\VS1564D\openvdb.vcxproj]

Additional context

MSVC doesn't have a flag for SSE42, but if you call the sse42 intrinsics like openvdb does the right opcodes will still be generated, AVX can be enabled with /arch:AVX source

@Idclip
Copy link
Contributor

Idclip commented Sep 25, 2023

Hey @LazyDodo thanks for reporting this, this has now been fixed #1645 (though as an aside, the way we handle hardware instrumentation in general isn't correct and we're planning of restructuring this in the future)

@Idclip Idclip closed this as completed Sep 25, 2023
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