Message: previous - next
Month: February 2014

Re: [trinity-devel] CMake - get list of ALL variables available to build (take the upper hand)

From: Darrell <darrella@...>
Date: Mon, 24 Feb 2014 15:10:12 -0600
On Mon February 24 2014 2:57:26 pm David C. Rankin wrote:
> All,
>   I have always been frustrated by not knowing what variables were available to
> cmake so that I could intelligently adjust include_directories or
> target_link_libraries without pulling my hair out. I have stumbled on two very
> different and very useful ways of showing all cmake variables available to your
> build. They literally pull back the cmake veil of secrecy... Both are simple:

I probably am missing the point, but the CMakeCache.txt lists all variables. I have the following in all cmake build scripts to ensure such information is part of my build log:

# Grab a copy of CMakeCache.txt.
if [ -r CMakeCache.txt ]; then
  echo "Contents of CMakeCache.txt:"
  cat CMakeCache.txt