[Cmake] Advanced variables disappear when set from command line?

Albert Strasheim 13640887 at sun . ac . za
Wed, 26 Nov 2003 11:19:21 +0200


Hello,

I'm trying to extend my spec file to build the wxWindows dialog using 
wxGTK (available from freshrpms.net).

After the bootstrap and the initial make, I would like to use the 
resulting cmake binary to enable building of the WX dialog, so I do:

[fullung at asok cmake-1.8.1]$ bin/cmake -DCMAKE_BUILD_WX_DIALOG=ON
[fullung at asok cmake-1.8.1]$ make

But the WX dialog is not built. If I look in CMakeCache.txt, 
CMAKE_BUILD_WX_DIALOG is no longer defined.

Start again with CMAKE_BUILD_WX_DIALOG defined, and do:

[fullung at asok cmake-1.8.1]$ grep "CMAKE_BUILD_WX_DIALOG" CMakeCache.txt
CMAKE_BUILD_WX_DIALOG:BOOL=OFF
//Advanced flag for variable: CMAKE_BUILD_WX_DIALOG
CMAKE_BUILD_WX_DIALOG-ADVANCED:INTERNAL=1

[fullung at asok cmake-1.8.1]$ bin/cmake -DCMAKE_BUILD_WX_DIALOG=ON .
-- Check for working C compiler: /usr/bin/cc -- works
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Using Buildname: Linux-g++
-- Configuring done
-- Generating done

[fullung at asok cmake-1.8.1]$ grep "CMAKE_BUILD_WX_DIALOG" CMakeCache.txt
//Advanced flag for variable: CMAKE_BUILD_WX_DIALOG
CMAKE_BUILD_WX_DIALOG-ADVANCED:INTERNAL=1

(--> CMAKE_BUILD_WX_DIALOG has disappeared)

[fullung at asok cmake-1.8.1]$ bin/cmake -DFOO=BAR .
-- Check for working C compiler: /usr/bin/cc -- works
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Using Buildname: Linux-g++
-- Configuring done
-- Generating done

[fullung at asok cmake-1.8.1]$ grep "CMAKE_BUILD_WX_DIALOG" CMakeCache.txt
CMAKE_BUILD_WX_DIALOG:BOOL=OFF
//Advanced flag for variable: CMAKE_BUILD_WX_DIALOG
CMAKE_BUILD_WX_DIALOG-ADVANCED:INTERNAL=1

(--> CMAKE_BUILD_WX_DIALOG has reappeared)

Can advanced variables be set from the command line? Am I doing it right? 
The PDF docs don't seem to have any special instructions with regards to 
advanced variables.

Setting a normal variable such as CMAKE_INSTALL_PREFIX works as expected:

[fullung at asok cmake-1.8.1]$ grep "CMAKE_INSTALL_PREFIX" CMakeCache.txt
CMAKE_INSTALL_PREFIX:PATH=/usr/local

[fullung at asok cmake-1.8.1]$ bin/cmake -DCMAKE_INSTALL_PREFIX=/foo/bar .
-- Check for working C compiler: /usr/bin/cc -- works
-- Check for working CXX compiler: /usr/bin/g++ -- works
-- Using Buildname: Linux-g++
-- Configuring done
-- Generating done

[fullung at asok cmake-1.8.1]$ grep "CMAKE_INSTALL_PREFIX" CMakeCache.txt
CMAKE_INSTALL_PREFIX:PATH=/foo/bar

Also, setting advanced variables using ccmake works fine.

Cheers,

Albert