Lot's of ports pass a list of -DFOO:BOOL=OFF -DBAR:BOOL=ON to CMAKE_ARGS, which is both tedious to write and read.
The options framework provides a nicer interface <opt>_CMAKE_ON and <opt>_CMAKE_OFF where on can just pass FOO and BAR -- making it shorter and more readable.
So
CMAKE_ARGS= -DFOO:BOOL=TRUE \ -DBAR:BOOL=FALSE \ [other args]
could now be written as
CMAKE_ON= FOO CMAKE_OFF= BAR CMAKE_ARGS= [other args]
The attached diff extends cmake.mk with this behaviour.
- As an example the ports devel/cmake-gui and devel/cmake-doc are included too.