DefineCMakeDefaults.cmake 938 B

123456789101112131415161718192021222324252627282930
  1. # Always include srcdir and builddir in include path
  2. # This saves typing ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY} in
  3. # about every subdir
  4. # since cmake 2.4.0
  5. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  6. # Put the include dirs which are in the source or build tree
  7. # before all other include dirs, so the headers in the sources
  8. # are prefered over the already installed ones
  9. # since cmake 2.4.1
  10. set(CMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE ON)
  11. # Use colored output
  12. # since cmake 2.4.0
  13. set(CMAKE_COLOR_MAKEFILE ON)
  14. # Define the generic version of the libraries here
  15. set(GENERIC_LIB_VERSION "0.1.0")
  16. set(GENERIC_LIB_SOVERSION "0")
  17. # set -Werror
  18. set(CMAKE_ENABLE_WERROR ON)
  19. # Set the default build type to release with debug info
  20. if (NOT CMAKE_BUILD_TYPE)
  21. set(CMAKE_BUILD_TYPE RelWithDebInfo
  22. CACHE STRING
  23. "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel."
  24. )
  25. endif (NOT CMAKE_BUILD_TYPE)