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

[RDY] cmake: don't override cmakeDir when set #40687

Merged
merged 1 commit into from Jun 3, 2018

Conversation

teto
Copy link
Member

@teto teto commented May 17, 2018

When dontUseCmakeBuildDir is true (aka the default), it overrides
cmakeDir regardless of the package configuration.

While packaging netbee, I needed to both keep dontUseCmakeBuildDir to
true (some hardcoded paths expect the build folder) and set cmakeDir
(since CMakeList.txt was in a subfolder) which proved impossible.
Here is the fix.

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: cmake

Partial log (click to expand)

shrinking /nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2/bin/cpack
shrinking /nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2/bin/cmake
shrinking /nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2/bin/ctest
strip is /nix/store/j75dgadrff2d1fyc4fczmcgqkid2imdx-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2/bin
patching script interpreter paths in /nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2
/nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2/share/cmake-3.10/Modules/CPack.STGZ_Header.sh.in: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2/share/cmake-3.10/Modules/Squish4RunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
/nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2/share/cmake-3.10/Modules/SquishRunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/xn5gv3lpfy91yvfy9b0i7klfcxh9xskz-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/a57cr6qgks9yz7a4mvbbvqwgq1x9rnyf-cmake-3.10.2...

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: cmake

Partial log (click to expand)

shrinking /nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2/bin/cpack
shrinking /nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2/bin/ctest
shrinking /nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2/bin/cmake
strip is /nix/store/jk6j4lh9v5mvjdbdc35sj0zffhhf6s56-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2/bin
patching script interpreter paths in /nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2
/nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2/share/cmake-3.10/Modules/CPack.STGZ_Header.sh.in: interpreter directive changed from "/bin/sh" to "/nix/store/l4w7xwjy2nmk31fl5kgyy7gg8z7l9n8z-bash-4.4-p19/bin/sh"
/nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2/share/cmake-3.10/Modules/Squish4RunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/l4w7xwjy2nmk31fl5kgyy7gg8z7l9n8z-bash-4.4-p19/bin/sh"
/nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2/share/cmake-3.10/Modules/SquishRunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/l4w7xwjy2nmk31fl5kgyy7gg8z7l9n8z-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/5swiv9yffrx052zmdfis55kwglyb64sl-cmake-3.10.2...

@teto teto changed the title cmake: don't override cmakeDir when set [RDY] cmake: don't override cmakeDir when set May 17, 2018
Copy link
Member

@LnL7 LnL7 left a comment

Choose a reason for hiding this comment

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

Looks good to me, but this should go to staging first.

When dontUseCmakeBuildDir is true (aka the default), it overrides
cmakeDir regardless of the package configuration.

While packaging netbee, I needed to both keep dontUseCmakeBuildDir to
true (some hardcoded paths expect the build folder) and set cmakeDir
(since CMakeList.txt was in a subfolder) which proved impossible.
Here is the fix.
@teto teto changed the base branch from master to staging May 20, 2018 05:18
@GrahamcOfBorg
Copy link

Success on x86_64-linux (full log)

Attempted: cmake

Partial log (click to expand)

shrinking /nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2/bin/cmake
shrinking /nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2/bin/ctest
shrinking /nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2/bin/cpack
strip is /nix/store/mgyvr3kil9qv0mywikpi0dbli061bpg4-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2/bin
patching script interpreter paths in /nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2
/nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2/share/cmake-3.10/Modules/SquishRunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/3r4wp5drzynkz6hccmjpifkzwgqbs5nb-bash-4.4-p19/bin/sh"
/nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2/share/cmake-3.10/Modules/CPack.STGZ_Header.sh.in: interpreter directive changed from "/bin/sh" to "/nix/store/3r4wp5drzynkz6hccmjpifkzwgqbs5nb-bash-4.4-p19/bin/sh"
/nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2/share/cmake-3.10/Modules/Squish4RunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/3r4wp5drzynkz6hccmjpifkzwgqbs5nb-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/0mi0j5iw3q5q18xrxsq1j0fwk99s06ak-cmake-3.10.2...

@teto
Copy link
Member Author

teto commented May 20, 2018

I hadn't realize I could change the branch myself. It's done.

@GrahamcOfBorg
Copy link

Success on aarch64-linux (full log)

Attempted: cmake

Partial log (click to expand)

shrinking /nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2/bin/cpack
shrinking /nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2/bin/ctest
shrinking /nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2/bin/cmake
strip is /nix/store/8yfik687kfccisxnad42j19lfb7ij9b4-binutils-2.30/bin/strip
stripping (with command strip and flags -S) in /nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2/bin
patching script interpreter paths in /nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2
/nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2/share/cmake-3.10/Modules/CPack.STGZ_Header.sh.in: interpreter directive changed from "/bin/sh" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/sh"
/nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2/share/cmake-3.10/Modules/Squish4RunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/sh"
/nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2/share/cmake-3.10/Modules/SquishRunTestCase.sh: interpreter directive changed from "/bin/sh" to "/nix/store/vnb8q2h7951gd551nm2vq2g6n8296g5b-bash-4.4-p19/bin/sh"
checking for references to /build in /nix/store/ipwrqln1ln9d8gsb1mm75rymwwl3lqw6-cmake-3.10.2...

@teto
Copy link
Member Author

teto commented May 25, 2018

@LnL7 is that ok ?

@orivej orivej merged commit a6809c0 into NixOS:staging Jun 3, 2018
@teto teto deleted the cmake_cmakedir_fix branch May 13, 2020 09:50
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.

None yet

4 participants