I'm using CMake in a project of mine, and I would like to use a different set of optimization flags for each file. Some files contain code that I would like to optimize for space and others I would like to optimize for performance.
Is there anyway to do this using CMake? The only way I can currently imagine is using this:
set_property(SOURCE ${PROJECT_SOURCE_DIR}/src/bitmap.c APPEND_STRING COMPILE_FLAGS "/Wall /WX /O1") I know there's ways to set the optimization flags for specific files, but will building in release or debug mode have an effect on this? I want to make sure I'm doing this in a way that isn't just some hack, otherwise I might just revert back to Make.