Sha256: 8b3b2211a237ae8b5dc6af30acb5b7d08b5ead131d5e48783c77fb6bce1159d2

Contents?: true

Size: 1.08 KB

Versions: 1

Compression:

Stored size: 1.08 KB

Contents

# Written in 2017 by Henrik Steffen Gaßmann henrik@gassmann.onl
#
# To the extent possible under law, the author(s) have dedicated all
# copyright and related and neighboring rights to this software to the
# public domain worldwide. This software is distributed without any warranty.
#
# You should have received a copy of the CC0 Public Domain Dedication
# along with this software. If not, see
#
#     http://creativecommons.org/publicdomain/zero/1.0/
#
########################################################################

set(TARGET_ARCHITECTURE_TEST_FILE "${CMAKE_CURRENT_LIST_DIR}/../test-arch.c")

function(detect_target_architecture OUTPUT_VARIABLE)
    message(STATUS "${CMAKE_CURRENT_LIST_DIR}")
    try_compile(_IGNORED "${CMAKE_CURRENT_BINARY_DIR}"
        "${TARGET_ARCHITECTURE_TEST_FILE}"
        OUTPUT_VARIABLE _LOG
    )

    string(REGEX MATCH "##arch=([^#]+)##" _IGNORED "${_LOG}")

    set(${OUTPUT_VARIABLE} "${CMAKE_MATCH_1}" PARENT_SCOPE)
    if (CMAKE_MATCH_1 STREQUAL "unknown")
        message(WARNING "could not detect the target architecture.")
    endif()
endfunction()

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ob64-0.5.0 vendor/libbase64/cmake/Modules/TargetArch.cmake