Tuesday, 15 March 2011

cmake - Difference between COMPILE_FLAGS and COMPILE_OPTIONS -



cmake - Difference between COMPILE_FLAGS and COMPILE_OPTIONS -

what difference between

compile_flags: additional flags utilize when compiling target's sources.

and

compile_options: list of options pass compiler.

in terms of resulting vs2010 solution these commands produce same result:

target_compile_options(target private "/option=test1") set_target_properties(target properties compile_flags "/option=test1") set_target_properties(target properties compile_options "/option=test1")

compile_options list, compile_flags string.

set_target_properties(target properties compile_options "/option=test1;/option2=test2") set_target_properties(target properties compile_flags "/option=test1 /option2=test2")

you can more-easily append list string.

also, compile_options escaped, whereas characters in compile_flags may need escaped manually or cause problems.

cmake

No comments:

Post a Comment