-
Notifications
You must be signed in to change notification settings - Fork 72
/
CMakeLists.txt
39 lines (30 loc) · 1.04 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required(VERSION 3.20.0)
project(mlir-tutorial LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 17 CACHE STRING "C++ standard to conform to")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(BUILD_DEPS ON)
find_package(MLIR REQUIRED CONFIG)
message(STATUS "Using MLIRConfig.cmake in: ${MLIR_DIR}")
message(STATUS "Using LLVMConfig.cmake in: ${LLVM_DIR}")
set(MLIR_BINARY_DIR ${CMAKE_BINARY_DIR})
include(AddLLVM)
include(TableGen)
list(APPEND CMAKE_MODULE_PATH "${MLIR_CMAKE_DIR}")
include(AddMLIR)
include_directories(${LLVM_INCLUDE_DIRS})
include_directories(${MLIR_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR})
include_directories(${PROJECT_SOURCE_DIR}/externals/llvm-project)
include_directories(${PROJECT_BINARY_DIR})
message(STATUS "Fetching or-tools...")
include(FetchContent)
FetchContent_Declare(
or-tools
GIT_REPOSITORY https://github.com/google/or-tools.git
GIT_TAG v9.0
)
FetchContent_MakeAvailable(or-tools)
message(STATUS "Done fetching or-tools")
add_subdirectory(tests)
add_subdirectory(tools)
add_subdirectory(lib)