Andy Li
Andy Li

Reputation: 6034

What is the cmake build directory used by debuild?

I'm packaging a software (neko) for Debian. The software uses CMake for building. I already have everything setup and it builds nicely. Now, I want to add some additional tests on top of the upstream tests, so I override dh_auto_test in debian/rules as follows:

override_dh_auto_test:
    dh_auto_test
    cd <build_dir> && ./bin/nekotools boot test.n && ./bin/test

The problem is that I don't know what is the CMake build directory (<build_dir> as written above) thus cannot figure out the paths to the build outputs. Is there a variable that points to the build directory?

Upvotes: 3

Views: 1136

Answers (1)

Andy Li
Andy Li

Reputation: 6034

I find out that I can specify the build directory as follows:

%:
    dh $@ --builddirectory=foo

It is mentioned in the dh manpage.

However, I still would like to know whether there is a variable that stores the build directory even if I'm not using --builddirectory...

Upvotes: 3

Related Questions