Use CMake to disable getopt linking conflict which replaces the multiple definition workaround in 28016b68b3 commit.
28016b68b3