Figured out how to do custom compile configuration from cmake.