Skip to content

Feature/cmake vs toolsets - #8815

Merged
czoido merged 14 commits into
conan-io:developfrom
memsharded:feature/cmake_vs_toolsets
Apr 21, 2021
Merged

czoido merged 14 commits into
conan-io:developfrom
memsharded:feature/cmake_vs_toolsets

Conversation

@memsharded

@memsharded memsharded commented Apr 15, 2021

Copy link
Copy Markdown
Member

Changelog: Feature: CMakeToolchain generates a conanbuild.json file with the generator to be used in the CMake command line later, so it is not necessary to duplicate logic, and is explicit what generator should be used.
Changelog: Feature: CMakeToolchain learned to build with different toolsets, down to the minor compiler version, for the msvc compiler.
Docs: conan-io/docs#2079

Close #8809

@memsharded memsharded added this to the 1.36 milestone Apr 15, 2021
@memsharded
memsharded requested a review from lasote April 15, 2021 22:52
jgsogo and others added 6 commits April 20, 2021 23:38
* Return 'deprecated' attribute in 'conan inspect' command

* fix tests
* Build all package when --build= is listed

If Conan install uses --build= it means all packages
must be built. If another package is listed too, it doesn't matter.
e.g conan install foo/0.1@ --build= --build=bar, where bar is
dependency. As --build= listed, all packages will be built from sources

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Argument value None is a valid entry

When passing --build= or --build they should be
the same, but actually they are considered different.
--build= means "", --build means None

However it's not intuitive if you are building a package:
conan install <ref> --build OR
conan install <ref> --build=

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate build parameter

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Revert last 3 commits

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate graph build mode

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Add test for ignore build package

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Accept skipped build package

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Fix empty argument validation

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate build message

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* transform namespace.build in a list

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Improve build argument filter

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Update --build help description

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* conan-io#8442 Replace --build=! by --build-exclude

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* fix broken arg

* same behavior as --build --build=pattern

* more test

* conan-io#8442 Add --build=! command help

Signed-off-by: Uilian Ries <uilianries@gmail.com>

Co-authored-by: James <james@conan.io>
…#8826)

* check service context

* add unittests

* fix import
@czoido
czoido merged commit 6070b2f into conan-io:develop Apr 21, 2021
@memsharded
memsharded deleted the feature/cmake_vs_toolsets branch April 21, 2021 09:32
memsharded added a commit to memsharded/conan that referenced this pull request Apr 22, 2021
* wip

* wip

* working

* remove dead unittest

* CMake() needs CMakeToolchain

* fix tests

* minor refactor get_generator_platform

* Return 'deprecated' attribute in 'conan inspect' command (conan-io#8832)

* Return 'deprecated' attribute in 'conan inspect' command

* fix tests

* Exclude a package when building all from sources (conan-io#8483)

* Build all package when --build= is listed

If Conan install uses --build= it means all packages
must be built. If another package is listed too, it doesn't matter.
e.g conan install foo/0.1@ --build= --build=bar, where bar is
dependency. As --build= listed, all packages will be built from sources

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Argument value None is a valid entry

When passing --build= or --build they should be
the same, but actually they are considered different.
--build= means "", --build means None

However it's not intuitive if you are building a package:
conan install <ref> --build OR
conan install <ref> --build=

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate build parameter

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Revert last 3 commits

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate graph build mode

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Add test for ignore build package

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Accept skipped build package

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Fix empty argument validation

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate build message

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* transform namespace.build in a list

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Improve build argument filter

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Update --build help description

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* conan-io#8442 Replace --build=! by --build-exclude

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* fix broken arg

* same behavior as --build --build=pattern

* more test

* conan-io#8442 Add --build=! command help

Signed-off-by: Uilian Ries <uilianries@gmail.com>

Co-authored-by: James <james@conan.io>

* fix develop

* Check Artifactory service context for conan_build_info --v2 (conan-io#8826)

* check service context

* add unittests

* fix import

* use json file!

Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
czoido added a commit that referenced this pull request Apr 26, 2021
* removing gcc, visual, and msbuild old generators

* removing more deprecated stuff

* fixing more tests

* fix export manifests test

* removing more legacy

* fixing tests

* fix test (#8840)

* Feature/cmake vs toolsets (#8815)

* wip

* wip

* working

* remove dead unittest

* CMake() needs CMakeToolchain

* fix tests

* minor refactor get_generator_platform

* Return 'deprecated' attribute in 'conan inspect' command (#8832)

* Return 'deprecated' attribute in 'conan inspect' command

* fix tests

* Exclude a package when building all from sources (#8483)

* Build all package when --build= is listed

If Conan install uses --build= it means all packages
must be built. If another package is listed too, it doesn't matter.
e.g conan install foo/0.1@ --build= --build=bar, where bar is
dependency. As --build= listed, all packages will be built from sources

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Argument value None is a valid entry

When passing --build= or --build they should be
the same, but actually they are considered different.
--build= means "", --build means None

However it's not intuitive if you are building a package:
conan install <ref> --build OR
conan install <ref> --build=

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate build parameter

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Revert last 3 commits

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate graph build mode

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Add test for ignore build package

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Accept skipped build package

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Fix empty argument validation

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Validate build message

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* transform namespace.build in a list

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Improve build argument filter

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Update --build help description

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* #8442 Replace --build=! by --build-exclude

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* fix broken arg

* same behavior as --build --build=pattern

* more test

* #8442 Add --build=! command help

Signed-off-by: Uilian Ries <uilianries@gmail.com>

Co-authored-by: James <james@conan.io>

* fix develop

* Check Artifactory service context for conan_build_info --v2 (#8826)

* check service context

* add unittests

* fix import

* use json file!

Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>

* fix new environment files with spaces in path (#8847)

* fixed win tests

Co-authored-by: Carlos Zoido <mrgalleta@gmail.com>
Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
Co-authored-by: Uilian Ries <uilianries@gmail.com>
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.

[feature] Handle different VS versions and toolsets in new CMakeToolchain

5 participants