-
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
65 lines (53 loc) · 1.79 KB
/
CMakeLists.txt
File metadata and controls
65 lines (53 loc) · 1.79 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# Copyright (c) 2023 - 2026 Chair for Design Automation, TUM
# Copyright (c) 2025 - 2026 Munich Quantum Software Company GmbH
# All rights reserved.
#
# SPDX-License-Identifier: MIT
#
# Licensed under the MIT License
# set required cmake version
cmake_minimum_required(VERSION 3.24...4.0)
project(
qusat
LANGUAGES CXX
DESCRIPTION "A Tool for Utilizing SAT in Quantum Computing")
option(BUILD_MQT_QUSAT_BINDINGS "Build the MQT QUSAT Python bindings" OFF)
option(BUILD_MQT_QUSAT_TESTS "Also build tests for the MQT QUSAT project" ON)
if(BUILD_MQT_QUSAT_BINDINGS)
# ensure that the BINDINGS option is set
set(BINDINGS
ON
CACHE INTERNAL "Enable settings related to Python bindings")
# Some common settings for finding Python
set(Python_FIND_VIRTUALENV
FIRST
CACHE STRING "Give precedence to virtualenvs when searching for Python")
set(Python_FIND_FRAMEWORK
LAST
CACHE STRING "Prefer Brew/Conda to Apple framework Python")
set(Python_ARTIFACTS_INTERACTIVE
ON
CACHE BOOL "Prevent multiple searches for Python and instead cache the results.")
if(DISABLE_GIL)
message(STATUS "Disabling Python GIL")
add_compile_definitions(Py_GIL_DISABLED)
endif()
# top-level call to find Python
find_package(Python 3.10 REQUIRED COMPONENTS Interpreter Development.Module
${SKBUILD_SABI_COMPONENT})
endif()
# Add path for custom modules
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
include(cmake/ExternalDependencies.cmake)
set(MQT_QUSAT_TARGET_NAME "mqt-qusat")
# add main library code
add_subdirectory(src)
if(BUILD_MQT_QUSAT_BINDINGS)
add_subdirectory(bindings)
endif()
# add test code
if(BUILD_MQT_QUSAT_TESTS)
enable_testing()
include(GoogleTest)
add_subdirectory(test)
endif()