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

Print configuration CMake command line #443

Merged
merged 1 commit into from Sep 30, 2019

Conversation

@native-api
Copy link
Contributor

commented Aug 6, 2019

We are using scikit-build in https://github.com/skvark/opencv-python. When something goes wrong, we need to run the exact same CMake invocation with tracing to diagnose. This PR adds printing of it.

Instead of printing the raw argv, shlex.join could be used to produce a copypasteable cmdline. But it's 3.8+

@thewtex thewtex requested a review from jcfr Aug 14, 2019
Co-authored-by: Jean-Christophe Fillion-Robin <jchris.fillionr@kitware.com>
@jcfr

This comment has been minimized.

Copy link
Contributor

commented Sep 27, 2019

Thanks for the contribution 🙏

Instead of printing the raw argv, shlex.join could be used to produce a copypasteable cmdline

Good idea, I improved the existing function def _formatArgsForDisplay to display a properly formatted command.

Here is an example output:

[...]

Configuring Project
  Working directory:
    /home/jcfr/Projects/scikit-build-sample-projects/projects/hello-cpp/_skbuild/linux-x86_64-3.5/cmake-build
  Command:
    cmake /home/jcfr/Projects/scikit-build-sample-projects/projects/hello-cpp -G Ninja -DCMAKE_INSTALL_PREFIX:PATH=/home/jcfr/Projects/scikit-build-sample-projects/projects/hello-cpp/_skbuild/linux-x86_64-3.5/cmake-install -DPYTHON_EXECUTABLE:FILEPATH=/home/jcfr/.virtualenvs/scikit-build-35/bin/python -DPYTHON_VERSION_STRING:STRING=3.5.0+ -DPYTHON_INCLUDE_DIR:PATH=/usr/include/python3.5m -DPYTHON_LIBRARY:FILEPATH=/usr/lib/x86_64-linux-gnu/libpython3.5m.so -DSKBUILD:BOOL=TRUE -DCMAKE_MODULE_PATH:PATH=/home/jcfr/Projects/scikit-build/skbuild/resources/cmake -DCMAKE_BUILD_TYPE:STRING=Release

[...]

I will integrate once the CI completes. Thanks for your patience

@jcfr jcfr merged commit b2d4bc2 into scikit-build:master Sep 30, 2019
7 checks passed
7 checks passed
ci/circleci: python27 Your tests passed on CircleCI!
Details
ci/circleci: python35 Your tests passed on CircleCI!
Details
ci/circleci: python36 Your tests passed on CircleCI!
Details
ci/circleci: python37 Your tests passed on CircleCI!
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
scikit-build.scikit-build #20190927.2 succeeded
Details
@native-api native-api deleted the native-api:print_cmake_cmdline branch Sep 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants
You can’t perform that action at this time.