Feature Proposal for extending add_library() and add_executable() functionality
This is a feature proposal to extend the functionality of add_library and add_executable commands.
How it is:
add_library(mylib STATIC)
target_compile_options(mylib PRIVATE -mavx -march=native)
target_compile_definitions(mylib PRIVATE MY_DEFINES)
target_include_directories(mylib PRIVATE MY_INCLUDES)
target_link_libraries(mylib mylib_dependencies)
Proposal:
add_library(mylib STATIC
FLAGS PRIVATE -mavx -march=native
DEFINES PRIVATE MY_DEFINES
INCLUDES PRIVATE MY_INCLUDES
DEPENDS mylib_dependencies)
I have already implemented this by calling their respective functions (i.e target_compile_definitions -> cmTargetCompileDefintionsCommand()).
Let me if anyone is interested in this feature.
Thank You
Edited by Sibi Siddharthan