CMakeLists.txt 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
  2. PROJECT (TTTT CXX)
  3. # Declare semantic versioning for FILVAL
  4. SET(FILVAL_VERSION_MAJOR 0)
  5. SET(FILVAL_VERSION_MINOR 1)
  6. SET(FILVAL_VERSION_PATCH 0)
  7. SET(CMAKE_BUILD_TYPE "Debug")
  8. CONFIGURE_FILE (
  9. "${PROJECT_SOURCE_DIR}/filval/filval.hpp"
  10. "${PROJECT_BINARY_DIR}/filval/filval.hpp"
  11. )
  12. SET( TTTT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR} )
  13. SET( TTTT_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} )
  14. # Setup clang as the project compiler
  15. SET (CMAKE_CXX_COMPILER "/usr/bin/clang++")
  16. SET (CMAKE_CXX_FLAGS "-Wall")
  17. SET (CMAKE_CXX_FLAGS_DEBUG "-g")
  18. SET (CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG")
  19. SET (CMAKE_CXX_FLAGS_RELEASE "-O4 -DNDEBUG")
  20. SET (CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
  21. SET (CMAKE_AR "/usr/bin/llvm-ar")
  22. SET (CMAKE_LINKER "/usr/bin/llvm-ld")
  23. SET (CMAKE_NM "/usr/bin/llvm-nm")
  24. SET (CMAKE_OBJDUMP "/usr/bin/llvm-objdump")
  25. SET (CMAKE_RANLIB "/usr/bin/llvm-ranlib")
  26. LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
  27. # add a target to generate API documentation with Doxygen
  28. FIND_PACKAGE(Doxygen)
  29. IF(DOXYGEN_FOUND)
  30. CONFIGURE_FILE(
  31. ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in
  32. ${CMAKE_CURRENT_BINARY_DIR}/docs/Doxyfile @ONLY
  33. )
  34. ADD_CUSTOM_TARGET(docs
  35. ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/docs/Doxyfile
  36. WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/docs
  37. COMMENT "Generating API documentation with Doxygen" VERBATIM
  38. )
  39. ENDIF(DOXYGEN_FOUND)
  40. FIND_PACKAGE(ROOT REQUIRED)
  41. INCLUDE_DIRECTORIES(SYSTEM ${ROOT_INCLUDE_DIR}
  42. ${CMAKE_CURRENT_SOURCE_DIR}
  43. ${CMAKE_CURRENT_SOURCE_DIR}/filval
  44. ${CMAKE_CURRENT_SOURCE_DIR}/filval_root)
  45. LINK_LIBRARIES(${ROOT_LIBRARIES})
  46. ADD_EXECUTABLE(main ${CMAKE_CURRENT_SOURCE_DIR}/analysis/TTTT_Analysis.cpp)