Questions tagged [build-system]

Build systems are software tools designed to automate the process of program compilation.

Build systems are software tools designed to automate the process of program compilation. Build systems come in various forms, and are used for a variety of software build tasks. Their primary goal is to efficiently create executables and libraries.

At their core, build systems are functional based languages mapping a set of source resources (in most cases, files) to a target (executable). The primary assumption of the build system is that each of the build actions are idempotent. That is, each invocation of a build command with the same input and options will create the same output. This assumption allows the build system to memorize the actions that is has already performed, and only perform build actions on resources that have changed.

409 questions
4
votes
2 answers

How to customize cmake output

For example, when compiling .c files, I want cmake to just print CC xxx.c to stdout, like linux kbuild.
Kang Jianbin
  • 73
  • 1
  • 5
4
votes
2 answers

CMake add_subdirectory()

Introduction: I am trying to use CMake to obtain cross platform compilation scripts (for VS 9.0 on a Windows32 and Makefiles for Unix). I am experiencing something i can't understand about add_subdirectory(). Let me show you my code : Context: My…
jmartel
  • 2,771
  • 4
  • 24
  • 27
4
votes
1 answer

Build Systems for Embedded Linux

I work on a device that uses Embedded Linux. In the near future this device is going to probably turn into a product family and a few more devices (i.e. hardware platforms) are going to added to the mix. These devices will be similar but may have…
waffleman
  • 4,159
  • 10
  • 39
  • 63
4
votes
2 answers

How can I tell meson in which directories to look for dependencies?

I am coming from CMake to meson. I like to work in isolated environments using conda. This way I can control which packages are installed for each project. Now, In cmake I would pass -DCMAKE_FIND_ROOT_PATH=$CONDA_PREFIX in order to root the search…
Avi Shukron
  • 6,088
  • 8
  • 50
  • 84
4
votes
1 answer

gn scripts are run with the wrong Python version ("a bytes-like object is required, not 'str'")

When building Chromium or libwebrtc with gn on macOS (Catalina 10.15), I get errors from the Python build scripts about bytes and str. For example: src [heads/master●] % gn gen out/ios_64 --args='target_os="ios" target_cpu="arm64"' ERROR at…
Lynn
  • 10,425
  • 43
  • 75
4
votes
2 answers

How to untangle parallel make -j compiler messages?

When I use make -j to parallelize compilation commands, (unsurprisingly) any compiler messages (warnings/errors) from concurrent commands get interleaved. I'm wondering if there's a way to untangle these messages. For example, with make -j I might…
Alec Jacobson
  • 6,032
  • 5
  • 51
  • 88
4
votes
5 answers

iOS Xcode 10 How to fix broken "New build system" - build.db: database is locked Possibly there are two concurrent builds

I'm having problem with the infamous: "/Users/n/Library/Developer/Xcode/DerivedData/Build/Intermediates/XCBuildData/build.db": database is locked Possibly there are two concurrent builds running in the same filesystem location How do I fix…
Alex Stone
  • 46,408
  • 55
  • 231
  • 407
4
votes
3 answers

Referring to built files in html using module bundlers

I'm using the Gulp to build my SCSS, Pug and ES6 assets for my static website. I know it's possible to hash file names and output the files in a different directory. For my specific example: my Pug markdown are found in the ~/src/pages directory…
Bas
  • 2,106
  • 5
  • 21
  • 59
4
votes
7 answers

Understanding C++ Compilation

I have recently become aware that I have no idea, genericly speaking, how a c/c++ compiler works. I will admit this initialy came from trying to understand header guards but came to the realization that I am lacking in how compiling works. Take…
Chad Harrison
  • 2,836
  • 4
  • 33
  • 50
4
votes
1 answer

how to add a third party library as a package in Yocto build

I have a library that is not famous and there is no package available for this library https://github.com/dailab/libsml normally I install this library on my device by doing make install How can I add this library as a package in my distribution of…
Ahmad Karim
  • 459
  • 1
  • 6
  • 17
4
votes
1 answer

How does ninja detect which files to rebuild?

I have a directory containing a repo and a build folder. The build folder contains the complete build of objects, as triggered using ninja. I want thousands of copies of this directory where just one source file will be different between copies. I'm…
Phlox Midas
  • 4,093
  • 4
  • 35
  • 56
4
votes
4 answers

CMake How to check target for build

I have tried to find solution: How to check target for build ? Consider the following CMake script: cmake_minimum_required(VERSION 3.5.1) project(cppTests) # How to check at this point the target of build if(TARGET "cppTests") message(STATUS…
Denis Kotov
  • 857
  • 2
  • 10
  • 29
4
votes
1 answer

In OCaml, two third party libraries expose same module name. Failure to link

My project is using ctypes library and markup library. When compile, it gives following complain: Error: Files /Users/Young/.opam/4.02.1/lib/markup/markup.cmxa and /Users/Young/.opam/4.02.1/lib/ctypes/ctypes.cmxa both define a module…
Oliver Young
  • 578
  • 1
  • 4
  • 12
4
votes
2 answers

Configuring Xcode project to be built with specific build tools version

In my build system, I am using xcodebuild to build multiple projects. I want to configure different Xcode installation to be used per project. I know about sudo xcode-select --switch , but: This option is system-wide, and might mess up with…
Elist
  • 5,313
  • 3
  • 35
  • 73
4
votes
1 answer

When defining external dependencies in meson, can you add search paths?

When defining a target in meson, you can declare dependencies on external projects using the following syntax: zdep = dependency('zlib', version : '>=1.2.8') exe = executable('zlibprog', 'prog.c', dependencies : zdep) This checks the standard…
oz10
  • 153,307
  • 27
  • 93
  • 128