[CMake] load CMakeCache.txt settings into new build directory?

John Drescher drescherjm at gmail.com
Mon Apr 6 22:40:39 EDT 2009


On Mon, Apr 6, 2009 at 10:33 PM, Michael Jackson
<mike.jackson at bluequartz.net> wrote:
> I _think_ the way to do this in your script would be to use either one of:
>
>  -C <initial-cache>          = Pre-load a script to populate the cache.
>  -D <var>:<type>=<value>     = Create a cmake cache entry.
>
> In the -C variant you would have a *.cmake file that has all the necessary
> entries in it that you want to set, or want the user to automatically have.
> I think you just use the normal cmake syntax:
>
> set(CMAKE_BUILD_TYPE "Debug")
>
> In the -D variant you would need to pass in all the settings that you need
> on the command line:
>
> cmake -D CMAKE_BUILD_TYPE:STRING=Debug ../SourceDirectory
>
>
Thanks. Although  I was not the OP I will look in to this so I can
simplify having others install of some libs with the options that I
want / need. Looks like this will save me some time making a step by
step guide...

John


More information about the CMake mailing list