Cmake host runtime library

Im using cmake to configure a project in visual studio 2019.
Here is part of my project’s cmake file (based on Rebort Mynard’s excellent example):

cmake_minimum_required(VERSION 3.8 FATAL_ERROR)

project(${PROJ_NAME} LANGUAGES CXX CUDA)
set(PROJ_NAME cudaTest)
add_executable(${PROJ_NAME} <some sources....>) 
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} /MT")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} /MTd")
target_compile_features(${PROJ_NAME} PUBLIC cxx_std_11)
target_compile_options(${PROJ_NAME} PUBLIC $<$<COMPILE_LANGUAGE:CUDA>:-gencode arch=compute_75,code=sm_75>) 
set_target_properties( ${PROJ_NAME}
                       PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
set_target_properties(${PROJ_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(${PROJ_NAME} PUBLIC ${CMAKE_CUDA_TOOLKIT_INCLUDE_DIRECTORIES})
target_include_directories(${PROJ_NAME} PUBLIC ../../common/inc) 

The problem is that the “runtime library” property, under CUDA C/C++ in the property sheet, does not inherit its value from the host. It is always set to MultiThreaded Debug DLL and not as I set the host, i.e MultiThreaded Debug.


could not find any reference to how to set this property from cmake. tried using the visual studio build customization’s, with no success.

Please advise.