Skip to content

Add missing DependsOnTargets#6462

Merged
jkoritzinsky merged 1 commit intodotnet:masterfrom
albertvaka:patch-1
Nov 5, 2020
Merged

Add missing DependsOnTargets#6462
jkoritzinsky merged 1 commit intodotnet:masterfrom
albertvaka:patch-1

Conversation

@albertvaka
Copy link
Contributor

@albertvaka albertvaka commented Oct 26, 2020

GetRootCMakeListsDirectory is needed since it defines _NormalizedCMakeListsDirectory which we use for the -S CMake argument. Without it, we were passing an empty string.

Fixes the following No source directory specified for -S error when building winforms:

EXEC : CMake error : No source directory specified for -S [C:\Users\Vaka\winforms\src\System.Windows.Forms\tests\InteropTests\NativeTests\NativeTests.proj]
C:\Users\Vaka\.nuget\packages\microsoft.dotnet.cmake.sdk\5.0.0-beta.20256.5\build\Microsoft.DotNet.CMake.Sdk.targets(172,5): error MSB3073: The command " [C:\Users\Vaka\winforms\src\System.Windows.Forms\tests\InteropTests\NativeTests\NativeTests.proj]
C:\Users\Vaka\.nuget\packages\microsoft.dotnet.cmake.sdk\5.0.0-beta.20256.5\build\Microsoft.DotNet.CMake.Sdk.targets(172,5): error MSB3073:        [C:\Users\Vaka\winforms\src\System.Windows.Forms\tests\InteropTests\NativeTests\NativeTests.proj]
C:\Users\Vaka\.nuget\packages\microsoft.dotnet.cmake.sdk\5.0.0-beta.20256.5\build\Microsoft.DotNet.CMake.Sdk.targets(172,5): error MSB3073:        [C:\Users\Vaka\winforms\src\System.Windows.Forms\tests\InteropTests\NativeTests\NativeTests.proj]
C:\Users\Vaka\.nuget\packages\microsoft.dotnet.cmake.sdk\5.0.0-beta.20256.5\build\Microsoft.DotNet.CMake.Sdk.targets(172,5): error MSB3073:        cmake -G "Visual Studio 16 2019" -A Win32 -B "C:\Users\Vaka\winforms\artifacts\obj\NativeTests\x86\Debug" -S "" -DCMAKE_INSTALL_PREFIX=C:\Users\Vaka\winforms\artifacts\bin\NativeTests\x86\Debug [C:\Users\Vaka\winforms\src\System.Windows.Forms\tests\InteropTests\NativeTests\NativeTests.proj]
C:\Users\Vaka\.nuget\packages\microsoft.dotnet.cmake.sdk\5.0.0-beta.20256.5\build\Microsoft.DotNet.CMake.Sdk.targets(172,5): error MSB3073:       " exited with code 1. [C:\Users\Vaka\winforms\src\System.Windows.Forms\tests\InteropTests\NativeTests\NativeTests.proj]

I'm using CMake version 3.17.3.

GetRootCMakeListsDirectory is needed since we use _NormalizedCMakeListsDirectory
@albertvaka
Copy link
Contributor Author

🦗

@albertvaka
Copy link
Contributor Author

@jkoritzinsky since you made changes to this file in the past, maybe you can give this a review?

@jkoritzinsky jkoritzinsky merged commit b3de9a5 into dotnet:master Nov 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants