-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
executable file
·64 lines (53 loc) · 1.85 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Copyright David Stone 2019.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
cmake_minimum_required(VERSION 3.28 FATAL_ERROR)
project(operators LANGUAGES CXX)
enable_testing()
get_directory_property(has_parent PARENT_DIRECTORY)
if (NOT has_parent)
set(CMAKE_CXX_STANDARD 26)
set(CMAKE_CXX_STANDARD_REQUIRED On)
set(CMAKE_CXX_EXTENSIONS Off)
add_subdirectory(dependencies/cmake_strict_defaults)
add_subdirectory(dependencies/std_module)
endif()
add_library(operators STATIC)
target_include_directories(operators PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)
target_link_libraries(operators
PUBLIC strict_defaults_interface std_module
PRIVATE strict_defaults
)
target_sources(operators PRIVATE
source/operators/forward.cpp
source/operators/returns.cpp
)
target_sources(operators PUBLIC
FILE_SET CXX_MODULES
BASE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}"
FILES
source/operators/arrow_impl/addressof_wrapper.cpp
source/operators/arrow_impl/arrow_impl.cpp
source/operators/arrow_impl/arrow_proxy_value.cpp
source/operators/arrow_impl/cast_self.cpp
source/operators/arrow_impl/indirect.cpp
source/operators/arrow.cpp
source/operators/arrow_star.cpp
source/operators/binary_minus.cpp
source/operators/bracket.cpp
source/operators/bracket_impl.cpp
source/operators/compound_assignment.cpp
source/operators/compound_assignment_test.cpp
source/operators/increment_decrement.cpp
source/operators/operators.cpp
source/operators/unary_minus.cpp
source/operators/unary_plus.cpp
)
# Until resolution of https://github.com/llvm/llvm-project/issues/60089
set_source_files_properties(source/operators/compound_assignment.cpp
PROPERTIES COMPILE_FLAGS "-Wno-implicit-int-conversion -Wno-shorten-64-to-32"
)