CMakeLists.txt 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. cmake_minimum_required(VERSION 3.3)
  2. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/../cmake) # main (top) cmake dir
  3. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR}/cmake) # project specific cmake dir
  4. # CMake useful variables
  5. set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
  6. set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
  7. set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
  8. # Set the name of your project here
  9. project("dbt-core")
  10. # Set the version number of your project here (format is MAJOR.MINOR.PATCHLEVEL - e.g. 1.0.0)
  11. set(VERSION_MAJOR "1")
  12. set(VERSION_MINOR "0")
  13. set(VERSION_PATCH "0")
  14. set(VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH})
  15. include(Common)
  16. if(DEFINED ENV{LLVM_HOME})
  17. find_path (LLVM_DIR LLVM-Config.cmake $ENV{LLVM_HOME}/lib/cmake/llvm)
  18. endif(DEFINED ENV{LLVM_HOME})
  19. find_package(LLVM REQUIRED CONFIG)
  20. # This sets the include directory for the reference project. This is the -I flag in gcc.
  21. include_directories(
  22. ${PROJECT_SOURCE_DIR}/incl
  23. ${PROJECT_SOURCE_DIR}/../sc-components/incl
  24. ${LLVM_INCLUDE_DIRS}
  25. )
  26. #add_dependent_header(util)
  27. add_definitions(${LLVM_DEFINITIONS})
  28. add_subdirectory(src)