This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 29th, 2011  |  syntax: None  |  size: 2.62 KB  |  views: 57  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. CMakeLists.txt
  2. -------------
  3.  
  4. cmake_minimum_required(VERSION 2.6)
  5.  
  6. PROJECT(CompilerFlags)
  7.  
  8. ADD_EXECUTABLE(CompilerFlags CompilerFlags.cxx)
  9.  
  10. list(APPEND myvariable "UNIX")
  11. list(APPEND myvariable "DAVID")
  12. message("myvariable: " ${myvariable})
  13. set_target_properties(CompilerFlags PROPERTIES COMPILE_DEFINITIONS "${myvariable}") #note, must have quotes around variable
  14.  
  15. make VERBOSE=1 output
  16. -------------------
  17.  
  18. /usr/bin/cmake -H/media/portable/Examples/CMake/CompilerFlags -B/media/portable/Examples/CMake/CompilerFlags/build --check-build-system CMakeFiles/Makefile.cmake 0
  19. /usr/bin/cmake -E cmake_progress_start /media/portable/Examples/CMake/CompilerFlags/build/CMakeFiles /media/portable/Examples/CMake/CompilerFlags/build/CMakeFiles/progress.marks
  20. make -f CMakeFiles/Makefile2 all
  21. make[1]: Entering directory `/media/portable/Examples/CMake/CompilerFlags/build'
  22. make -f CMakeFiles/CompilerFlags.dir/build.make CMakeFiles/CompilerFlags.dir/depend
  23. make[2]: Entering directory `/media/portable/Examples/CMake/CompilerFlags/build'
  24. cd /media/portable/Examples/CMake/CompilerFlags/build && /usr/bin/cmake -E cmake_depends "Unix Makefiles" /media/portable/Examples/CMake/CompilerFlags /media/portable/Examples/CMake/CompilerFlags /media/portable/Examples/CMake/CompilerFlags/build /media/portable/Examples/CMake/CompilerFlags/build /media/portable/Examples/CMake/CompilerFlags/build/CMakeFiles/CompilerFlags.dir/DependInfo.cmake --color=
  25. make[2]: Leaving directory `/media/portable/Examples/CMake/CompilerFlags/build'
  26. make -f CMakeFiles/CompilerFlags.dir/build.make CMakeFiles/CompilerFlags.dir/build
  27. make[2]: Entering directory `/media/portable/Examples/CMake/CompilerFlags/build'
  28. /usr/bin/cmake -E cmake_progress_report /media/portable/Examples/CMake/CompilerFlags/build/CMakeFiles 1
  29. [100%] Building CXX object CMakeFiles/CompilerFlags.dir/CompilerFlags.cxx.o
  30. /usr/lib/ccache/c++   -DUNIX -DDAVID -g   -o CMakeFiles/CompilerFlags.dir/CompilerFlags.cxx.o -c /media/portable/Examples/CMake/CompilerFlags/CompilerFlags.cxx
  31. Linking CXX executable CompilerFlags
  32. /usr/bin/cmake -E cmake_link_script CMakeFiles/CompilerFlags.dir/link.txt --verbose=1
  33. /usr/lib/ccache/c++   -g   CMakeFiles/CompilerFlags.dir/CompilerFlags.cxx.o  -o CompilerFlags -rdynamic
  34. make[2]: Leaving directory `/media/portable/Examples/CMake/CompilerFlags/build'
  35. /usr/bin/cmake -E cmake_progress_report /media/portable/Examples/CMake/CompilerFlags/build/CMakeFiles  1
  36. [100%] Built target CompilerFlags
  37. make[1]: Leaving directory `/media/portable/Examples/CMake/CompilerFlags/build'
  38. /usr/bin/cmake -E cmake_progress_start /media/portable/Examples/CMake/CompilerFlags/build/CMakeFiles 0
clone this paste RAW Paste Data