Guest User

Untitled

a guest
Apr 25th, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. add_library(common_library STATIC ${__SOURCES} ${__HEADERS})
  2.  
  3. #if defined(MY_DEFINE_1)
  4. // specific code #1
  5. #elif defined (MY_DEFINE_2)
  6. // specific code #2
  7. #else
  8. // error
  9. #endif
  10.  
  11. target_compile_definitions(common_library -DMY_DEFINE_1)
  12. add_executable(BINARY_1 ${bin1_sources} )
  13. add_dependencies(BINARY_1 common_library)
  14.  
  15. target_compile_definitions(common_library -DMY_DEFINE_2)
  16. add_executable(BINARY_2 ${bin2_sources} )
  17. add_dependencies(BINARY_2 common_library)
Add Comment
Please, Sign In to add comment