mintaka
mintaka

Reputation: 1012

What does `/usr/bin/cmake -E cmake_depends "Unix Makefiles" <SOME_PATH>` mean?

Could anyone help explain what /usr/bin/cmake -E cmake_depends "Unix Makefiles" <SOME_PATH> means? I couldn't find the description of cmake_depends on cmake.org...

Thanks in advance.

Upvotes: 3

Views: 1866

Answers (1)

usr1234567
usr1234567

Reputation: 23394

As cmake_depends is not documented in the documentation, I would call it an internal interface, that should not be used by users. If you use it, it might fail with any new version without any warning or deprecation period.

Grepping through CMake's source code reveals the following comments, which might help you.

CMake/Source/cmMakefileTargetGenerator.cxx:

// Generate a call this signature:
//
//   cmake -E cmake_depends <generator>
//                          <home-src-dir> <start-src-dir>
//                          <home-out-dir> <start-out-dir>
//                          <dep-info> --color=$(COLOR)
//
// This gives the dependency scanner enough information to recreate

CMake/Source/cmcmd.cxx:

// Full signature:
//
//   -E cmake_depends <generator>
//                    <home-src-dir> <start-src-dir>
//                    <home-out-dir> <start-out-dir>
//                    <dep-info> [--color=$(COLOR)]
...
// Support older signature for existing makefiles:
//
//   -E cmake_depends <generator>
//                    <home-out-dir> <start-out-dir>
//                    <dep-info>
//
// Just pretend the source directories are the same as the
// binary directories so at least scanning will work.

Upvotes: 3

Related Questions