Skip to content

Test to show issue with editable and cmake layout() - #9057

Merged
memsharded merged 10 commits into
conan-io:developfrom
memsharded:feature/layout_cmake_editable
Jun 10, 2021
Merged

memsharded merged 10 commits into
conan-io:developfrom
memsharded:feature/layout_cmake_editable

Conversation

@memsharded

@memsharded memsharded commented Jun 4, 2021

Copy link
Copy Markdown
Member

Changelog: Feature: New cmake_layout() layout helper to define a multi-platform CMake layout that will work for different generators (ninja, xcode, visual, unix), and is multi-config.
Docs: conan-io/docs#2141

This PR is highlighting one issue regarding the layout() feature: We need information about the CMake generator to know about the layout, as it changes depending on it. It is not good in Visual Studio to go with build/release or build-release and build/debug or build-debug folders, because you get 2 different independent VS projects there, which you cannot switch from the IDE (they are 2 single config projects), and I think this defeats the purpose of editable packages.

I think the problem is solvable, by extracting the information of the generator from the toolchain to a common, reusable place. Maybe it is possible to delay the evaluation of layout() too, that might help in the extraction and reusage of CMake generator info.

#tags: slow

@memsharded
memsharded requested a review from lasote June 8, 2021 22:49
@lasote

lasote commented Jun 9, 2021

Copy link
Copy Markdown
Contributor

Ok, I'm working on it, I'll open a PR for your branch.

@lasote lasote left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, I submited a PR here in case you want to support more generators, memsharded#39

@memsharded memsharded left a comment

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The XCode generator is failing, CMAKE_CXX_COMPILER not defined. It might be necessary to add them to the toolchain or something (an unrelated bug to this PR, maybe).

I removed Ninja multi-config in OSX, it is not installed in CI (or cmake support missing), we can wait to add it too.

The MinGW generator is working for me locally, but fails in CI, not sure why

@memsharded
memsharded requested a review from lasote June 9, 2021 21:06
@lasote

lasote commented Jun 10, 2021

Copy link
Copy Markdown
Contributor

The XCode generator is failing, CMAKE_CXX_COMPILER not defined.

Oh, that is because the 3.19 CMake version is required to work with the newest XCodes.
Other tests are marked as @pytest.mark.tool_cmake(version="3.19") but it will affect all the parametrized.

I removed Ninja multi-config in OSX, it is not installed in CI (or cmake support missing), we can wait to add it too.

Good

The MinGW generator is working for me locally, but fails in CI, not sure why

Check with @czoido , other mingw test are decorated with:

@pytest.mark.tool_mingw64
@pytest.mark.tool_cmake(version="3.16")
@pytest.mark.skipif(platform.system() != "Windows", reason="Mingw test")`

@memsharded
memsharded marked this pull request as ready for review June 10, 2021 09:38
@memsharded
memsharded merged commit 2b07567 into conan-io:develop Jun 10, 2021
@memsharded
memsharded deleted the feature/layout_cmake_editable branch June 10, 2021 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants