8000 Building a target under certain circumstances · Issue #70 · vslavik/bakefile · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Building a target under certain circumstances #70

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

Open
refi64 opened this issue Feb 29, 2016 · 4 comments
Open

Building a target under certain circumstances #70

refi64 opened this issue Feb 29, 2016 · 4 comments

Comments

@refi64
Copy link
refi64 commented Feb 29, 2016

I have a situation where there are some targets in a Bakefile that should NOT be built by default. Any way to make it build will work, but I just need some way of having the target NOT be built by default. How should I do this?

@vadz
Copy link
Collaborator
vadz commented Feb 29, 2016

It's not really possible to not build something by default in a MSVS solution, to the best of my knowledge, so I don't think you can do it. You can, of course, only build something for a particular toolset and so not build it at all for "gnu" for example. So maybe you could use a condition involving a variable defined to some non-default value in "gnu" case, e.g. as explained here?

@refi64
Copy link
Author
refi64 commented Feb 29, 2016

@vadz Is there an example of that or something? Or was the here supposed to be a link somewhere?

@vadz
Copy link
Collaborator
vadz commented Feb 29, 2016

Yes, it was -- except I gave a file:// link to my local copy of the docs, surprisingly it didn't work here... I've edited it now, but it's still just a link to the manual, I don't have any examples, don't hesitate to make PRs to the docs if you make it work and want to show others how it can be done.

@refi64
Copy link
Author
refi64 commented Feb 29, 2016

@vadz Well, that's weird... :O

The use case is that a file should only be built if Boost is present. I figured that I could just conditionally define the target via a USE_BOOST setting, but that doesn't work. I'm not sure if what you said would fit this too well...

Side note: in VS toolsets, is it possible to test configurations like:

if ($(config) == MyConfig) {
  sources { a.cpp }
} else {
  sources { b.cpp }
}

I'm guessing it's possible with the GNU ones, but I'm not sure about Visual Studio.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0