#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@…): I did some very very basic testing, but I couldn't get the code to work in the way it was written even after removing the typos and obvious problems. I suspect the problem is that {{{ if {${cmake.build_out_of_source}} { }}} is only evaluated once. And the setting {{{ cmake.build_out_of_source true }}} after importing the PortGroup has no effect whatsoever. I assume that this should be a procedure rather than a setting. Here's a draft that worked for me with at least one port: {{{ options cmake.build_out_of_source option_proc cmake.build_out_of_source cmake._set_out_of_source_build proc cmake._set_out_of_source_build {option action args} { global workpath worksrcpath configure.dir build.dir if {"set" ne ${action}} { return } if {${args} eq "true"} { configure.dir ${workpath}/build build.dir ${configure.dir} # standard post-arg, where the primary CMakeLists.txt file can be found configure.post_args ${worksrcpath} # create the build directory post-extract { file mkdir ${build.dir} } } } }}} I was copy-pasting from another PortGroup, so I'm not sure if I actually got all the bits and pieces right. -- Ticket URL: <https://trac.macports.org/ticket/33259#comment:20> MacPorts <https://www.macports.org/> Ports system for OS X