CMake/Tests/RunCMake/include_external_msproject/VSCSharpOnlyProject.cmake
Sumit Bhardwaj 7219988b00 VS: Exclude ZERO_CHECK.proj from .sln for include_external_msproject
In `cmGlobalVisualStudio7Generator::WriteTargetsToSolution`, we skip
writing `ZERO_CHECK.proj` to solution file as the check in
`cmGlobalVisualStudioGenerator::IsInSolution` returns `false` for
`ZERO_CHECK`. However, we write ZERO_CHECK to ProjectDependencies for
external projects as there are no checks in
`cmGlobalVisualStudio71Generator::WriteExternalProject`.

Similar to `cmGlobalVisualStudioGenerator::IsInSolution`, we introduce
`IsDepInSolution(const std::string&)` which excludes `ZERO_CHECK.proj`
from being added to sln file for the cases where we have `ZERO_CHECK.proj`.

Fixes: #23708
2022-07-20 08:51:38 -04:00

10 lines
265 B
CMake

project(VSCSharpOnlyProject)
file(COPY
${CMAKE_CURRENT_SOURCE_DIR}/Program.cs
${CMAKE_CURRENT_SOURCE_DIR}/consoleapp.csproj
DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
include_external_msproject(
test "${CMAKE_CURRENT_BINARY_DIR}/consoleapp.csproj")