NVIDIAGameWorks / RayTracingDenoiser

NVIDIA Ray Tracing Denoiser
Other
504 stars 46 forks source link

Unconditional modification of CMAKE_MSVC_RUNTIME_LIBRARY #72

Closed ch45er closed 8 months ago

ch45er commented 9 months ago

This one is related to #33.

The CMAKE_MSVC_RUNTIME_LIBRARY variable is set unconditionally in the CMake lists, which effectively prohibits passing it as a command line argument (since it gets overwritten in the script): https://github.com/NVIDIAGameWorks/RayTracingDenoiser/blob/067755e96c70d4122342c61a37124111715c4e57/CMakeLists.txt#L64-L66

It would be better to provide a CMake option for this or additionally check if CMAKE_MSVC_RUNTIME_LIBRARY is unspecified at that point.

dzhdanNV commented 9 months ago

Would it be enough to use this?

if (MSVC AND NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
    set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif ()
ch45er commented 9 months ago

Yes, that works for me.

dzhdanNV commented 9 months ago

Will be included in the next update.

dzhdanNV commented 8 months ago

Fixed in v4.4.0.