Am Sonntag, 29. April 2012 um 10:30:09, schrieb Harry van der Wolf 
<[email protected]>
> I need a cmake expert or at least someone who is not a cmake dummy like me.
> 
> Like in the first mail I want to implement something like:
> if (UNIX)
>   then
>     option(BUILD_HSI "Python Scripting Interface" ON)
>   elif
>     option(BUILD_HSI "Python Scripting Interface" OFF)
>  fi
> 
> It's of course simple to switch it on for Unix (or linux), but I also need
> to check whether the "-DBUILD_HSI=" option itself has been set.
> 
> Checking on something like "IF(NOT BUILD_HSI)" displays whether someone has
> not set it (forgot to set it) or deliberately switched it off.
> "cmake .." gives the same result as as "cmake -DBUILD_HSI=off .." setting.

Of course it uses the already cached values. The line in CMakeLists.txt 
specifies only the default value.

> How do I check if someone deliberately specified -DBUILD_HSI=off (or
> -DBUILD_HSI=0) because he/she doesn't want to build the hsi module?

You cannot check that easy. But in this case the option _is_ overridden by the 
command line.

> And of course: If you have access to the trunk: Feel free to apply the
> patch yourself.

Will do if no one objects.

> Hoi,
> Harry
> 

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to