cmake option was not consist in two time with same command
I have simple demo use cmake option:
...
option(BUILD_HELLO_EN "Build hello_en" ON)
option(BUILD_HELLO_ZH "Build hello_zh" ON)
...
step 1. do the configure:
mkdir build
cd build
cmake ..
BUILD_HELLO_ZH
value was ON
in CMakeCache.txt:
step 2. check the option //Build hello_en
BUILD_HELLO_EN:BOOL=ON
//Build hello_zh
BUILD_HELLO_ZH:BOOL=ON
BUILD_HELLO_ZH
value to off
:
step 3. change the cmake .. -DBUILD_HELLO_ZH=off
BUILD_HELLO_ZH
value was off
in CMakeCache.txt:
step 4. check the option //Build hello_en
BUILD_HELLO_EN:BOOL=ON
//Build hello_zh
BUILD_HELLO_ZH:BOOL=off
BUILD_HELLO_ZH
value to default which is ON
:
step 5. then I want to change the cmake ..
BUILD_HELLO_ZH
value was off
not changed to ON
in CMakeCache.txt:
step 6. but actually the //Build hello_en
BUILD_HELLO_EN:BOOL=ON
//Build hello_zh
BUILD_HELLO_ZH:BOOL=off
step 1 and step 5 has the same action but got different result of option value.