ID photo of Ciro Santilli taken in 2013 right eyeCiro Santilli OurBigBook logoOurBigBook.com  Sponsor 中国独裁统治 China Dictatorship 新疆改造中心、六四事件、法轮功、郝海东、709大抓捕、2015巴拿马文件 邓家贵、低端人口、西藏骚乱
cmake/option/test
#!/usr/bin/env bash
set -eux
. ../.bashrc
setup

# set

# Defaults.
cmake .. && make -B VERBOSE=1 && [ "$(./main)" = "$(printf 'hello\nworld')" ]
cmake -DMSG=bye .. && make -B VERBOSE=1 && [ "$(./main)" = "$(printf 'bye\nworld')" ]
# Using the cache.
cmake .. && make -B VERBOSE=1 && [ "$(./main)" = "$(printf 'bye\nworld')" ]
# Remove from cache.
cmake -UMSG .. && make -B VERBOSE=1 &&  [ "$(./main)" = "$(printf 'hello\nworld')" ]

# option

cmake -DWORLD=off .. && make -B VERBOSE=1 && [ "$(./main)" = "$(printf 'hello')" ]
# From cache.
cmake .. && make -B VERBOSE=1 && [ "$(./main)" = "$(printf 'hello')" ]
# Remove from cache
cmake -UWORLD .. && make -B VERBOSE=1 && [ "$(./main)" = "$(printf 'hello\nworld')" ]