Reorganized CMake rules.
Fixed an error in the division operator.