-
Notifications
You must be signed in to change notification settings - Fork 297
Adding WindowsML CMake samples #519
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: feature/winml-stable
Are you sure you want to change the base?
Adding WindowsML CMake samples #519
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this repo support git-lfs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It hasn't opt'd in yet for anything. I should probably have an orthogonal PR to see if that's an OK dependency to take.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I filed #538. I won't complete this 'til that's in. I'll take a look at sending a PR shortly.
@@ -0,0 +1 @@ | |||
__* No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm doing something wrong because this has no effect on a local clone & build. I'm seeing all the build/* content as well as the __* dirs still listed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I'm not sure what could be going on... it's all good on my end. The file was missing it's final new-line... Perhaps that was it? Added it just in case.
a286ec1
to
a6d064e
Compare
a6d064e
to
52ce69a
Compare
Description
This PR adds some CMake samples for WindowsML. There's a few moving parts, so there's things to be discussed. Having a PR for folks to try out and get a "stake in the ground" should make things easier.
The samples need to add NuGet support to CMake, so I'm proposing that infrastructure, too. At the minute, that content is hosted in a personal repo - https://github.com/mschofie/NuGetCMakePackage - that would need to be moved somewhere more appropriate before this PR could be completed. That repo teaches CMake how to restore NuGet packages, and look for CMake scripts within those packages, allowing a NuGet package to have functional parity with MSBuild builds. Since the NuGet packages that I need to consume don't have CMake scripts within, the 'NuGetCMakePackage' infrastructure allows for 'overlay' files that are present as a stop-gap until I can migrate the content appropriately. I've created a PR for the NuGet infrastructure here if folks want to ask questions, or comment on the implementation.
Beyond the NuGet changes, the samples build two C++ console applications with CMake, using 'Visual Studio 17 2022' and 'Ninja Multi-Config' generators. The NuGet support is added through:
include(FetchContent) FetchContent_Declare( CMakeNuGetPackage GIT_REPOSITORY https://github.com/mschofie/NuGetCMakePackage GIT_TAG 208b05d3482e19c81a970b4191af8cd92b0dd5d4 ) FetchContent_MakeAvailable(CMakeNuGetPackage)
Then NuGet dependencies are created with - for example:
Having called
add_nuget_packages
, the NuGet packages are findable throughfind_package
:After which a CMake target is introduced with the same name that can be consumed by the CMake build, for example:
Feedback on any aspect - sample, naming conventions, approach, etc.. - is really appreciated.
Checklist
Note that /azp run currently isn't working for this repo.