1 # See www/CMake.html for instructions on how to build libcxxabi with CMake.
3 #===============================================================================
5 #===============================================================================
7 cmake_minimum_required(VERSION 3.20.0)
9 set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake")
11 # Add path for custom modules
12 list(INSERT CMAKE_MODULE_PATH 0
13 "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
14 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
15 "${CMAKE_CURRENT_SOURCE_DIR}/../runtimes/cmake/Modules"
16 "${LLVM_COMMON_CMAKE_UTILS}"
17 "${LLVM_COMMON_CMAKE_UTILS}/Modules"
20 set(CMAKE_FOLDER "libc++")
22 set(LIBCXXABI_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
23 set(LIBCXXABI_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR})
24 set(LIBCXXABI_LIBCXX_PATH "${CMAKE_CURRENT_LIST_DIR}/../libcxx" CACHE PATH
25 "Specify path to libc++ source.")
27 include(GNUInstallDirs)
29 # Require out of source build.
30 include(MacroEnsureOutOfSourceBuild)
31 MACRO_ENSURE_OUT_OF_SOURCE_BUILD(
32 "${PROJECT_NAME} requires an out of source build. Please create a separate
33 build directory and run 'cmake /path/to/${PROJECT_NAME} [options]' there."
36 #===============================================================================
38 #===============================================================================
39 include(CMakeDependentOption)
40 include(HandleCompilerRT)
43 option(LIBCXXABI_ENABLE_EXCEPTIONS
44 "Provide support for exceptions in the runtime.
45 When disabled, libc++abi does not support stack unwinding and other exceptions-related features." ON)
46 option(LIBCXXABI_ENABLE_ASSERTIONS "Enable assertions independent of build mode." ON)
47 option(LIBCXXABI_ENABLE_PEDANTIC "Compile with pedantic enabled." OFF)
48 option(LIBCXXABI_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
49 option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF)
50 option(LIBCXXABI_ENABLE_STATIC_UNWINDER "Statically link the LLVM unwinder." OFF)
51 option(LIBCXXABI_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF)
52 option(LIBCXXABI_ENABLE_THREADS "Build with threads enabled" ON)
53 option(LIBCXXABI_HAS_PTHREAD_API "Ignore auto-detection and force use of pthread API" OFF)
54 option(LIBCXXABI_HAS_WIN32_THREAD_API "Ignore auto-detection and force use of win32 thread API" OFF)
55 option(LIBCXXABI_HAS_EXTERNAL_THREAD_API
56 "Build libc++abi with an externalized threading API.
57 This option may only be set to ON when LIBCXXABI_ENABLE_THREADS=ON." OFF)
58 option(LIBCXXABI_ENABLE_FORGIVING_DYNAMIC_CAST
59 "Make dynamic_cast more forgiving when type_info's mistakenly have hidden \
60 visibility, and thus multiple type_infos can exist for a single type. \
61 When the dynamic_cast would normally fail, this option will cause the \
62 library to try comparing the type_info names to see if they are equal \
65 option(LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS
66 "Build libc++abi with definitions for operator new/delete. These are normally
67 defined in libc++abi, but it is also possible to define them in libc++, in
68 which case the definition in libc++abi should be turned off." ON)
69 option(LIBCXXABI_BUILD_32_BITS "Build 32 bit multilib libc++abi. This option is not supported anymore when building the runtimes. Please specify a full triple instead." ${LLVM_BUILD_32_BITS})
70 if (LIBCXXABI_BUILD_32_BITS)
71 message(FATAL_ERROR "LIBCXXABI_BUILD_32_BITS is not supported anymore when building the runtimes, please specify a full triple instead.")
74 option(LIBCXXABI_INCLUDE_TESTS "Generate build targets for the libc++abi unit tests." ${LLVM_INCLUDE_TESTS})
75 set(LIBCXXABI_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}" CACHE STRING
76 "Define suffix of library directory name (32/64)")
77 option(LIBCXXABI_INSTALL_HEADERS "Install the libc++abi headers." ON)
78 option(LIBCXXABI_INSTALL_LIBRARY "Install the libc++abi library." ON)
80 set(LIBCXXABI_SHARED_OUTPUT_NAME "c++abi" CACHE STRING "Output name for the shared libc++abi runtime library.")
81 set(LIBCXXABI_STATIC_OUTPUT_NAME "c++abi" CACHE STRING "Output name for the static libc++abi runtime library.")
83 set(LIBCXXABI_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE STRING "Path to install the libc++abi headers at.")
85 if(LLVM_LIBRARY_OUTPUT_INTDIR)
86 set(LIBCXXABI_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1")
88 set(LIBCXXABI_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1")
91 # TODO: Remove this after branching for LLVM 15
92 if(LIBCXXABI_SYSROOT OR LIBCXXABI_TARGET_TRIPLE OR LIBCXXABI_GCC_TOOLCHAIN)
93 message(WARNING "LIBCXXABI_SYSROOT, LIBCXXABI_TARGET_TRIPLE and LIBCXXABI_GCC_TOOLCHAIN are not supported anymore, please use the native CMake equivalents instead")
96 set(LIBCXXABI_LIBCXX_LIBRARY_PATH "" CACHE PATH "The path to libc++ library.")
97 set(LIBCXXABI_LIBRARY_VERSION "1.0" CACHE STRING
98 "Version of libc++abi. This will be reflected in the name of the shared \
99 library produced. For example, -DLIBCXXABI_LIBRARY_VERSION=x.y will \
100 result in the library being named libc++abi.x.y.dylib, along with the \
101 usual symlinks pointing to that.")
103 # Default to building a shared library so that the default options still test
104 # the libc++abi that is being built. The problem with testing a static libc++abi
105 # is that libc++ will prefer a dynamic libc++abi from the system over a static
106 # libc++abi from the output directory.
107 option(LIBCXXABI_ENABLE_SHARED "Build libc++abi as a shared library." ON)
108 option(LIBCXXABI_ENABLE_STATIC "Build libc++abi as a static library." ON)
110 cmake_dependent_option(LIBCXXABI_INSTALL_STATIC_LIBRARY
111 "Install the static libc++abi library." ON
112 "LIBCXXABI_ENABLE_STATIC;LIBCXXABI_INSTALL_LIBRARY" OFF)
113 cmake_dependent_option(LIBCXXABI_INSTALL_SHARED_LIBRARY
114 "Install the shared libc++abi library." ON
115 "LIBCXXABI_ENABLE_SHARED;LIBCXXABI_INSTALL_LIBRARY" OFF)
117 cmake_dependent_option(LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_STATIC_LIBRARY
118 "Statically link the LLVM unwinder to static library" ON
119 "LIBCXXABI_ENABLE_STATIC_UNWINDER" OFF)
120 cmake_dependent_option(LIBCXXABI_STATICALLY_LINK_UNWINDER_IN_SHARED_LIBRARY
121 "Statically link the LLVM unwinder to shared library" ON
122 "LIBCXXABI_ENABLE_STATIC_UNWINDER" OFF)
124 option(LIBCXXABI_BAREMETAL "Build libc++abi for baremetal targets." OFF)
125 # The default terminate handler attempts to demangle uncaught exceptions, which
126 # causes extra I/O and demangling code to be pulled in.
127 option(LIBCXXABI_SILENT_TERMINATE "Set this to make the terminate handler default to a silent alternative" OFF)
128 option(LIBCXXABI_NON_DEMANGLING_TERMINATE "Set this to make the terminate handler
129 avoid demangling" OFF)
131 if (NOT LIBCXXABI_ENABLE_SHARED AND NOT LIBCXXABI_ENABLE_STATIC)
132 message(FATAL_ERROR "libc++abi must be built as either a shared or static library.")
135 # TODO: Remove this, which shouldn't be necessary since we know we're being built
136 # side-by-side with libc++.
137 set(LIBCXXABI_LIBCXX_INCLUDES "" CACHE PATH
138 "Specify path to libc++ includes.")
140 set(LIBCXXABI_HERMETIC_STATIC_LIBRARY_DEFAULT OFF)
142 set(LIBCXXABI_HERMETIC_STATIC_LIBRARY_DEFAULT ON)
144 option(LIBCXXABI_HERMETIC_STATIC_LIBRARY
145 "Do not export any symbols from the static library." ${LIBCXXABI_HERMETIC_STATIC_LIBRARY_DEFAULT})
148 set(LIBCXXABI_DEFAULT_TEST_CONFIG "llvm-libc++abi-mingw.cfg.in")
149 elseif(WIN32) # clang-cl
150 if (LIBCXXABI_ENABLE_SHARED)
151 set(LIBCXXABI_DEFAULT_TEST_CONFIG "llvm-libc++abi-shared-clangcl.cfg.in")
153 set(LIBCXXABI_DEFAULT_TEST_CONFIG "llvm-libc++abi-static-clangcl.cfg.in")
156 if (LIBCXXABI_ENABLE_SHARED)
157 set(LIBCXXABI_DEFAULT_TEST_CONFIG "llvm-libc++abi-shared.cfg.in")
159 set(LIBCXXABI_DEFAULT_TEST_CONFIG "llvm-libc++abi-static.cfg.in")
162 set(LIBCXXABI_TEST_CONFIG "${LIBCXXABI_DEFAULT_TEST_CONFIG}" CACHE STRING
163 "The path to the Lit testing configuration to use when running the tests.
164 If a relative path is provided, it is assumed to be relative to '<monorepo>/libcxxabi/test/configs'.")
165 if (NOT IS_ABSOLUTE "${LIBCXXABI_TEST_CONFIG}")
166 set(LIBCXXABI_TEST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/test/configs/${LIBCXXABI_TEST_CONFIG}")
168 message(STATUS "Using libc++abi testing configuration: ${LIBCXXABI_TEST_CONFIG}")
169 set(LIBCXXABI_TEST_PARAMS "" CACHE STRING
170 "A list of parameters to run the Lit test suite with.")
172 #===============================================================================
174 #===============================================================================
176 # Add path for custom modules
177 set(CMAKE_MODULE_PATH
178 "${CMAKE_CURRENT_SOURCE_DIR}/cmake"
179 "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules"
183 set(LIBCXXABI_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE STRING
184 "Path where built libc++abi runtime libraries should be installed.")
186 if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE)
187 set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
188 set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE})
189 set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE STRING
190 "Path where built libc++abi libraries should be installed.")
191 if(LIBCXX_LIBDIR_SUBDIR)
192 string(APPEND LIBCXXABI_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
193 string(APPEND LIBCXXABI_INSTALL_LIBRARY_DIR /${LIBCXXABI_LIBDIR_SUBDIR})
196 if(LLVM_LIBRARY_OUTPUT_INTDIR)
197 set(LIBCXXABI_HEADER_DIR ${LLVM_BINARY_DIR})
198 set(LIBCXXABI_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
200 set(LIBCXXABI_HEADER_DIR ${CMAKE_BINARY_DIR})
201 set(LIBCXXABI_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXXABI_LIBDIR_SUFFIX})
203 set(LIBCXXABI_INSTALL_LIBRARY_DIR lib${LIBCXXABI_LIBDIR_SUFFIX} CACHE STRING
204 "Path where built libc++abi libraries should be installed.")
207 set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
208 set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
209 set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXXABI_LIBRARY_DIR})
211 # By default, libcxx and libcxxabi share a library directory.
212 if (NOT LIBCXXABI_LIBCXX_LIBRARY_PATH)
213 set(LIBCXXABI_LIBCXX_LIBRARY_PATH "${LIBCXXABI_LIBRARY_DIR}" CACHE PATH
214 "The path to libc++ library." FORCE)
217 # Declare libc++abi configuration variables.
218 # They are intended for use as follows:
219 # LIBCXXABI_C_FLAGS: General flags for both the c++ compiler and linker.
220 # LIBCXXABI_CXX_FLAGS: General flags for both the c++ compiler and linker.
221 # LIBCXXABI_COMPILE_FLAGS: Compile only flags.
222 # LIBCXXABI_LINK_FLAGS: Linker only flags.
223 # LIBCXXABI_LIBRARIES: libraries libc++abi is linked to.
225 set(LIBCXXABI_C_FLAGS "")
226 set(LIBCXXABI_CXX_FLAGS "")
227 set(LIBCXXABI_COMPILE_FLAGS "")
228 set(LIBCXXABI_LINK_FLAGS "")
229 set(LIBCXXABI_LIBRARIES "")
230 set(LIBCXXABI_ADDITIONAL_COMPILE_FLAGS "" CACHE STRING
231 "Additional Compile only flags which can be provided in cache")
232 set(LIBCXXABI_ADDITIONAL_LIBRARIES "" CACHE STRING
233 "Additional libraries libc++abi is linked to which can be provided in cache")
235 # Include macros for adding and removing libc++abi flags.
236 include(HandleLibcxxabiFlags)
238 #===============================================================================
239 # Setup Compiler Flags
240 #===============================================================================
242 # Configure target flags
243 if (${CMAKE_SYSTEM_NAME} MATCHES "AIX")
244 add_flags_if_supported("-mdefault-visibility-export-mapping=explicit")
245 set(CMAKE_AIX_EXPORT_ALL_SYMBOLS OFF)
247 add_compile_flags("${LIBCXXABI_ADDITIONAL_COMPILE_FLAGS}")
248 add_library_flags("${LIBCXXABI_ADDITIONAL_LIBRARIES}")
250 # Configure compiler. Must happen after setting the target flags.
253 if (CXX_SUPPORTS_NOSTDINCXX_FLAG)
254 list(APPEND LIBCXXABI_COMPILE_FLAGS -nostdinc++)
255 # cmake 3.14 and above remove system include paths that are explicitly
256 # passed on the command line. We build with -nostdinc++ and explicitly add
257 # just the libcxx system include paths with -I on the command line.
258 # Setting CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES effectively prevents cmake
259 # from removing these.
260 # See: https://gitlab.kitware.com/cmake/cmake/issues/19227
261 set(CMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES "")
262 # Remove -stdlib flags to prevent them from causing an unused flag warning.
263 string(REPLACE "--stdlib=libc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
264 string(REPLACE "--stdlib=libstdc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
265 string(REPLACE "-stdlib=libc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
266 string(REPLACE "-stdlib=libstdc++" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
269 # Let the library headers know they are currently being used to build the
271 add_definitions(-D_LIBCXXABI_BUILDING_LIBRARY)
273 # libcxxabi needs to, for various reasons, include the libcpp headers as if
274 # it is being built as part of libcxx.
275 add_definitions(-D_LIBCPP_BUILDING_LIBRARY)
278 add_compile_flags_if_supported(-fstrict-aliasing)
281 if (LIBCXXABI_ENABLE_EXCEPTIONS)
282 # Catches C++ exceptions only and tells the compiler to assume that extern C
283 # functions never throw a C++ exception.
284 add_compile_flags_if_supported(-EHsc)
285 # Do we really need to be run through the C compiler ?
286 add_c_compile_flags_if_supported(-funwind-tables)
288 add_compile_flags_if_supported(-fno-exceptions)
289 add_compile_flags_if_supported(-EHs-)
290 add_compile_flags_if_supported(-EHa-)
294 string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)
295 if (LIBCXXABI_ENABLE_ASSERTIONS)
296 # MSVC doesn't like _DEBUG on release builds. See PR 4379.
298 list(APPEND LIBCXXABI_COMPILE_FLAGS -D_DEBUG)
300 # On Release builds cmake automatically defines NDEBUG, so we
301 # explicitly undefine it:
302 if (uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
303 list(APPEND LIBCXXABI_COMPILE_FLAGS -UNDEBUG)
306 if (NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
307 list(APPEND LIBCXXABI_COMPILE_FLAGS -DNDEBUG)
312 if (NOT LIBCXXABI_ENABLE_THREADS)
313 if (LIBCXXABI_HAS_PTHREAD_API)
314 message(FATAL_ERROR "LIBCXXABI_HAS_PTHREAD_API can only"
315 " be set to ON when LIBCXXABI_ENABLE_THREADS"
316 " is also set to ON.")
318 if (LIBCXXABI_HAS_WIN32_THREAD_API)
319 message(FATAL_ERROR "LIBCXXABI_HAS_WIN32_THREAD_API can only"
320 " be set to ON when LIBCXXABI_ENABLE_THREADS"
321 " is also set to ON.")
323 if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
324 message(FATAL_ERROR "LIBCXXABI_HAS_EXTERNAL_THREAD_API can only"
325 " be set to ON when LIBCXXABI_ENABLE_THREADS"
326 " is also set to ON.")
328 add_definitions(-D_LIBCXXABI_HAS_NO_THREADS)
331 if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
332 if (LIBCXXABI_HAS_PTHREAD_API)
333 message(FATAL_ERROR "The options LIBCXXABI_HAS_EXTERNAL_THREAD_API"
334 " and LIBCXXABI_HAS_PTHREAD_API cannot be both"
335 " set to ON at the same time.")
337 if (LIBCXXABI_HAS_WIN32_THREAD_API)
338 message(FATAL_ERROR "The options LIBCXXABI_HAS_EXTERNAL_THREAD_API"
339 " and LIBCXXABI_HAS_WIN32_THREAD_API cannot be both"
340 " set to ON at the same time.")
344 if (LIBCXXABI_HAS_PTHREAD_API)
345 if (LIBCXXABI_HAS_WIN32_THREAD_API)
346 message(FATAL_ERROR "The options LIBCXXABI_HAS_PTHREAD_API"
347 "and LIBCXXABI_HAS_WIN32_THREAD_API cannot be both"
348 "set to ON at the same time.")
352 if (LLVM_ENABLE_MODULES)
353 # Ignore that the rest of the modules flags are now unused.
354 add_compile_flags_if_supported(-Wno-unused-command-line-argument)
355 add_compile_flags(-fno-modules)
358 set(LIBCXXABI_HAS_UNDEFINED_SYMBOLS OFF)
359 if ((NOT LIBCXXABI_ENABLE_NEW_DELETE_DEFINITIONS) OR MINGW)
360 set(LIBCXXABI_HAS_UNDEFINED_SYMBOLS ON)
363 if (LIBCXXABI_HAS_UNDEFINED_SYMBOLS)
364 # Need to allow unresolved symbols if this is to work with shared library builds
366 list(APPEND LIBCXXABI_LINK_FLAGS "-undefined dynamic_lookup")
368 # Relax this restriction from HandleLLVMOptions
369 string(REPLACE "-Wl,-z,defs" "" CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS}")
373 if (LIBCXXABI_HAS_PTHREAD_API)
374 add_definitions(-D_LIBCPP_HAS_THREAD_API_PTHREAD)
377 if (LIBCXXABI_HAS_WIN32_THREAD_API)
378 add_definitions(-D_LIBCPP_HAS_THREAD_API_WIN32)
381 if (LIBCXXABI_HAS_EXTERNAL_THREAD_API)
382 add_definitions(-D_LIBCPP_HAS_THREAD_API_EXTERNAL)
386 add_definitions(-D_CRT_SECURE_NO_WARNINGS)
389 if (LIBCXXABI_SILENT_TERMINATE)
390 add_definitions(-DLIBCXXABI_SILENT_TERMINATE)
393 if (LIBCXXABI_NON_DEMANGLING_TERMINATE)
394 add_definitions(-DLIBCXXABI_NON_DEMANGLING_TERMINATE)
397 if (LIBCXXABI_BAREMETAL)
398 add_definitions(-DLIBCXXABI_BAREMETAL)
401 if (C_SUPPORTS_COMMENT_LIB_PRAGMA)
402 if (LIBCXXABI_HAS_PTHREAD_LIB)
403 add_definitions(-D_LIBCXXABI_LINK_PTHREAD_LIB)
407 string(REPLACE ";" " " LIBCXXABI_CXX_FLAGS "${LIBCXXABI_CXX_FLAGS}")
408 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LIBCXXABI_CXX_FLAGS}")
409 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${LIBCXXABI_C_FLAGS}")
411 # On AIX, avoid picking up VMX extensions(i.e. vec_malloc) which would change
412 # the default alignment of the allocators here.
413 if (UNIX AND ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
414 add_definitions("-D_XOPEN_SOURCE=700")
417 #===============================================================================
419 #===============================================================================
421 set(LIBCXXABI_LIBUNWIND_INCLUDES "${LIBCXXABI_LIBUNWIND_INCLUDES}" CACHE PATH
422 "Specify path to libunwind includes." FORCE)
423 set(LIBCXXABI_LIBUNWIND_PATH "${LIBCXXABI_LIBUNWIND_PATH}" CACHE PATH
424 "Specify path to libunwind source." FORCE)
426 if (LIBCXXABI_USE_LLVM_UNWINDER OR LLVM_NATIVE_ARCH MATCHES ARM)
427 find_path(LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL libunwind.h
428 PATHS ${LIBCXXABI_LIBUNWIND_INCLUDES}
429 ${LIBCXXABI_LIBUNWIND_PATH}/include
430 ${CMAKE_BINARY_DIR}/${LIBCXXABI_LIBUNWIND_INCLUDES}
431 ${LLVM_MAIN_SRC_DIR}/projects/libunwind/include
432 ${LLVM_MAIN_SRC_DIR}/runtimes/libunwind/include
433 ${LLVM_MAIN_SRC_DIR}/../libunwind/include
435 NO_CMAKE_FIND_ROOT_PATH
438 if (LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL STREQUAL "LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL-NOTFOUND")
439 set(LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL "")
443 if (NOT "${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}" STREQUAL "")
444 include_directories("${LIBCXXABI_LIBUNWIND_INCLUDES_INTERNAL}")
447 # Add source code. This also contains all of the logic for deciding linker flags
449 add_subdirectory(include)
450 add_subdirectory(src)
452 if (LIBCXXABI_INCLUDE_TESTS)
453 add_subdirectory(test)
454 add_subdirectory(fuzz)