[MacPorts] #33259: cmake portgroup: out of source build option, possibly by default

MacPorts noreply at macports.org
Tue Mar 10 13:02:13 PDT 2015


#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 rjvbertin@…):

 OK...

 This should do the trick, I think?
 {{{
 diff --git a/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl
 b/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl
 --- a/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl       (revision
 133751)
 +++ b/trunk/dports/_resources/port1.0/group/cmake-1.0.tcl       (working
 copy)
 @@ -134,3 +134,17 @@
  if {[string first "--enable-debug" ${configure.args}] > -1} {
      configure.args-delete     --enable-debug
  }
 +
 +options cmake.build_out_of_source
 +default cmake.build_out_of_source false
 +
 +if {cmake.build_out_of_source} {
 +    # setup all ports using cmake to build in a separate directory from
 the source;
 +    # this setting must be the full directory path
 +    post-extract            { file mkdir ${workpath}/build }
 +
 +    # standard post-arg, where to find the primary CMakeLists.txt file.
 +    default configure.post_args {../${worksrcdir}}
 +    default configure.dir       {${workpath}/build}
 +    default build.dir           {${workpath}/build}
 +}
 }}}

-- 
Ticket URL: <https://trac.macports.org/ticket/33259#comment:14>
MacPorts <https://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list