NVIDIAGameWorks/RayTracingDenoiser

Unconditional modification of CMAKE_MSVC_RUNTIME_LIBRARY

ch45er opened this issue · 4 comments

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):

if (MSVC)
set (CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif ()

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

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 ()

Yes, that works for me.

Will be included in the next update.

Fixed in v4.4.0.