diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-01-31 17:22:33 +0300 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-01-31 17:22:33 +0300 |
commit | 52be5dbdd420165c68e7e90ba8f1d2f00da041f6 (patch) | |
tree | 5d47f5b2ff4e6a7c8e75d33931a1e683949b7229 /build/export_generators/hardcoded-cmake/cmake | |
parent | ea57c8867ceca391357c3c5ffcc5ba6738b49adc (diff) | |
parent | 809f0cf2fdfddfbeacc2256ffdbaaf5808ce5ed4 (diff) | |
download | ydb-52be5dbdd420165c68e7e90ba8f1d2f00da041f6.tar.gz |
Merge branch 'mergelibs12' into main
Diffstat (limited to 'build/export_generators/hardcoded-cmake/cmake')
3 files changed, 23 insertions, 11 deletions
diff --git a/build/export_generators/hardcoded-cmake/cmake/common.cmake b/build/export_generators/hardcoded-cmake/cmake/common.cmake index f85875ec40..98313341a5 100644 --- a/build/export_generators/hardcoded-cmake/cmake/common.cmake +++ b/build/export_generators/hardcoded-cmake/cmake/common.cmake @@ -103,7 +103,7 @@ endfunction() function(generate_enum_serilization Tgt Input) set(opts "") - set(oneval_args INCLUDE_HEADERS) + set(oneval_args INCLUDE_HEADERS GEN_HEADER) set(multival_args "") cmake_parse_arguments(ENUM_SERIALIZATION_ARGS "${opts}" @@ -116,7 +116,7 @@ function(generate_enum_serilization Tgt Input) get_filename_component(BaseName ${Input} NAME) add_custom_command( - OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp + OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp ${ENUM_SERIALIZATION_ARGS_GEN_HEADER} COMMAND ${enum_parser_bin} ${Input} @@ -124,6 +124,9 @@ function(generate_enum_serilization Tgt Input) --output ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp DEPENDS ${Input} ${enum_parser_dependency} ) + if (ENUM_SERIALIZATION_ARGS_GEN_HEADER) + set_property(SOURCE ${ENUM_SERIALIZATION_ARGS_GEN_HEADER} PROPERTY GENERATED On) + endif() target_sources(${Tgt} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/${BaseName}_serialized.cpp) endfunction() diff --git a/build/export_generators/hardcoded-cmake/cmake/conan.cmake b/build/export_generators/hardcoded-cmake/cmake/conan.cmake index 9a5dee5d81..a8e812acbd 100644 --- a/build/export_generators/hardcoded-cmake/cmake/conan.cmake +++ b/build/export_generators/hardcoded-cmake/cmake/conan.cmake @@ -92,10 +92,12 @@ macro(_conan_check_system_name) set(CONAN_SYSTEM_NAME ${CMAKE_SYSTEM_NAME}) if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin") set(CONAN_SYSTEM_NAME Macos) + message(STATUS "CMake-Conan: cmake_osx_deployment_target=${CMAKE_OSX_DEPLOYMENT_TARGET}") + set(_CONAN_SETTING_OS_VERSION ${CMAKE_OSX_DEPLOYMENT_TARGET}) endif() if(${CMAKE_SYSTEM_NAME} STREQUAL "QNX") set(CONAN_SYSTEM_NAME Neutrino) - endif() + endif() set(CONAN_SUPPORTED_PLATFORMS Windows Linux Macos Android iOS FreeBSD WindowsStore WindowsCE watchOS tvOS FreeBSD SunOS AIX Arduino Emscripten Neutrino) list (FIND CONAN_SUPPORTED_PLATFORMS "${CONAN_SYSTEM_NAME}" _index) if (${_index} GREATER -1) @@ -279,7 +281,7 @@ function(conan_cmake_settings result) endforeach() if(NOT _SETTINGS OR ARGUMENTS_PROFILE_AUTO STREQUAL "ALL") - set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version + set(ARGUMENTS_PROFILE_AUTO arch os.version build_type compiler compiler.version compiler.runtime compiler.libcxx compiler.toolset) endif() @@ -288,7 +290,7 @@ function(conan_cmake_settings result) string(REGEX MATCH "[^=]*" MANUAL_SETTING "${ARG}") message(STATUS "Conan: ${MANUAL_SETTING} was added as an argument. Not using the autodetected one.") list(REMOVE_ITEM ARGUMENTS_PROFILE_AUTO "${MANUAL_SETTING}") - endforeach() + endforeach() # Automatic from CMake foreach(ARG ${ARGUMENTS_PROFILE_AUTO}) @@ -407,7 +409,7 @@ function(conan_cmake_detect_vs_runtime result) string(TOUPPER "${build_type}" build_type) endif() - if (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) + if (DEFINED CMAKE_MSVC_RUNTIME_LIBRARY) if(${CMAKE_MSVC_RUNTIME_LIBRARY} STREQUAL MultiThreaded) set(${result} "MT" PARENT_SCOPE) elseif(${CMAKE_MSVC_RUNTIME_LIBRARY} STREQUAL MultiThreadedDebug) @@ -455,7 +457,7 @@ function(conan_cmake_detect_vs_runtime result) endfunction() function(_collect_settings result) - set(ARGUMENTS_PROFILE_AUTO arch build_type compiler compiler.version + set(ARGUMENTS_PROFILE_AUTO arch os.version build_type compiler compiler.version compiler.runtime compiler.libcxx compiler.toolset compiler.cppstd) foreach(ARG ${ARGUMENTS_PROFILE_AUTO}) @@ -649,12 +651,12 @@ function(conan_cmake_install) set(NO_IMPORTS --no-imports) endif() set(install_args install ${PATH_OR_REFERENCE} ${REFERENCE} ${UPDATE} ${NO_IMPORTS} ${REMOTE} ${LOCKFILE} ${LOCKFILE_OUT} ${LOCKFILE_NODE_ID} ${INSTALL_FOLDER} - ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD} + ${GENERATOR} ${BUILD} ${ENV} ${ENV_HOST} ${ENV_BUILD} ${OPTIONS} ${OPTIONS_HOST} ${OPTIONS_BUILD} ${PROFILE} ${PROFILE_HOST} ${PROFILE_BUILD} ${SETTINGS} ${SETTINGS_HOST} ${SETTINGS_BUILD} ${CONF}) string(REPLACE ";" " " _install_args "${install_args}") message(STATUS "Conan executing: ${CONAN_CMD} ${_install_args}") - + if(ARGS_OUTPUT_QUIET) set(OUTPUT_OPT OUTPUT_QUIET) endif() @@ -771,7 +773,7 @@ endmacro() macro(conan_cmake_run) conan_parse_arguments(${ARGV}) - + if(ARGUMENTS_CONFIGURATION_TYPES AND NOT CMAKE_CONFIGURATION_TYPES) message(WARNING "CONFIGURATION_TYPES should only be specified for multi-configuration generators") elseif(ARGUMENTS_CONFIGURATION_TYPES AND ARGUMENTS_BUILD_TYPE) @@ -849,7 +851,7 @@ macro(conan_check) if(NOT "${return_code}" STREQUAL "0") message(FATAL_ERROR "Conan --version failed='${return_code}'") endif() - + if(NOT CONAN_DETECT_QUIET) string(STRIP "${CONAN_VERSION_OUTPUT}" _CONAN_VERSION_OUTPUT) message(STATUS "Conan: Version found ${_CONAN_VERSION_OUTPUT}") diff --git a/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake b/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake index a81af88c70..a9c619efc6 100644 --- a/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake +++ b/build/export_generators/hardcoded-cmake/cmake/global_flags.compiler.gnu.march.cmake @@ -29,6 +29,13 @@ if (CMAKE_SYSTEM_PROCESSOR MATCHES "^(i686|x86_64|AMD64)$") if (CMAKE_SYSTEM_NAME STREQUAL "Linux") string(APPEND _GNU_MARCH_C_CXX_FLAGS " -D_YNDX_LIBUNWIND_ENABLE_EXCEPTION_BACKTRACE") endif() +elseif (CMAKE_SYSTEM_PROCESSOR MATCHES "^(arm64|aarch64)$") + if (CMAKE_SYSTEM_NAME MATCHES "^(Darwin|Linux)$") + # Clang 13+ generates outline atomics by default if '-rtlib=compiler_rt' is specified or system's + # libgcc version is >= 9.3.1 : https://github.com/llvm/llvm-project/commit/c5e7e649d537067dec7111f3de1430d0fc8a4d11 + # Disable this behaviour because our build links with contrib/libs/cxxsupp/builtins that does not contain outline atomics yet + string(APPEND _GNU_MARCH_C_CXX_FLAGS " -mno-outline-atomics") + endif() elseif (ANDROID AND (CMAKE_ANDROID_ARCH_ABI STREQUAL "armeabi-v7a")) string(APPEND _GNU_MARCH_C_CXX_FLAGS " -mfloat-abi=softfp") endif() |