Boost logo

Boost-Build :

Subject: Re: [Boost-build] Target OS preprocessor macro
From: mareq (mq_at_[hidden])
Date: 2012-09-05 05:41:16


Hi,
interesting, that is probably because I submitted it via Nabble - and
embedded code into some tags to format it correctly, which might not work in
e-mail (sorry for that, I did not realize it before). You should see that
content in source of the (HTML) e-mail, and I am pasting it again here
without formatting marks:

tools/config.jam:

import feature ;
import feature : feature ;

feature define-prefix : : free ;

rule define-target-os ( properties * )
{
  local define-prefix = [ feature.get-values define-prefix : $(properties) ]
;
  if ! $(define-prefix) {
    define-prefix = "" ;
  }
  local target-os = [ feature.get-values target-os : $(properties) ] ;
  return <define>$(define-prefix)TARGET_OS_$(target-os:U) ;
}

Jamroot:

import tools/config.jam ;

project /root
  : requirements
       <define-prefix>MY_PROJECT_
       <conditional>@tools/config.define-target-os
;

Thanks,
.mq.

--
View this message in context: http://boost.2283326.n4.nabble.com/Target-OS-preprocessor-macro-tp4635272p4635287.html
Sent from the Boost - Build mailing list archive at Nabble.com.

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk