• Brad King's avatar
    CSharp: Fix regression in VS project type selection for custom target · a56edad6
    Brad King authored
    A target created by `add_custom_target` should always be a `.vcxproj`
    file even if it has `.cs` sources involved in custom commands and such.
    The latter case was broken by refactoring in commit v3.12.0-rc1~160^2~7
    (remove TargetIsCSharpOnly() and use methods from cmGeneratorTarget,
    2018-03-19).  The reason is that the `HasLanguage` method added by
    commit v3.12.0-rc1~239^2~6 (cmGeneratorTarget: add HasLanguage() as
    wrapper for GetLanguages(), 2018-03-19) does not check the target type
    and so is not a suitable check for deciding the project file extension.
    
    The `HasLanguage` method was an attempt at an abstraction that turns
    out not to work very well.  Replace it with a dedicated `IsCSharpOnly`
    method that considers the target type, sources, and non-transitive
    `LINKER_LANGUAGE`.
    
    Fixes: #18515
    a56edad6
Name
Last commit
Last update
.github Loading commit data...
Auxiliary Loading commit data...
Help Loading commit data...
Licenses Loading commit data...
Modules Loading commit data...
Packaging Loading commit data...
Source Loading commit data...
Templates Loading commit data...
Tests Loading commit data...
Utilities Loading commit data...
.clang-format Loading commit data...
.clang-tidy Loading commit data...
.gitattributes Loading commit data...
.gitignore Loading commit data...
.hooks-config Loading commit data...
CMakeCPack.cmake Loading commit data...
CMakeCPackOptions.cmake.in Loading commit data...
CMakeGraphVizOptions.cmake Loading commit data...
CMakeLists.txt Loading commit data...
CMakeLogo.gif Loading commit data...
CONTRIBUTING.rst Loading commit data...
CTestConfig.cmake Loading commit data...
CTestCustom.cmake.in Loading commit data...
CompileFlags.cmake Loading commit data...
Copyright.txt Loading commit data...
DartConfig.cmake Loading commit data...
README.rst Loading commit data...
bootstrap Loading commit data...
cmake_uninstall.cmake.in Loading commit data...
configure Loading commit data...
doxygen.config Loading commit data...