Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Add sample CMake configuration for VS #8108

Closed
wants to merge 1 commit into from
Closed

Add sample CMake configuration for VS #8108

wants to merge 1 commit into from

Conversation

kant2002
Copy link
Contributor

This allows to view native cmponents inside VS CMake Targets view without much efforts.
I try to mimic setup for gen-buildsys-win.bat for Windows only.
Maybe maintaining this file in addition to gen-buildsys-win.bat then it can be found his place in the documentation somewhere.
I prefer to work inside Visual Studio and having such file significantly improve discoverability for native components from which CoreRT made up of.

image

This allows to view native cmponents inside VS CMake Targets view without much efforts.
I try to mimic setup for `gen-buildsys-win.bat` for Windows only.
Maybe maintaining this file in addition to `gen-buildsys-win.bat` then it can be found his place in the documentation somewhere.
I prefer to work inside Visual Studio and having such file significantly improve discoverability for native components from which CoreRT made up of.
@MichalStrehovsky
Copy link
Member

I prefer to work inside Visual Studio and having such file significantly improve discoverability for native components from which CoreRT made up of.

Yup, me too. CMake also generates a CoreRT.sln file in bin\obj\Native\Windows_NT.x64.Debug - I've been using that. Is this better? (I didn't know about CMakeSettings.json until today.)

@kant2002
Copy link
Contributor Author

I cannot say that this is significantly better, but it is more it make VS refresh CMake for you, so you don't have to do that. Modify CMakeList.txt, press Ctrl+S - Boom! its in the Solution explorer. That interactivity definitely improve my understanding of CMake.

Reason why I add this file was following. I know about CMake Targets view and willing to use it, but it was breaking due to fact that CLR_CMAKE_TARGET_ARCH was required. Which require me to look at CMake file then jump across 2 bat files to properly setup buildRoot and installRoot.

If you never heard about CMAke Targets view lookup, it definitely important to C++ development from my C# point of view 😄 . You can even target Linux targets using WSL, so maybe it will help you in some scenarios too.

I definitely can add more configurations, but willing to receive positive feedback.

@jkotas
Copy link
Member

jkotas commented Oct 15, 2020

This repo is going to be archived soon (#8366). The discussion on this can continue in dotnet/runtime#40049 in the context of dotnet/runtime repo.

@jkotas jkotas closed this Oct 15, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants