CMake has its own variables to check if you are on a particular platform. For example, using the following code you can check if you are on one of the most popular platforms and adjust whatever you need accordingly:
elseif(UNIX AND NOT APPLE AND NOT CYGWIN)
So you don't need any custom macros there — CMake has such a functional built-in.
Asked in February 2016Viewed 2,114 timesVoted 9Answered 1 times