[CMake] Are the [Project name]_SOURCE_DIR variables stored in the cache ?
Glenn Coombs
glenn.coombs at gmail.com
Thu May 1 13:54:43 EDT 2014
What I am saying is that project("foo") should internally execute the
equivalent of set(foo_SOURCE_DIR "/path/to/source") rather than set(foo
"/path/to/source" CACHE STRING). That way it would fail on every run if
you referenced a project source directory variable before you had done the
add_subdirectory() for that project. Currently in that situation it fails
the first time you run cmake but works as expected on subsequent runs of
cmake, which I think is odd behaviour.
On 1 May 2014 18:35, John Drescher <drescherjm at gmail.com> wrote:
> > I thought they probably were. My question was really if the behaviour
> that
> > results from that was desirable. I can't see any reason why they should
> be
> > cached as they aren't user configurable variables. Would it break
> anything
> > badly if they were not stored in the cache ? It would result in more
> > consistent behaviour IMHO.
> >
>
> Executing
>
> cmake .
>
> would fail in the bin folder if it had no way to know where the source
> folder is.
>
> John
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20140501/c8f9bbc7/attachment-0001.html>
More information about the CMake
mailing list