[CMake] What is the purpose of cmake's -N parameter?

Steven Velez sbv1976 at gmail.com
Thu May 19 14:21:04 EDT 2016


Well, sent that a little too soon.  I just realized that in my testing, I
wasn't specifying the source directory (which is an error) and when I do
"-N" does affect how "-L" behaves...

However, -L still leaves a lot of cache variables out (as does -LA), and I
would like to see the value of CMAKE_PROJECT_NAME.

Any tips?

Thanks,
Steven


On Thu, May 19, 2016 at 2:16 PM, Steven Velez <sbv1976 at gmail.com> wrote:

> The docs say:
>
> View mode only.
>>
>> Only load the cache. Do not actually run configure and generate steps.
>>
>
> But I wonder what you can do with cmake after that to view the cache?
>
> The -L parameter seems to display the same set of variables with or
> without this set, and scripts run in process script mode still seem to have
> no access to cache values.
>
> So, what's left?
>
> To state my problem a little more generally I would like a way to discover
> the project name set in a binary dir by it's associated CMakeLists.txt file.
>
> Is this possible without writing my own code to parse either the
> CMakeLists.txt or CMakeCache.txt?
>
> Thanks,
> Steven
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160519/a4e754c0/attachment.html>


More information about the CMake mailing list