This does not work in general cases because not all files would need compiled with a /clr flag.  I think making a CMake variable and setting it would be a cleaner way to go.