cmake/modules + x86_64

Alexander Neundorf neundorf at kde.org
Mon Jan 30 19:52:36 CET 2006


Hi,

On Monday 30 January 2006 16:51, Brad King wrote:
...
> The authors of the KDE CMake code can choose whatever interface is
> desired.  For example, one could do
>
> SET(kde_install_lib_dir /lib${kde_libsuffix})
>
> and then the user could add
>
> -Dkde_libsuffix:STRING=64
>
> to the command line when calling CMake.  Other interfaces are possible
> also.  I suggest allowing the user to explicitly set the install location:
>
> IF(NOT kde_install_lib_dir)
>    SET(kde_install_lib_dir /lib)
> ENDIF(NOT kde_install_lib_dir)
>
> Then the user could put
>
> -Dkde_install_lib_dir:STRING=/lib64

Yes, I think a KDE4_LIB_DIR sounds good.
OTOH, I am unsure how to do it.
FindKDE4.cmake will find the directory where KDE4 is installed and sets 
KDE4_LIB_DIR accordingly (e.g. to /opt/kde4/lib) Still the stuff the user 
compiles, can go somewhere else I think. 
So we need an additional variable I guess.

> on the command line when calling CMake the first time.  That would add a
> cache entry allowing the option to be changed from the GUI later.

Brad could you please explain how the existing cache, -DSOME_VAR=whatever, 
set(SOME_VAR "value") and how the CACHE, FORCE and INTERNAL keywords for 
set() play together ? I.e. AFAIK I can't set a CMake variable which is not in 
the cache using cmake -D.
What happens if I set a cmake variable which is in the cache in a 
CMakeLists.txt explicitely to some value ?
Can I force a variable to go into the cache ? 

Why does this produce an error ?
$ cat CMakeLists.txt
set(SOME_VAR "hello" CACHE)
$ cmake .
CMake Error: Error in cmake code at
/home/alex/src/tests/cmakeelse/CMakeLists.txt:1:
SET Syntax error in SET:
See the help for the SET command:
SET (SOME_VARhelloCACHE)

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list