Add cmake macro for creating tests. Use on logic