2019-10-05 01:30:54 +08:00
|
|
|
cmake_minimum_required(VERSION 3.4.3)
|
|
|
|
|
2020-01-27 13:50:27 +08:00
|
|
|
# Use old version of target_sources command which converts the source
|
|
|
|
# file paths to full paths.
|
|
|
|
cmake_policy(SET CMP0076 OLD)
|
2019-10-05 01:30:54 +08:00
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
|
|
|
|
|
|
|
|
# The top-level source directory of libc.
|
|
|
|
set(LIBC_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
# The top-level directory in which libc is being built.
|
|
|
|
set(LIBC_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
|
|
|
|
|
|
|
# Path libc/scripts directory.
|
|
|
|
set(LIBC_BUILD_SCRIPTS_DIR "${LIBC_SOURCE_DIR}/utils/build_scripts")
|
|
|
|
|
|
|
|
|
|
|
|
set(LIBC_TARGET_OS ${CMAKE_SYSTEM_NAME})
|
|
|
|
string(TOLOWER ${LIBC_TARGET_OS} LIBC_TARGET_OS)
|
|
|
|
|
|
|
|
set(LIBC_TARGET_MACHINE ${CMAKE_SYSTEM_PROCESSOR})
|
|
|
|
|
|
|
|
include(CMakeParseArguments)
|
|
|
|
include(LLVMLibCRules)
|
|
|
|
|
|
|
|
add_subdirectory(src)
|
2019-12-05 15:17:14 +08:00
|
|
|
add_subdirectory(config)
|
|
|
|
add_subdirectory(include)
|
2019-11-06 03:40:26 +08:00
|
|
|
add_subdirectory(utils)
|
2020-01-04 04:00:45 +08:00
|
|
|
|
|
|
|
# The lib and test directories are added at the very end as tests
|
|
|
|
# and libraries potentially draw from the components present in all
|
|
|
|
# of the other directories.
|
|
|
|
add_subdirectory(lib)
|
|
|
|
add_subdirectory(test)
|
2020-02-22 11:14:51 +08:00
|
|
|
add_subdirectory(fuzzing)
|