-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
42 lines (33 loc) · 1.33 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
40
41
# Copyright (C) 2022-2023 Jonathan Müller and lauf contributors
# SPDX-License-Identifier: BSL-1.0
cmake_minimum_required(VERSION 3.8)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()
project(lauf VERSION 0.0.0 LANGUAGES C CXX)
option(LAUF_DISPATCH_JUMP_TABLE "whether or not to use a jump table for dispatching bytecode instructions" ON)
add_subdirectory(src)
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
cmake_minimum_required(VERSION 3.18)
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()
option(LAUF_BUILD_BENCHMARKS "whether or not the benchmarks should be built" ON)
option(LAUF_BUILD_TOOLS "whether or not the tools should be built" ON)
option(LAUF_BUILD_TESTS "whether or not tests should be built" ON)
if(LAUF_BUILD_TESTS AND NOT LAUF_BUILD_TOOLS)
message(WARNING "integration tests require tools")
endif()
if(LAUF_BUILD_BENCHMARKS)
add_subdirectory(benchmarks)
endif()
if(LAUF_BUILD_TOOLS OR LAUF_BUILD_TESTS)
add_subdirectory(tools)
endif()
if(LAUF_BUILD_TESTS)
enable_testing()
add_subdirectory(tests)
endif()
endif()
add_executable(lauf_prototype EXCLUDE_FROM_ALL main.cpp)
target_link_libraries(lauf_prototype PRIVATE foonathan::lauf)