Updated CMake if statements in line with CMake v3.1 policy.
Bugfix in add_gtests CMake module.
Merge pull request #173 from Fraser999/MAID-500

Updated CMake if statements in line with CMake v3.1 policy.