Merge pull request #1781 from wfvining/fix1764-cmake-errors

Fix #1764 Remove cmake code that leads to a configuration error