Use proper functions instead of setting cflags.
Merge pull request #1 from cmakified/master

Use proper functions instead of setting cflags.