forked from GridTools/cpp_bindgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
28 lines (20 loc) · 909 Bytes
/
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
cmake_minimum_required(VERSION 3.14.5)
# when increasing the minium required version, consider updating in examples as well
file(STRINGS "version.txt" __CPP_BINDGEN_VERSION)
project(cpp_bindgen VERSION ${__CPP_BINDGEN_VERSION} LANGUAGES CXX)
unset(__CPP_BINDGEN_VERSION)
# Switch default of NO_PACKAGE_REGISTRY. TODO: Can be removed with CMake 3.15+
set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON CACHE BOOL "")
mark_as_advanced(CMAKE_EXPORT_NO_PACKAGE_REGISTRY)
include(CTest)
set(REQUIRED_BOOST_VERSION 1.58)
find_package(Boost ${REQUIRED_BOOST_VERSION} REQUIRED)
if(NOT CPP_BINDGEN_GT_LEGACY)
set(CPP_BINDGEN_GT_LEGACY OFF)
endif()
# if used via FetchContent/add_subdirectory() we need to make the add_bindings_library() available here
include(${CMAKE_CURRENT_LIST_DIR}/cmake/bindings.cmake)
if (BUILD_TESTING)
add_subdirectory(tests)
endif()
include(${CMAKE_CURRENT_LIST_DIR}/cmake/export.cmake)