ENH: Grouping the logic that detects getopt.c into a single .cmake file.