Commit 2cf53299 authored by Tom Finegan's avatar Tom Finegan
Browse files

Automatically generate aom_config.{asm,h}.cmake templates.

- Generate aom_config.{asm,h}.cmake from aom_config_defaults.cmake
  using CMake script generate_aom_config_templates.cmake.
- Remove the copies from the repo, and update the build to use
  the generated templates.

BUG=https://bugs.chromium.org/p/aomedia/issues/detail?id=76

Change-Id: If8fd23095f5e4ddb9a7866d5f7bf2bd3864a4354
parent dead17d2
ARCH_ARM equ ${ARCH_ARM}
ARCH_MIPS equ ${ARCH_MIPS}
ARCH_X86 equ ${ARCH_X86}
ARCH_X86_64 equ ${ARCH_X86_64}
HAVE_EDSP equ ${HAVE_EDSP}
HAVE_MEDIA equ ${HAVE_MEDIA}
HAVE_NEON equ ${HAVE_NEON}
HAVE_NEON_ASM equ ${HAVE_NEON_ASM}
HAVE_MIPS32 equ ${HAVE_MIPS32}
HAVE_DSPR2 equ ${HAVE_DSPR2}
HAVE_MSA equ ${HAVE_MSA}
HAVE_MIPS64 equ ${HAVE_MIPS64}
HAVE_MMX equ ${HAVE_MMX}
HAVE_SSE equ ${HAVE_SSE}
HAVE_SSE2 equ ${HAVE_SSE2}
HAVE_SSE3 equ ${HAVE_SSE3}
HAVE_SSSE3 equ ${HAVE_SSSE3}
HAVE_SSE4_1 equ ${HAVE_SSE4_1}
HAVE_AVX equ ${HAVE_AVX}
HAVE_AVX2 equ ${HAVE_AVX2}
HAVE_AOM_PORTS equ ${HAVE_AOM_PORTS}
HAVE_FEXCEPT equ ${HAVE_FEXCEPT}
HAVE_PTHREAD_H equ ${HAVE_PTHREAD_H}
HAVE_UNISTD_H equ ${HAVE_UNISTD_H}
HAVE_WXWIDGETS equ ${HAVE_WXWIDGETS}
CONFIG_DEPENDENCY_TRACKING equ ${CONFIG_DEPENDENCY_TRACKING}
CONFIG_EXTERNAL_BUILD equ ${CONFIG_EXTERNAL_BUILD}
CONFIG_INSTALL_DOCS equ ${CONFIG_INSTALL_DOCS}
CONFIG_INSTALL_BINS equ ${CONFIG_INSTALL_BINS}
CONFIG_INSTALL_LIBS equ ${CONFIG_INSTALL_LIBS}
CONFIG_INSTALL_SRCS equ ${CONFIG_INSTALL_SRCS}
CONFIG_DEBUG equ ${CONFIG_DEBUG}
CONFIG_GPROF equ ${CONFIG_GPROF}
CONFIG_GCOV equ ${CONFIG_GCOV}
CONFIG_RVCT equ ${CONFIG_RVCT}
CONFIG_GCC equ ${CONFIG_GCC}
CONFIG_MSVS equ ${CONFIG_MSVS}
CONFIG_PIC equ ${CONFIG_PIC}
CONFIG_BIG_ENDIAN equ ${CONFIG_BIG_ENDIAN}
CONFIG_CODEC_SRCS equ ${CONFIG_CODEC_SRCS}
CONFIG_DEBUG_LIBS equ ${CONFIG_DEBUG_LIBS}
CONFIG_RUNTIME_CPU_DETECT equ ${CONFIG_RUNTIME_CPU_DETECT}
CONFIG_POSTPROC equ ${CONFIG_POSTPROC}
CONFIG_MULTITHREAD equ ${CONFIG_MULTITHREAD}
CONFIG_INTERNAL_STATS equ ${CONFIG_INTERNAL_STATS}
CONFIG_AV1_ENCODER equ ${CONFIG_AV1_ENCODER}
CONFIG_AV1_DECODER equ ${CONFIG_AV1_DECODER}
CONFIG_AV1 equ ${CONFIG_AV1}
CONFIG_ENCODERS equ ${CONFIG_ENCODERS}
CONFIG_DECODERS equ ${CONFIG_DECODERS}
CONFIG_STATIC_MSVCRT equ ${CONFIG_STATIC_MSVCRT}
CONFIG_SPATIAL_RESAMPLING equ ${CONFIG_SPATIAL_RESAMPLING}
CONFIG_REALTIME_ONLY equ ${CONFIG_REALTIME_ONLY}
CONFIG_ONTHEFLY_BITPACKING equ ${CONFIG_ONTHEFLY_BITPACKING}
CONFIG_ERROR_CONCEALMENT equ ${CONFIG_ERROR_CONCEALMENT}
CONFIG_SHARED equ ${CONFIG_SHARED}
CONFIG_STATIC equ ${CONFIG_STATIC}
CONFIG_SMALL equ ${CONFIG_SMALL}
CONFIG_POSTPROC_VISUALIZER equ ${CONFIG_POSTPROC_VISUALIZER}
CONFIG_OS_SUPPORT equ ${CONFIG_OS_SUPPORT}
CONFIG_UNIT_TESTS equ ${CONFIG_UNIT_TESTS}
CONFIG_WEBM_IO equ ${CONFIG_WEBM_IO}
CONFIG_LIBYUV equ ${CONFIG_LIBYUV}
CONFIG_ACCOUNTING equ ${CONFIG_ACCOUNTING}
CONFIG_INSPECTION equ ${CONFIG_INSPECTION}
CONFIG_DECODE_PERF_TESTS equ ${CONFIG_DECODE_PERF_TESTS}
CONFIG_ENCODE_PERF_TESTS equ ${CONFIG_ENCODE_PERF_TESTS}
CONFIG_COEFFICIENT_RANGE_CHECKING equ ${CONFIG_COEFFICIENT_RANGE_CHECKING}
CONFIG_LOWBITDEPTH equ ${CONFIG_LOWBITDEPTH}
CONFIG_HIGHBITDEPTH equ ${CONFIG_HIGHBITDEPTH}
CONFIG_EXPERIMENTAL equ ${CONFIG_EXPERIMENTAL}
CONFIG_SIZE_LIMIT equ ${CONFIG_SIZE_LIMIT}
CONFIG_AOM_QM equ ${CONFIG_AOM_QM}
CONFIG_FP_MB_STATS equ ${CONFIG_FP_MB_STATS}
CONFIG_CDEF equ ${CONFIG_CDEF}
CONFIG_VAR_TX equ ${CONFIG_VAR_TX}
CONFIG_RECT_TX equ ${CONFIG_RECT_TX}
CONFIG_REF_MV equ ${CONFIG_REF_MV}
CONFIG_TPL_MV equ ${CONFIG_TPL_MV}
CONFIG_DUAL_FILTER equ ${CONFIG_DUAL_FILTER}
CONFIG_CONVOLVE_ROUND equ ${CONFIG_CONVOLVE_ROUND}
CONFIG_EXT_TX equ ${CONFIG_EXT_TX}
CONFIG_TX64X64 equ ${CONFIG_TX64X64}
CONFIG_SUB8X8_MC equ ${CONFIG_SUB8X8_MC}
CONFIG_EXT_INTRA equ ${CONFIG_EXT_INTRA}
CONFIG_INTRA_INTERP equ ${CONFIG_INTRA_INTERP}
CONFIG_FILTER_INTRA equ ${CONFIG_FILTER_INTRA}
CONFIG_EXT_INTER equ ${CONFIG_EXT_INTER}
CONFIG_INTERINTRA equ ${CONFIG_INTERINTRA}
CONFIG_WEDGE equ ${CONFIG_WEDGE}
CONFIG_COMPOUND_SEGMENT equ ${CONFIG_COMPOUND_SEGMENT}
CONFIG_EXT_REFS equ ${CONFIG_EXT_REFS}
CONFIG_GLOBAL_MOTION equ ${CONFIG_GLOBAL_MOTION}
CONFIG_NEW_QUANT equ ${CONFIG_NEW_QUANT}
CONFIG_SUPERTX equ ${CONFIG_SUPERTX}
CONFIG_ANS equ ${CONFIG_ANS}
CONFIG_EC_MULTISYMBOL equ ${CONFIG_EC_MULTISYMBOL}
CONFIG_NEW_TOKENSET equ ${CONFIG_NEW_TOKENSET}
CONFIG_LOOP_RESTORATION equ ${CONFIG_LOOP_RESTORATION}
CONFIG_EXT_PARTITION equ ${CONFIG_EXT_PARTITION}
CONFIG_EXT_PARTITION_TYPES equ ${CONFIG_EXT_PARTITION_TYPES}
CONFIG_UNPOISON_PARTITION_CTX equ ${CONFIG_UNPOISON_PARTITION_CTX}
CONFIG_EXT_TILE equ ${CONFIG_EXT_TILE}
CONFIG_MOTION_VAR equ ${CONFIG_MOTION_VAR}
CONFIG_NCOBMC equ ${CONFIG_NCOBMC}
CONFIG_WARPED_MOTION equ ${CONFIG_WARPED_MOTION}
CONFIG_ENTROPY equ ${CONFIG_ENTROPY}
CONFIG_Q_ADAPT_PROBS equ ${CONFIG_Q_ADAPT_PROBS}
CONFIG_SUBFRAME_PROB_UPDATE equ ${CONFIG_SUBFRAME_PROB_UPDATE}
CONFIG_BITSTREAM_DEBUG equ ${CONFIG_BITSTREAM_DEBUG}
CONFIG_ALT_INTRA equ ${CONFIG_ALT_INTRA}
CONFIG_PALETTE equ ${CONFIG_PALETTE}
CONFIG_DAALA_EC equ ${CONFIG_DAALA_EC}
CONFIG_RAWBITS equ ${CONFIG_RAWBITS}
CONFIG_PVQ equ ${CONFIG_PVQ}
CONFIG_XIPHRC equ ${CONFIG_XIPHRC}
CONFIG_CB4X4 equ ${CONFIG_CB4X4}
CONFIG_CHROMA_2X2 equ ${CONFIG_CHROMA_2X2}
CONFIG_FRAME_SIZE equ ${CONFIG_FRAME_SIZE}
CONFIG_DELTA_Q equ ${CONFIG_DELTA_Q}
CONFIG_ADAPT_SCAN equ ${CONFIG_ADAPT_SCAN}
CONFIG_FILTER_7BIT equ ${CONFIG_FILTER_7BIT}
CONFIG_PARALLEL_DEBLOCKING equ ${CONFIG_PARALLEL_DEBLOCKING}
CONFIG_PARALLEL_DEBLOCKING_15TAP equ ${CONFIG_PARALLEL_DEBLOCKING_15TAP}
CONFIG_LOOPFILTERING_ACROSS_TILES equ ${CONFIG_LOOPFILTERING_ACROSS_TILES}
CONFIG_TILE_GROUPS equ ${CONFIG_TILE_GROUPS}
CONFIG_EC_ADAPT equ ${CONFIG_EC_ADAPT}
CONFIG_TEMPMV_SIGNALING equ ${CONFIG_TEMPMV_SIGNALING}
CONFIG_RD_DEBUG equ ${CONFIG_RD_DEBUG}
CONFIG_REFERENCE_BUFFER equ ${CONFIG_REFERENCE_BUFFER}
CONFIG_COEF_INTERLEAVE equ ${CONFIG_COEF_INTERLEAVE}
CONFIG_ENTROPY_STATS equ ${CONFIG_ENTROPY_STATS}
CONFIG_MASKED_TX equ ${CONFIG_MASKED_TX}
CONFIG_DEPENDENT_HORZTILES equ ${CONFIG_DEPENDENT_HORZTILES}
CONFIG_DAALA_DIST equ ${CONFIG_DAALA_DIST}
CONFIG_TRIPRED equ ${CONFIG_TRIPRED}
CONFIG_PALETTE_THROUGHPUT equ ${CONFIG_PALETTE_THROUGHPUT}
CONFIG_REF_ADAPT equ ${CONFIG_REF_ADAPT}
CONFIG_LV_MAP equ ${CONFIG_LV_MAP}
CONFIG_MV_COMPRESS equ ${CONFIG_MV_COMPRESS}
CONFIG_FRAME_SUPERRES equ ${CONFIG_FRAME_SUPERRES}
CONFIG_NEW_MULTISYMBOL equ ${CONFIG_NEW_MULTISYMBOL}
CONFIG_ANALYZER equ ${CONFIG_ANALYZER}
/*
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
/* This file is processed by cmake and used to produce aom_config.h in the
* directory where cmake was executed. */
#ifndef AOM_CONFIG_H
#define AOM_CONFIG_H
#define RESTRICT ${RESTRICT}
#define INLINE ${INLINE}
#define ARCH_ARM ${ARCH_ARM}
#define ARCH_MIPS ${ARCH_MIPS}
#define ARCH_X86 ${ARCH_X86}
#define ARCH_X86_64 ${ARCH_X86_64}
#define HAVE_EDSP ${HAVE_EDSP}
#define HAVE_MEDIA ${HAVE_MEDIA}
#define HAVE_NEON ${HAVE_NEON}
#define HAVE_NEON_ASM ${HAVE_NEON_ASM}
#define HAVE_MIPS32 ${HAVE_MIPS32}
#define HAVE_DSPR2 ${HAVE_DSPR2}
#define HAVE_MSA ${HAVE_MSA}
#define HAVE_MIPS64 ${HAVE_MIPS64}
#define HAVE_MMX ${HAVE_MMX}
#define HAVE_SSE ${HAVE_SSE}
#define HAVE_SSE2 ${HAVE_SSE2}
#define HAVE_SSE3 ${HAVE_SSE3}
#define HAVE_SSSE3 ${HAVE_SSSE3}
#define HAVE_SSE4_1 ${HAVE_SSE4_1}
#define HAVE_AVX ${HAVE_AVX}
#define HAVE_AVX2 ${HAVE_AVX2}
#define HAVE_AOM_PORTS ${HAVE_AOM_PORTS}
#define HAVE_FEXCEPT ${HAVE_FEXCEPT}
#define HAVE_PTHREAD_H ${HAVE_PTHREAD_H}
#define HAVE_UNISTD_H ${HAVE_UNISTD_H}
#define HAVE_WXWIDGETS ${HAVE_WXWIDGETS}
#define CONFIG_DEPENDENCY_TRACKING ${CONFIG_DEPENDENCY_TRACKING}
#define CONFIG_EXTERNAL_BUILD ${CONFIG_EXTERNAL_BUILD}
#define CONFIG_INSTALL_DOCS ${CONFIG_INSTALL_DOCS}
#define CONFIG_INSTALL_BINS ${CONFIG_INSTALL_BINS}
#define CONFIG_INSTALL_LIBS ${CONFIG_INSTALL_LIBS}
#define CONFIG_INSTALL_SRCS ${CONFIG_INSTALL_SRCS}
#define CONFIG_DEBUG ${CONFIG_DEBUG}
#define CONFIG_GPROF ${CONFIG_GPROF}
#define CONFIG_GCOV ${CONFIG_GCOV}
#define CONFIG_RVCT ${CONFIG_RVCT}
#define CONFIG_GCC ${CONFIG_GCC}
#define CONFIG_MSVS ${CONFIG_MSVS}
#define CONFIG_PIC ${CONFIG_PIC}
#define CONFIG_BIG_ENDIAN ${CONFIG_BIG_ENDIAN}
#define CONFIG_CODEC_SRCS ${CONFIG_CODEC_SRCS}
#define CONFIG_DEBUG_LIBS ${CONFIG_DEBUG_LIBS}
#define CONFIG_RUNTIME_CPU_DETECT ${CONFIG_RUNTIME_CPU_DETECT}
#define CONFIG_POSTPROC ${CONFIG_POSTPROC}
#define CONFIG_MULTITHREAD ${CONFIG_MULTITHREAD}
#define CONFIG_INTERNAL_STATS ${CONFIG_INTERNAL_STATS}
#define CONFIG_AV1_ENCODER ${CONFIG_AV1_ENCODER}
#define CONFIG_AV1_DECODER ${CONFIG_AV1_DECODER}
#define CONFIG_AV1 ${CONFIG_AV1}
#define CONFIG_ENCODERS ${CONFIG_ENCODERS}
#define CONFIG_DECODERS ${CONFIG_DECODERS}
#define CONFIG_STATIC_MSVCRT ${CONFIG_STATIC_MSVCRT}
#define CONFIG_SPATIAL_RESAMPLING ${CONFIG_SPATIAL_RESAMPLING}
#define CONFIG_REALTIME_ONLY ${CONFIG_REALTIME_ONLY}
#define CONFIG_ONTHEFLY_BITPACKING ${CONFIG_ONTHEFLY_BITPACKING}
#define CONFIG_ERROR_CONCEALMENT ${CONFIG_ERROR_CONCEALMENT}
#define CONFIG_SHARED ${CONFIG_SHARED}
#define CONFIG_STATIC ${CONFIG_STATIC}
#define CONFIG_SMALL ${CONFIG_SMALL}
#define CONFIG_POSTPROC_VISUALIZER ${CONFIG_POSTPROC_VISUALIZER}
#define CONFIG_OS_SUPPORT ${CONFIG_OS_SUPPORT}
#define CONFIG_UNIT_TESTS ${CONFIG_UNIT_TESTS}
#define CONFIG_WEBM_IO ${CONFIG_WEBM_IO}
#define CONFIG_LIBYUV ${CONFIG_LIBYUV}
#define CONFIG_ACCOUNTING ${CONFIG_ACCOUNTING}
#define CONFIG_INSPECTION ${CONFIG_INSPECTION}
#define CONFIG_DECODE_PERF_TESTS ${CONFIG_DECODE_PERF_TESTS}
#define CONFIG_ENCODE_PERF_TESTS ${CONFIG_ENCODE_PERF_TESTS}
#define CONFIG_COEFFICIENT_RANGE_CHECKING ${CONFIG_COEFFICIENT_RANGE_CHECKING}
#define CONFIG_LOWBITDEPTH ${CONFIG_LOWBITDEPTH}
#define CONFIG_HIGHBITDEPTH ${CONFIG_HIGHBITDEPTH}
#define CONFIG_EXPERIMENTAL ${CONFIG_EXPERIMENTAL}
#define CONFIG_SIZE_LIMIT ${CONFIG_SIZE_LIMIT}
#define CONFIG_AOM_QM ${CONFIG_AOM_QM}
#define CONFIG_FP_MB_STATS ${CONFIG_FP_MB_STATS}
#define CONFIG_CDEF ${CONFIG_CDEF}
#define CONFIG_VAR_TX ${CONFIG_VAR_TX}
#define CONFIG_RECT_TX ${CONFIG_RECT_TX}
#define CONFIG_REF_MV ${CONFIG_REF_MV}
#define CONFIG_TPL_MV ${CONFIG_TPL_MV}
#define CONFIG_DUAL_FILTER ${CONFIG_DUAL_FILTER}
#define CONFIG_CONVOLVE_ROUND ${CONFIG_CONVOLVE_ROUND}
#define CONFIG_EXT_TX ${CONFIG_EXT_TX}
#define CONFIG_TX64X64 ${CONFIG_TX64X64}
#define CONFIG_SUB8X8_MC ${CONFIG_SUB8X8_MC}
#define CONFIG_EXT_INTRA ${CONFIG_EXT_INTRA}
#define CONFIG_INTRA_INTERP ${CONFIG_INTRA_INTERP}
#define CONFIG_FILTER_INTRA ${CONFIG_FILTER_INTRA}
#define CONFIG_EXT_INTER ${CONFIG_EXT_INTER}
#define CONFIG_INTERINTRA ${CONFIG_INTERINTRA}
#define CONFIG_WEDGE ${CONFIG_WEDGE}
#define CONFIG_COMPOUND_SEGMENT ${CONFIG_COMPOUND_SEGMENT}
#define CONFIG_EXT_REFS ${CONFIG_EXT_REFS}
#define CONFIG_GLOBAL_MOTION ${CONFIG_GLOBAL_MOTION}
#define CONFIG_NEW_QUANT ${CONFIG_NEW_QUANT}
#define CONFIG_SUPERTX ${CONFIG_SUPERTX}
#define CONFIG_ANS ${CONFIG_ANS}
#define CONFIG_EC_MULTISYMBOL ${CONFIG_EC_MULTISYMBOL}
#define CONFIG_NEW_TOKENSET ${CONFIG_NEW_TOKENSET}
#define CONFIG_LOOP_RESTORATION ${CONFIG_LOOP_RESTORATION}
#define CONFIG_EXT_PARTITION ${CONFIG_EXT_PARTITION}
#define CONFIG_EXT_PARTITION_TYPES ${CONFIG_EXT_PARTITION_TYPES}
#define CONFIG_UNPOISON_PARTITION_CTX ${CONFIG_UNPOISON_PARTITION_CTX}
#define CONFIG_EXT_TILE ${CONFIG_EXT_TILE}
#define CONFIG_MOTION_VAR ${CONFIG_MOTION_VAR}
#define CONFIG_NCOBMC ${CONFIG_NCOBMC}
#define CONFIG_WARPED_MOTION ${CONFIG_WARPED_MOTION}
#define CONFIG_ENTROPY ${CONFIG_ENTROPY}
#define CONFIG_Q_ADAPT_PROBS ${CONFIG_Q_ADAPT_PROBS}
#define CONFIG_SUBFRAME_PROB_UPDATE ${CONFIG_SUBFRAME_PROB_UPDATE}
#define CONFIG_BITSTREAM_DEBUG ${CONFIG_BITSTREAM_DEBUG}
#define CONFIG_ALT_INTRA ${CONFIG_ALT_INTRA}
#define CONFIG_PALETTE ${CONFIG_PALETTE}
#define CONFIG_DAALA_EC ${CONFIG_DAALA_EC}
#define CONFIG_RAWBITS ${CONFIG_RAWBITS}
#define CONFIG_PVQ ${CONFIG_PVQ}
#define CONFIG_XIPHRC ${CONFIG_XIPHRC}
#define CONFIG_CB4X4 ${CONFIG_CB4X4}
#define CONFIG_CHROMA_2X2 ${CONFIG_CHROMA_2X2}
#define CONFIG_FRAME_SIZE ${CONFIG_FRAME_SIZE}
#define CONFIG_DELTA_Q ${CONFIG_DELTA_Q}
#define CONFIG_ADAPT_SCAN ${CONFIG_ADAPT_SCAN}
#define CONFIG_FILTER_7BIT ${CONFIG_FILTER_7BIT}
#define CONFIG_PARALLEL_DEBLOCKING ${CONFIG_PARALLEL_DEBLOCKING}
#define CONFIG_PARALLEL_DEBLOCKING_15TAP ${CONFIG_PARALLEL_DEBLOCKING_15TAP}
#define CONFIG_LOOPFILTERING_ACROSS_TILES ${CONFIG_LOOPFILTERING_ACROSS_TILES}
#define CONFIG_TILE_GROUPS ${CONFIG_TILE_GROUPS}
#define CONFIG_EC_ADAPT ${CONFIG_EC_ADAPT}
#define CONFIG_TEMPMV_SIGNALING ${CONFIG_TEMPMV_SIGNALING}
#define CONFIG_RD_DEBUG ${CONFIG_RD_DEBUG}
#define CONFIG_REFERENCE_BUFFER ${CONFIG_REFERENCE_BUFFER}
#define CONFIG_COEF_INTERLEAVE ${CONFIG_COEF_INTERLEAVE}
#define CONFIG_ENTROPY_STATS ${CONFIG_ENTROPY_STATS}
#define CONFIG_MASKED_TX ${CONFIG_MASKED_TX}
#define CONFIG_DEPENDENT_HORZTILES ${CONFIG_DEPENDENT_HORZTILES}
#define CONFIG_DAALA_DIST ${CONFIG_DAALA_DIST}
#define CONFIG_TRIPRED ${CONFIG_TRIPRED}
#define CONFIG_PALETTE_THROUGHPUT ${CONFIG_PALETTE_THROUGHPUT}
#define CONFIG_REF_ADAPT ${CONFIG_REF_ADAPT}
#define CONFIG_LV_MAP ${CONFIG_LV_MAP}
#define CONFIG_MV_COMPRESS ${CONFIG_MV_COMPRESS}
#define CONFIG_FRAME_SUPERRES ${CONFIG_FRAME_SUPERRES}
#define CONFIG_NEW_MULTISYMBOL ${CONFIG_NEW_MULTISYMBOL}
#define CONFIG_ANALYZER ${CONFIG_ANALYZER}
#endif /* AOM_CONFIG_H */
......@@ -204,13 +204,17 @@ if (NOT MSVC)
aom_pop_var(CMAKE_REQUIRED_LIBRARIES)
endif()
# TODO(tomfinegan): consume trailing whitespace after configure_file() when
# target platform check produces empty INLINE and RESTRICT values (aka empty
# values require special casing).
configure_file("${AOM_ROOT}/build/cmake/aom_config.h.cmake"
"${AOM_CONFIG_DIR}/aom_config.h")
configure_file("${AOM_ROOT}/build/cmake/aom_config.asm.cmake"
"${AOM_CONFIG_DIR}/aom_config.asm")
# Generate aom_config templates.
set(aom_config_asm_template "${AOM_CONFIG_DIR}/aom_config.asm.cmake")
set(aom_config_h_template "${AOM_CONFIG_DIR}/aom_config.h.cmake")
execute_process(COMMAND ${CMAKE_COMMAND}
-DAOM_CONFIG_DIR=${AOM_CONFIG_DIR}
-DAOM_ROOT=${AOM_ROOT}
-P "${AOM_ROOT}/build/cmake/generate_aom_config_templates.cmake")
# Generate aom_config.{asm,h}.
configure_file("${aom_config_asm_template}" "${AOM_CONFIG_DIR}/aom_config.asm")
configure_file("${aom_config_h_template}" "${AOM_CONFIG_DIR}/aom_config.h")
# Read the current git hash.
find_package(Git)
......
##
## Copyright (c) 2017, Alliance for Open Media. All rights reserved
##
## This source code is subject to the terms of the BSD 2 Clause License and
## the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
## was not distributed with this source code in the LICENSE file, you can
## obtain it at www.aomedia.org/license/software. If the Alliance for Open
## Media Patent License 1.0 was not distributed with this source code in the
## PATENTS file, you can obtain it at www.aomedia.org/license/patent.
##
cmake_minimum_required(VERSION 3.5)
string(TIMESTAMP year "%Y")
set(asm_file_header_block
"\;
\; Copyright (c) ${year}, Alliance for Open Media. All rights reserved
\;
\; This source code is subject to the terms of the BSD 2 Clause License and
\; the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
\; was not distributed with this source code in the LICENSE file, you can
\; obtain it at www.aomedia.org/license/software. If the Alliance for Open
\; Media Patent License 1.0 was not distributed with this source code in the
\; PATENTS file, you can obtain it at www.aomedia.org/license/patent.
\;
")
set(h_file_header_block
"/*
* Copyright (c) ${year}, Alliance for Open Media. All rights reserved
*
* This source code is subject to the terms of the BSD 2 Clause License and
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
* was not distributed with this source code in the LICENSE file, you can
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
*/
\#ifndef AOM_CONFIG_H_
\#define AOM_CONFIG_H_
")
# Terminates cmake execution when $var_name is an empty string, or the variable
# name it contains does not expand to an existing directory.
function (check_directory_var var_name)
if ("${var_name}" STREQUAL "")
message(FATAL_ERROR "The CMake variable ${var_name} must be defined.")
endif ()
if (NOT EXISTS "${${var_name}}")
message(FATAL_ERROR "${${var_name}} (${var_name}) missing.")
endif ()
endfunction ()
check_directory_var(AOM_CONFIG_DIR)
check_directory_var(AOM_ROOT)
set(AOM_DEFAULTS "${AOM_ROOT}/build/cmake/aom_config_defaults.cmake")
if (NOT EXISTS "${AOM_DEFAULTS}")
message(FATAL_ERROR
"Configuration default values file (${AOM_DEFAULTS}) missing.")
endif ()
include("${AOM_ROOT}/build/cmake/aom_config_defaults.cmake")
get_cmake_property(cmake_cache_vars CACHE_VARIABLES)
set(aom_config_h_template "${AOM_CONFIG_DIR}/aom_config.h.cmake")
file(WRITE "${aom_config_h_template}" ${h_file_header_block})
foreach(cache_var ${cmake_cache_vars})
if (NOT "${cache_var}" MATCHES "AOM_CONFIG_DIR\|AOM_ROOT\|^CMAKE_")
file(APPEND
"${aom_config_h_template}" "\#define ${cache_var} \${${cache_var}}\n")
endif ()
endforeach()
file(APPEND "${aom_config_h_template}" "\#endif /* AOM_CONFIG_H_ */")
set(aom_asm_config_template "${AOM_CONFIG_DIR}/aom_config.asm.cmake")
file(WRITE "${aom_asm_config_template}" ${asm_file_header_block})
foreach(cache_var ${cmake_cache_vars})
if (NOT "${cache_var}" MATCHES
"AOM_CONFIG_DIR\|AOM_ROOT\|^CMAKE_\|INLINE\|RESTRICT")
file(APPEND "${aom_asm_config_template}"
"${cache_var} equ \${${cache_var}}\n")
endif ()
endforeach ()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment