2

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.

usr1234567
  • 21,601
  • 16
  • 108
  • 128

2 Answers2

2

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.

usr1234567
  • 21,601
  • 16
  • 108
  • 128
0

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.

Community
  • 1
  • 1
roalz
  • 2,699
  • 3
  • 25
  • 42
  • You know, there is a reason why Florian and I answered in the comments but not (yet) as an answer. – usr1234567 Jan 19 '17 at 13:45
  • @ usr1234567 It would be nice to know what the reason is, thank you. I could delete my answer then. – roalz Jan 19 '17 at 13:46
  • For example, the question was not clear. Your answer does not match the edited question. And I dislike your fasted-gun-in-west style, cf. http://meta.stackexchange.com/questions/9731/fastest-gun-in-the-west-problem – usr1234567 Jan 19 '17 at 14:33
  • 1
    It was clear enough to me, otherwise I would not have answered, right? About your other opinion, well, ok, it's your opinion, and I'm sure the SO mechanisms should take care of this kind of situations. I appreciate your commenting back, thank you. – roalz Jan 19 '17 at 14:36