CMAKE_MSVCIDE_RUN_PATH: Ignored unless a language is enabled
The implementation is guarded by MSVC_IDE
, but that is only set here when a language is enabled using a MSVC-like compiler.
For example:
cmake_minimum_required(VERSION 3.20)
project(Issue22343 LANGUAGES NONE)
set(CMAKE_MSVCIDE_RUN_PATH "${CMAKE_SOURCE_DIR}")
add_custom_target(example COMMAND echo)
The PATH
is not set inside example.vcxproj
. Adding set(MSVC_IDE 1)
works around the problem.