Alexander Mario
Alexander Mario

Reputation: 23

How to show the configuration of my CMake?

I'm looking for a command like cmake --features or cmake --config which shows me how my CMake executable was built. For example, I want to know weather the flags like --system-bzip2 really did get used and check the paths to the libraries CMake uses.

I am not interested in knowing what features are available on which CMake version, but which options were actually used in the build.

Upvotes: 2

Views: 5095

Answers (2)

usr1234567
usr1234567

Reputation: 23324

To find out, which libraries are used for the compiling of your CMake executable, I see three ways, as there is no --feature or --config provided by CMake.

  1. Check the output of CMake's configure run. For most libraries, it indicates the path to the library.

  2. Check the CMakeCache.txt within the build directory. You can find out the library paths

  3. When you build CMake, call make VERBOSE=ON and check the output.

Upvotes: 2

roalz
roalz

Reputation: 2788

As far as I know, there's no such a feature in the CMake executable.
You should check your CMake version toward the official documentation to check whether a given feature is included in that version.
There's a nice tool, written in CMake language, that automates this work, you can find more info here.

Upvotes: 0

Related Questions