Skip to content
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

Look for matching Conan profile in a config file for the running VS configuration #100

Merged
merged 9 commits into from
Jun 27, 2019

Conversation

jgsogo
Copy link

@jgsogo jgsogo commented Jun 26, 2019

The extension looks into a file conan.config.json for a Conan profile name associated with the Visual Studio configuration. This file is searched first in the same directory as the VS Project, and then in any parent directory.

The format for this file (it should be extensible in the future):

{  
   "configurations": {  
      "Release|Win32": "release_win32",
      "Debug|x64": "debug_x64",
      "Release|Win64": "C:/conan/profiles/release_win64"
   }
}

Under the "configurations" key there is a dictionary with the correspondence between the VS configuration (key, on the left) and a Conan profile (value, on the right). To take into account:

  • VS creates the configuration name joining with a | character the name of the Configuration and the Platform.
    image
  • For Conan profiles, the value declared will be used verbatim for the --profile argument in the conan install command, and rules related to profile lookup applies.

closes #88
related to #5 (first iteration)

@jgsogo jgsogo added this to the 1.1.0 milestone Jun 26, 2019
@jgsogo jgsogo requested a review from SSE4 June 26, 2019 10:30
@jgsogo
Copy link
Author

jgsogo commented Jun 26, 2019

Please, @SSE4 , review again and test the functionality. I think it could be almost ready. 😸

@jgsogo jgsogo marked this pull request as ready for review June 27, 2019 08:41
@jgsogo jgsogo mentioned this pull request Jun 27, 2019
@SSE4
Copy link

SSE4 commented Jun 27, 2019

I think it deserves an example project with:

  1. custom configuration names
  2. json config file
  3. profiles for it

@jgsogo
Copy link
Author

jgsogo commented Jun 27, 2019

Very basic example added, check it works as expected (using the visual_studio generator #108). Thanks

@SSE4
Copy link

SSE4 commented Jun 27, 2019

works for me, please un-draft the PR

@SSE4 SSE4 merged commit b2fe093 into conan-io:dev Jun 27, 2019
@jgsogo jgsogo deleted the feature/profile-match branch June 27, 2019 11:10
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.

Support mapping of configuration names -> build_type
2 participants