Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_library(common_library STATIC ${__SOURCES} ${__HEADERS})
- #if defined(MY_DEFINE_1)
- // specific code #1
- #elif defined (MY_DEFINE_2)
- // specific code #2
- #else
- // error
- #endif
- target_compile_definitions(common_library -DMY_DEFINE_1)
- add_executable(BINARY_1 ${bin1_sources} )
- add_dependencies(BINARY_1 common_library)
- target_compile_definitions(common_library -DMY_DEFINE_2)
- add_executable(BINARY_2 ${bin2_sources} )
- add_dependencies(BINARY_2 common_library)
Add Comment
Please, Sign In to add comment