Questions tagged [out-of-source]

16 questions
12
votes
1 answer

How to do an out of source build with scons?

I have been using cmake to build my projects out of source, which is really convenient as you avoid polluting your source directory with unnecessary files. Assuming the CMakeLists.txt is in the current directory, this could be done as…
D R
  • 21,936
  • 38
  • 112
  • 149
3
votes
1 answer

How do I prevent qmake creating an extra "moc" folder in this 'out of source' build scenario?

(Apologies, I can't think of a better way of explaining except through including the following detail) Pre-build structure: F:\ └ Project\ └ Project.pro └ ProjectSettings.pri └ Source\ └ Source.pro └ My_Library\ └ My_Library.pro …
Samuel Harmer
  • 4,264
  • 5
  • 33
  • 67
3
votes
3 answers

Proper way to get an out-of source build in multi-part cmake project

I use cmake to build, test and install my project. My way is a little crude: I use a scripts like this to get an out-of-source build: DIR=debug_build && rm -fr ./${DIR} && mkdir -p ${DIR} && cd ${DIR} && cmake -D CMAKE_BUILD_TYPE=Debug $@ .. && make…
Łukasz Lew
  • 48,526
  • 41
  • 139
  • 208
2
votes
2 answers

Getting the compiler to find a Cmake-created file

I'm using the configure_file command in Cmake in a feature availability check as described on this page. That page suggests using the command like this: configure_file(config.h.in config.h) which will translate…
David Z
  • 128,184
  • 27
  • 255
  • 279
2
votes
1 answer

Out of source builds in Eclipse

Is this possible to compile a project out of its source directory using eclipse/autotools? I need to keep source tree clean. What I already tried: Changing directory at: Project properties -> C/C++ builds -> Build directory. (Default value is…
sorush-r
  • 10,490
  • 17
  • 89
  • 173
2
votes
2 answers

CMake: cannot compile out of source project with subprojects

I have a project (with 3 subprojects) with CMake that builds perfectly when I execute cmake in the same directory as the top CMakeLists.txt. But when I try an out of source build I get the following…
1
vote
1 answer

add_subdirectory for cmake tensorflow lite fails on subsequent runs

I am trying to include tensorflow-lite in a project per the minimal example here: Build TensorFlow Lite with CMake. Specifically, I'm trying to add_subdirectory the CMakeLists.txt for tflite, as recommended. This works when the project is first…
1
vote
1 answer

Linker error with out of source build in Qt 5

I am having problems linking a test project; this is the error: DataGUI.obj:-1: error: LNK2019: unresolved external symbol "public: __cdecl GuiUtilities::TreeModel::TreeModel(class QObject *)" (??0TreeModel@GuiUtilities@@QEAA@PEAVQObject@@@Z)…
Pietro
  • 12,086
  • 26
  • 100
  • 193
1
vote
1 answer

Unit-testing a boost::python library in python

So I have a shared library created with boost::python (C++). For the C++ functions inside I have unit-tests that check that they are working. Now I would like to use unit-test to see if I implemented the python interface correctly. For this I…
NOhs
  • 2,780
  • 3
  • 25
  • 59
1
vote
0 answers

How to run `ant` in an out of source way?

Trying to build an Android application, I got to the step where I have to run ant. The process fails with the following logs: ... [echo] ---------- [echo] Building Libraries with 'release'... [subant] No sub-builds to iterate…
Pietro
  • 12,086
  • 26
  • 100
  • 193
1
vote
1 answer

makepp: how to manage several builds with common source dir?

I have a source tree: /bootloader /firmware /system and want to manage two separate builds for firmware and bootloader, each of them using common system sources but compiles them differently (i.e. with its own set of options). Builds must be…
Artem Pisarenko
  • 123
  • 1
  • 2
  • 13
1
vote
3 answers

cmake: problems with out of tree build

With my current CMakeLists.txt files, I can build my project with: sourceDir> cmake -G "MinGW Makefiles" . from the source directory. However I cannot get an out-of-tree build: buildDir> cmake -G "MinGW Makefiles" ..\MyProg This is the…
Pietro
  • 12,086
  • 26
  • 100
  • 193
0
votes
1 answer

In Meson, can I avoid to continuously jump from the source to the build directory and back?

To do an out-of-source build in Meson: cd /path/to/source/ mkdir ../builddir Then: cd /path/to/source/ meson ../builddir cd ../builddir ninja Is it possible to do anything like this (from builddir): meson --pathToSource ../source //…
Pietro
  • 12,086
  • 26
  • 100
  • 193
0
votes
1 answer

How to tell cmake to generate different default targets for out-of-source-builds?

How can I write a CMakeLists.txt file that accepts different out-of-source builds? I'm not talking about Debug and Release, but more about something like one build for remote testing one for local testing, etc. For example: If I go into the…
Bastian Venthur
  • 12,515
  • 5
  • 44
  • 78
0
votes
1 answer

Change CMake build Directory

I would like to change the Working Directory of cmake. For example currently when I run the cmake from c/ directory where is the CMakeLists.txt, this will be the created directories and files: c/CMakeFiles/ c/implementation/ c/cmake_install //…
tobias88
  • 121
  • 1
  • 6
1
2