Questions tagged [waf]

Waf is a Python-based framework for configuring, compiling and installing applications. It derives from the concepts of other build tools such as Scons, Autotools, CMake or Ant. If your question is about AWS WAF, use [amazon-waf] instead. If your question is about web application firewall, use [web-application-firewall] instead.

More information about the Waf project can be found at the following locations.

Help is also available:

  • on the waf-users mailing list
  • on IRC (#waf on freenode, with searchable, archived logs here).
309 questions
3
votes
1 answer

how to organize fixture data and access them from tests in C/C++

How do I compute the path to data fixtures files in test code, given: test/{main.cpp,one_test.cpp,two_test.cpp} compilation done in build/ test/fixtures/{conf_1.cfg} The problem I'm facing is as follows: /* in test/one_test.cpp */ TEST_CASE(…
foudfou
  • 976
  • 6
  • 11
3
votes
3 answers

Why can't waf find a path that exists?

Let's say I have x.y file in /mydir/a/b (on Linux) When I run waf, it does not find the file. def configure(context): pass def build(build_context): build_context(source='/mydir/a/b/x.y', rule='echo ${SRC} > ${TGT}', …
Evgen
  • 194
  • 1
  • 11
3
votes
1 answer

How do I reference a local DLL with Waf in Windows?

Following the example given in The Waf Book, I have the setup described below, which builds a shared lib and a static lib, and then links them to an exe. My system is running Windows 7 with VS2013 MSVC. When I build with the sample wscript, the…
user600838
3
votes
2 answers

Converter - How many should I use? Are there other ways in WPF with MVVM?

I sometimes have labels where the content changes dynamically with the values of some objects. The strings are static though, but they need to be changed accordingly to my attributes. An easy way would be, to implement a converter which takes my…
Frame91
  • 3,670
  • 8
  • 45
  • 89
3
votes
0 answers

different set of flags for subprojects in waf

I'm still struggling with waf for setting up different set of flags for subprojects. I have a structure like this, in which superproject recursed to the subprojects: superproject/wscript libproject/wscript progproject/wscript The problem is…
Germán Diago
  • 7,473
  • 1
  • 36
  • 59
3
votes
2 answers

Is there a way for a program to detect if it was called by MSBuild or not?

I'm looking in the environment but I can't see anything that I could use. Any ideas? I'm trying to submit a patch for in Waf a bug that only appears when running the build under MSBuild (...yes I know, it sounds crazy but we're driving our…
jkp
  • 78,960
  • 28
  • 103
  • 104
3
votes
1 answer

Waf, trouble adding manual dependencies

I have a target in waf, which depends on multiple other files. There is a program which lists those dependencies, and I want to use it, and pass to waf. I.e, if I have a target T, there is a program which lists all the dependencies for T. But I'm…
Ani
  • 1,448
  • 1
  • 16
  • 38
3
votes
1 answer

waf multi-step build - target path

In one of our projects, I have a need to build a library, using waf. The library has multiple steps, like it builds a binary, then executes the binary to generate a few more files, and those files are included in further builds. To run the binary…
Ani
  • 1,448
  • 1
  • 16
  • 38
3
votes
1 answer

Passing extra arguments to Waf script

I am using the Waf build system for my project. There are a few dependencies in my project, that I do not always want to be linked and compiled. I was wondering if there is a way to pass extra arguments to Waf configure and Waf install scripts that…
Ammar Husain
  • 1,789
  • 2
  • 12
  • 26
3
votes
1 answer

Waf PDB output in Windows (MSVC toolset)?

I used to use GDB + Clang, and I'm realizing how much I took stack traces for granted. How does one have Waf generate PDB output in the directory of a built executable? My configuration passes /Zi and /debug flags to the compiler/linker, but the…
user
  • 4,920
  • 3
  • 25
  • 38
3
votes
2 answers

Is is possible for my Waf wscript to call other wscripts in the current directory?

I am building a project with Waf. It has several third-party dependencies, and I would like to build each dependency from my main wscript. My project is organized like this: /boost/ /gtest/ /source/ /waf /wscript /wscript_boost /wscript_gtest Each…
sourcenouveau
  • 29,356
  • 35
  • 146
  • 243
3
votes
1 answer

Processing changed files in WAF script

Is it possible to write a WAF function in wscript file, which will be called while building on every changed file? I want to be able to do the following: Process all input .hpp files by a custom Python function and output them to build folder. If…
Wojciech Danilo
  • 11,573
  • 17
  • 66
  • 132
3
votes
1 answer

WAF: Conflict between MinGW (GCC) and MSVC 2012

I've just run into misery with WAF. I use MinGW-w64 exclusively to build stuff. But, recently, I've installed MSVC 2012 because sometimes it is required to build various small utilities which have some issues when building with MinGW. WAF encourages…
Alexander Shukaev
  • 16,674
  • 8
  • 70
  • 85
3
votes
1 answer

waf 1.7: How do you copy an environment?

I have a waf file that is building several libraries for multiple targets, multiple platforms and, in some cases, multiple architectures. I currently have the environment set up according to waf 1.7's documents for variants like so: def…
Jeff
  • 5,746
  • 4
  • 33
  • 40
3
votes
1 answer

How to build NS-3 to use C++0x/C++11 libraries?

I need to use data structures like unordered_map within my code in network simulator NS-3. It is using waf builder to compile the source code. I am confused that where should I add -std=c++0x to be added to compiler flags? I tried appending it to…
hashtpaa
  • 389
  • 2
  • 11