Re: [MacPorts] #33259: cmake portgroup: out of source build option, possibly by default
#33259: cmake portgroup: out of source build option, possibly by default ---------------------------+-------------------------------- Reporter: ryandesign@… | Owner: macports-tickets@… Type: enhancement | Status: new Priority: Normal | Milestone: Component: ports | Version: Resolution: | Keywords: Port: | ---------------------------+-------------------------------- Comment (by mojca@…): Replying to [comment:36 michaelld@…]:
Would someone post the "current final" patch so that I can try it out?
I used cal's patch with the mentioned minor modification for `configure.post_args` (and using `yes/no` as the default value is still debatable): {{{ #!patch --- cmake-1.0.tcl (revision 133872) +++ cmake-1.0.tcl (working copy) @@ -134,3 +134,27 @@ if {[string first "--enable-debug" ${configure.args}] > -1} { configure.args-delete --enable-debug } + +options cmake.out_of_source +default cmake.out_of_source yes + +options cmake.build_dir +default cmake.build_dir {${workpath}/build} + +proc _cmake_get_build_dir {} { + global cmake.out_of_source cmake.build_dir + + if {${cmake.out_of_source}} { + return ${cmake.build_dir} + } else { + return ${worksrcpath} + } +} + +pre-configure { + file mkdir ${configure.dir} +} + +default configure.dir {[_cmake_get_build_dir]} +default configure.post_args {${worksrcpath}} +default build.dir {${configure.dir}} }}} Replying to [comment:37 rjvbertin@…]:
The patch is in comment 22, though it claims to be w.r.t a revision 133760 while according to my svn cmake-1.0.tcl is still at rev. 129400 ...
The patch was probably a result of "`svn diff`" which gives you the revision of the checkout, at least in my case. I wouldn't bother with the number being too high.
And shouldn't the `default configure.post_args` be set the same way the default `${configure.dir} `is set, i.e. as a function of `${cmake.out_of_source}`? (= left unspecified when `!${cmake.out_of_source}?)`
I don't see what could go wrong if the value is always specified. The value should be correct even when building in the same tree where the sources are. -- Ticket URL: <https://trac.macports.org/ticket/33259#comment:39> MacPorts <https://www.macports.org/> Ports system for OS X
participants (1)
-
MacPorts