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
fix generators_folder relative path to conanfile #9668
Merged
lasote
merged 19 commits into
conan-io:develop
from
memsharded:fix/generators_folder_relative
Oct 5, 2021
Merged
Changes from 18 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
27163b5
fix generators_folder relative path to conanfile
memsharded f4b63a1
define generators_folder for package command
memsharded 2a7baa0
change new CMake.install to use cmake --install feature
memsharded 34b5400
quote path with spaces
memsharded 80a2913
condition to layout() and apply same to imports_folder
memsharded 16a327c
wip
memsharded 7981928
Merge branch 'fix/package_command_layout' into fix/generators_folder_…
memsharded caa35f4
wip
memsharded e4c8a21
apply cmd_build layout only if not test
memsharded a3b4cce
wip
memsharded 031b144
wip
memsharded c1ea176
marking test to use cmake 3.20
memsharded 0c041d0
Merge branch 'develop' into fix/generators_folder_relative
memsharded 6bd4c83
keep legacy test_package layout
memsharded d4cc34d
wip
memsharded 934a5c1
wip
memsharded 1266f9b
wip
memsharded 8f0c603
lets try again cmake 3.19 for iOS build
memsharded 931ded6
review
memsharded File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -453,7 +453,7 @@ def export_pkg(self, conanfile_path, name, channel, source_folder=None, build_fo | |
export_pkg(self.app, recorder, new_ref, source_folder=source_folder, | ||
build_folder=build_folder, package_folder=package_folder, | ||
install_folder=install_folder, graph_info=graph_info, force=force, | ||
remotes=remotes) | ||
remotes=remotes, source_conanfile_path=conanfile_path) | ||
if lockfile_out: | ||
lockfile_out = _make_abs_path(lockfile_out, cwd) | ||
graph_lock_file = GraphLockFile(graph_info.profile_host, graph_info.profile_build, | ||
|
@@ -617,7 +617,8 @@ def install(self, path="", name=None, version=None, user=None, channel=None, | |
generators=generators, | ||
no_imports=no_imports, | ||
recorder=recorder, | ||
require_overrides=require_overrides) | ||
require_overrides=require_overrides, | ||
conanfile_path=os.path.dirname(conanfile_path)) | ||
|
||
if lockfile_out: | ||
lockfile_out = _make_abs_path(lockfile_out, cwd) | ||
|
@@ -796,10 +797,19 @@ def package(self, path, build_folder, package_folder, source_folder=None, instal | |
else: | ||
package_folder = _make_abs_path(package_folder, cwd, default=build_folder) | ||
|
||
conanfile.folders.set_base_build(build_folder) | ||
conanfile.folders.set_base_source(source_folder) | ||
conanfile.folders.set_base_package(package_folder) | ||
conanfile.folders.set_base_install(install_folder) | ||
if hasattr(conanfile, "layout"): | ||
dir_path = os.path.dirname(conanfile_path) | ||
conanfile.folders.set_base_generators(dir_path) | ||
conanfile.folders.set_base_build(dir_path) | ||
conanfile.folders.set_base_source(dir_path) | ||
# FIXME: this is bad, but conanfile.folders.package=xxx is broken atm, cant be used | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please, explain. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I mean, I don't understand why/what is broken. |
||
conanfile.folders.set_base_package(os.path.join(dir_path, "package")) | ||
conanfile.folders.set_base_install(install_folder) | ||
else: | ||
conanfile.folders.set_base_build(build_folder) | ||
conanfile.folders.set_base_source(source_folder) | ||
conanfile.folders.set_base_package(package_folder) | ||
conanfile.folders.set_base_install(install_folder) | ||
|
||
# Use the complete package layout for the local method | ||
if conanfile.folders.package: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
The
--install
command line argument isn't available in earlier versions of the CMake, it was probably introduced only in CMake 3.15. Please consider changing the call back to a build call with theinstall
target.