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

[vcpkg] Add option cmake-args #12877

Merged
merged 11 commits into from
Nov 30, 2020
Merged

Conversation

Neumann-A
Copy link
Contributor

@Neumann-A Neumann-A commented Aug 12, 2020

to pass additional args to the cmake script execution within vcpkg

things users/maintainers might want to pass:
--trace/--trace-expand
CMAKE_MESSAGE_LOG_LEVEL
CMAKE_MESSAGE_INDENT
CMAKE_MESSAGE_CONTEXT_SHOW/ --log-context (If vcpkg would use CMAKE_MESSAGE_CONTEXT)
PORT_DEBUG=ON

@LilyWangL LilyWangL added the category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed label Aug 13, 2020
@LilyWangL
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ras0219
Copy link
Contributor

ras0219 commented Aug 14, 2020

This should probably imply/require --editable.

@Neumann-A
Copy link
Contributor Author

@ras0219 This is not passed to the vcpkg_configure_cmake.
This is added to [DEBUG] CreateProcessW("E:\vcpkg_cache\downloads\tools\cmake-3.17.2-windows\cmake-3.17.2-win32-x86\bin\cmake.exe" <alot of cmake_args> -P "E:\qt_zstd\scripts\ports.cmake")

@ras0219
Copy link
Contributor

ras0219 commented Aug 14, 2020

Sure, but the point is that these options can change the behavior of the package build -- that means they shouldn't be used as a basis for a cached binary tree.

@Neumann-A
Copy link
Contributor Author

Then there needs to be a whitelist for cmake-args which don't imply --editable. (Mainly those vars mentioned in the very first comment.)

@strega-nil
Copy link
Contributor

We had a discussion about this at today's meeting, and our opinion is that:

  1. The option needs to be renamed --x-cmake-args
  2. This needs to imply --editable for now, and we can special case stuff afterwards.

Once those are in, we're up to merge.

@Neumann-A
Copy link
Contributor Author

@strega-nil Done

@strega-nil strega-nil added info:reviewed Pull Request changes follow basic guidelines and removed requires:author-response labels Nov 25, 2020
@strega-nil strega-nil merged commit 3fd7745 into microsoft:master Nov 30, 2020
@strega-nil
Copy link
Contributor

Thanks @Neumann-A

@Neumann-A Neumann-A deleted the pass_cmake_args branch November 30, 2020 18:59
strega-nil pushed a commit to strega-nil/vcpkg that referenced this pull request May 5, 2021
* [vcpkg] Add option cmake-args to pass additional args to the script execution

* apply clang format to install.cpp

* rename command to x-cmake-args

* imply editable if x-cmake-args are not empty.

* don't use bitwise or

* add a definition for CMAKE_SCRIPT_ARG

Co-authored-by: wangli28 <wangli28@beyondsoft.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:vcpkg-feature The issue is a new capability of the tool that doesn’t already exist and we haven’t committed info:reviewed Pull Request changes follow basic guidelines
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants