• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#
2# Copyright (c) 2016, Alliance for Open Media. All rights reserved
3#
4# This source code is subject to the terms of the BSD 2 Clause License and the
5# Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License was
6# not distributed with this source code in the LICENSE file, you can obtain it
7# at www.aomedia.org/license/software. If the Alliance for Open Media Patent
8# License 1.0 was not distributed with this source code in the PATENTS file, you
9# can obtain it at www.aomedia.org/license/patent.
10#
11if(AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_)
12  return()
13endif() # AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_
14set(AOM_BUILD_CMAKE_AOM_CONFIGURE_CMAKE_ 1)
15
16include(FindGit)
17include(FindPerl)
18include(FindThreads)
19
20include("${AOM_ROOT}/build/cmake/aom_config_defaults.cmake")
21include("${AOM_ROOT}/build/cmake/aom_experiment_deps.cmake")
22include("${AOM_ROOT}/build/cmake/aom_optimization.cmake")
23include("${AOM_ROOT}/build/cmake/compiler_flags.cmake")
24include("${AOM_ROOT}/build/cmake/compiler_tests.cmake")
25include("${AOM_ROOT}/build/cmake/util.cmake")
26
27if(DEFINED CONFIG_LOWBITDEPTH)
28  message(WARNING "CONFIG_LOWBITDEPTH has been removed. \
29    Use -DFORCE_HIGHBITDEPTH_DECODING=1 instead of -DCONFIG_LOWBITDEPTH=0 \
30    and -DFORCE_HIGHBITDEPTH_DECODING=0 instead of -DCONFIG_LOWBITDEPTH=1.")
31  if(NOT CONFIG_LOWBITDEPTH)
32    set(FORCE_HIGHBITDEPTH_DECODING
33        1
34        CACHE STRING "${cmake_cmdline_helpstring}" FORCE)
35  endif()
36endif()
37
38if(FORCE_HIGHBITDEPTH_DECODING AND NOT CONFIG_AV1_HIGHBITDEPTH)
39  change_config_and_warn(CONFIG_AV1_HIGHBITDEPTH 1
40                         "FORCE_HIGHBITDEPTH_DECODING")
41endif()
42
43if(CONFIG_THREE_PASS AND NOT CONFIG_AV1_DECODER)
44  change_config_and_warn(CONFIG_THREE_PASS 0 "CONFIG_AV1_DECODER=0")
45endif()
46
47# Generate the user config settings.
48list(APPEND aom_build_vars ${AOM_CONFIG_VARS} ${AOM_OPTION_VARS})
49foreach(cache_var ${aom_build_vars})
50  get_property(cache_var_helpstring CACHE ${cache_var} PROPERTY HELPSTRING)
51  if(cache_var_helpstring STREQUAL cmake_cmdline_helpstring)
52    set(AOM_CMAKE_CONFIG "${AOM_CMAKE_CONFIG} -D${cache_var}=${${cache_var}}")
53  endif()
54endforeach()
55string(STRIP "${AOM_CMAKE_CONFIG}" AOM_CMAKE_CONFIG)
56
57# Detect target CPU.
58if(NOT AOM_TARGET_CPU)
59  string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" cpu_lowercase)
60  if(cpu_lowercase STREQUAL "amd64" OR cpu_lowercase STREQUAL "x86_64")
61    if(CMAKE_SIZEOF_VOID_P EQUAL 4)
62      set(AOM_TARGET_CPU "x86")
63    elseif(CMAKE_SIZEOF_VOID_P EQUAL 8)
64      set(AOM_TARGET_CPU "x86_64")
65    else()
66      message(
67        FATAL_ERROR "--- Unexpected pointer size (${CMAKE_SIZEOF_VOID_P}) for\n"
68                    "      CMAKE_SYSTEM_NAME=${CMAKE_SYSTEM_NAME}\n"
69                    "      CMAKE_SYSTEM_PROCESSOR=${CMAKE_SYSTEM_PROCESSOR}\n"
70                    "      CMAKE_GENERATOR=${CMAKE_GENERATOR}\n")
71    endif()
72  elseif(cpu_lowercase STREQUAL "i386" OR cpu_lowercase STREQUAL "x86")
73    set(AOM_TARGET_CPU "x86")
74  elseif(cpu_lowercase MATCHES "^arm")
75    set(AOM_TARGET_CPU "${cpu_lowercase}")
76  elseif(cpu_lowercase MATCHES "aarch64")
77    set(AOM_TARGET_CPU "arm64")
78  elseif(cpu_lowercase MATCHES "^ppc")
79    set(AOM_TARGET_CPU "ppc")
80  else()
81    message(WARNING "The architecture ${CMAKE_SYSTEM_PROCESSOR} is not "
82                    "supported, falling back to the generic target")
83    set(AOM_TARGET_CPU "generic")
84  endif()
85endif()
86
87if(CMAKE_TOOLCHAIN_FILE) # Add toolchain file to config string.
88  if(IS_ABSOLUTE "${CMAKE_TOOLCHAIN_FILE}")
89    file(RELATIVE_PATH toolchain_path "${AOM_CONFIG_DIR}"
90         "${CMAKE_TOOLCHAIN_FILE}")
91  else()
92    set(toolchain_path "${CMAKE_TOOLCHAIN_FILE}")
93  endif()
94  set(toolchain_string "-DCMAKE_TOOLCHAIN_FILE=\\\"${toolchain_path}\\\"")
95  set(AOM_CMAKE_CONFIG "${toolchain_string} ${AOM_CMAKE_CONFIG}")
96else()
97
98  # Add detected CPU to the config string.
99  set(AOM_CMAKE_CONFIG "-DAOM_TARGET_CPU=${AOM_TARGET_CPU} ${AOM_CMAKE_CONFIG}")
100endif()
101set(AOM_CMAKE_CONFIG "-G \\\"${CMAKE_GENERATOR}\\\" ${AOM_CMAKE_CONFIG}")
102file(RELATIVE_PATH source_path "${AOM_CONFIG_DIR}" "${AOM_ROOT}")
103set(AOM_CMAKE_CONFIG "cmake ${source_path} ${AOM_CMAKE_CONFIG}")
104string(STRIP "${AOM_CMAKE_CONFIG}" AOM_CMAKE_CONFIG)
105
106message("--- aom_configure: Detected CPU: ${AOM_TARGET_CPU}")
107set(AOM_TARGET_SYSTEM ${CMAKE_SYSTEM_NAME})
108
109string(TOLOWER "${CMAKE_BUILD_TYPE}" build_type_lowercase)
110if(build_type_lowercase STREQUAL "debug")
111  set(CONFIG_DEBUG 1)
112endif()
113
114if(BUILD_SHARED_LIBS)
115  set(CONFIG_PIC 1)
116  set(CONFIG_SHARED 1)
117elseif(NOT CONFIG_PIC)
118  # Update the variable only when it does not carry the CMake assigned help
119  # string for variables specified via the command line. This allows the user to
120  # force CONFIG_PIC=0.
121  unset(cache_helpstring)
122  get_property(cache_helpstring CACHE CONFIG_PIC PROPERTY HELPSTRING)
123  if(NOT "${cache_helpstring}" STREQUAL "${cmake_cmdline_helpstring}")
124    aom_check_c_compiles("pie_check" "
125                          #if !(__pie__ || __PIE__)
126                          #error Neither __pie__ or __PIE__ are set
127                          #endif
128                          extern void unused(void);
129                          void unused(void) {}" HAVE_PIE)
130
131    if(HAVE_PIE)
132      # If -fpie or -fPIE are used ensure the assembly code has PIC enabled to
133      # avoid DT_TEXTRELs: /usr/bin/ld: warning: creating DT_TEXTREL in a PIE
134      set(CONFIG_PIC 1)
135      message(
136        "CONFIG_PIC enabled for position independent executable (PIE) build")
137    endif()
138  endif()
139  unset(cache_helpstring)
140endif()
141
142if(NOT MSVC)
143  if(CONFIG_PIC)
144
145    # TODO(tomfinegan): clang needs -pie in CMAKE_EXE_LINKER_FLAGS for this to
146    # work.
147    set(CMAKE_POSITION_INDEPENDENT_CODE ON)
148    if(AOM_TARGET_SYSTEM STREQUAL "Linux"
149       AND AOM_TARGET_CPU MATCHES "^armv[78]")
150      set(AOM_AS_FLAGS ${AOM_AS_FLAGS} --defsym PIC=1)
151    else()
152      set(AOM_AS_FLAGS ${AOM_AS_FLAGS} -DPIC)
153    endif()
154  endif()
155endif()
156
157if(AOM_TARGET_CPU STREQUAL "x86" OR AOM_TARGET_CPU STREQUAL "x86_64")
158  find_program(AS_EXECUTABLE yasm $ENV{YASM_PATH})
159  if(NOT AS_EXECUTABLE OR ENABLE_NASM)
160    unset(AS_EXECUTABLE CACHE)
161    find_program(AS_EXECUTABLE nasm $ENV{NASM_PATH})
162    if(AS_EXECUTABLE)
163      test_nasm()
164    endif()
165  endif()
166
167  if(NOT AS_EXECUTABLE)
168    message(
169      FATAL_ERROR
170        "Unable to find assembler. Install 'yasm' or 'nasm.' "
171        "To build without optimizations, add -DAOM_TARGET_CPU=generic to "
172        "your cmake command line.")
173  endif()
174  get_asm_obj_format("objformat")
175  set(AOM_AS_FLAGS -f ${objformat} ${AOM_AS_FLAGS})
176  string(STRIP "${AOM_AS_FLAGS}" AOM_AS_FLAGS)
177elseif(AOM_TARGET_CPU MATCHES "arm")
178  if(AOM_TARGET_SYSTEM STREQUAL "Darwin")
179    set(AS_EXECUTABLE as)
180    set(AOM_AS_FLAGS -arch ${AOM_TARGET_CPU} -isysroot ${CMAKE_OSX_SYSROOT})
181  elseif(AOM_TARGET_SYSTEM STREQUAL "Windows")
182    if(NOT AS_EXECUTABLE)
183      set(AS_EXECUTABLE ${CMAKE_C_COMPILER} -c -mimplicit-it=always)
184    endif()
185  else()
186    if(NOT AS_EXECUTABLE)
187      set(AS_EXECUTABLE as)
188    endif()
189  endif()
190  find_program(as_executable_found ${AS_EXECUTABLE})
191  if(NOT as_executable_found)
192    message(
193      FATAL_ERROR
194        "Unable to find assembler and optimizations are enabled."
195        "Searched for ${AS_EXECUTABLE}. Install it, add it to your path, or "
196        "set the assembler directly by adding -DAS_EXECUTABLE=<assembler path> "
197        "to your CMake command line."
198        "To build without optimizations, add -DAOM_TARGET_CPU=generic to your "
199        "cmake command line.")
200  endif()
201  string(STRIP "${AOM_AS_FLAGS}" AOM_AS_FLAGS)
202endif()
203
204if(CONFIG_ANALYZER)
205  include(FindwxWidgets)
206  find_package(wxWidgets REQUIRED adv base core)
207  include(${wxWidgets_USE_FILE})
208endif()
209
210if(NOT MSVC AND CMAKE_C_COMPILER_ID MATCHES "GNU\|Clang")
211  set(CONFIG_GCC 1)
212endif()
213
214if(CONFIG_GCOV)
215  message("--- Testing for CONFIG_GCOV support.")
216  require_linker_flag("-fprofile-arcs -ftest-coverage")
217  require_compiler_flag("-fprofile-arcs -ftest-coverage" YES)
218endif()
219
220if(CONFIG_GPROF)
221  message("--- Testing for CONFIG_GPROF support.")
222  require_compiler_flag("-pg" YES)
223endif()
224
225if(AOM_TARGET_SYSTEM MATCHES "Darwin\|Linux\|Windows\|Android")
226  set(CONFIG_OS_SUPPORT 1)
227endif()
228
229if(AOM_TARGET_SYSTEM STREQUAL "Windows")
230  # The default _WIN32_WINNT value in MinGW is 0x0502 (Windows XP with SP2). Set
231  # it to 0x0601 (Windows 7).
232  add_compiler_flag_if_supported("-D_WIN32_WINNT=0x0601")
233  # Prevent windows.h from defining the min and max macros. This allows us to
234  # use std::min and std::max.
235  add_compiler_flag_if_supported("-DNOMINMAX")
236endif()
237
238#
239# Fix CONFIG_* dependencies. This must be done before including cpu.cmake to
240# ensure RTCD_CONFIG_* are properly set.
241fix_experiment_configs()
242
243# Test compiler support.
244aom_get_inline("INLINE")
245
246# Don't just check for pthread.h, but use the result of the full pthreads
247# including a linking check in FindThreads above.
248set(HAVE_PTHREAD_H ${CMAKE_USE_PTHREADS_INIT})
249aom_check_source_compiles("unistd_check" "#include <unistd.h>" HAVE_UNISTD_H)
250
251if(NOT MSVC)
252  aom_push_var(CMAKE_REQUIRED_LIBRARIES "m")
253  aom_check_c_compiles("fenv_check" "#define _GNU_SOURCE
254                        #include <fenv.h>
255                        void unused(void) {
256                          (void)unused;
257                          (void)feenableexcept(FE_DIVBYZERO | FE_INVALID);
258                        }" HAVE_FEXCEPT)
259  aom_pop_var(CMAKE_REQUIRED_LIBRARIES)
260endif()
261
262include("${AOM_ROOT}/build/cmake/cpu.cmake")
263
264if(ENABLE_CCACHE)
265  set_compiler_launcher(ENABLE_CCACHE ccache)
266endif()
267
268if(ENABLE_DISTCC)
269  set_compiler_launcher(ENABLE_DISTCC distcc)
270endif()
271
272if(ENABLE_GOMA)
273  set_compiler_launcher(ENABLE_GOMA gomacc)
274endif()
275
276if(NOT CONFIG_AV1_DECODER AND NOT CONFIG_AV1_ENCODER)
277  message(FATAL_ERROR "Decoder and encoder disabled, nothing to build.")
278endif()
279
280if(DECODE_HEIGHT_LIMIT OR DECODE_WIDTH_LIMIT)
281  change_config_and_warn(CONFIG_SIZE_LIMIT 1
282                         "DECODE_HEIGHT_LIMIT and DECODE_WIDTH_LIMIT")
283endif()
284
285if(CONFIG_SIZE_LIMIT)
286  if(NOT DECODE_HEIGHT_LIMIT OR NOT DECODE_WIDTH_LIMIT)
287    message(FATAL_ERROR "When setting CONFIG_SIZE_LIMIT, DECODE_HEIGHT_LIMIT "
288                        "and DECODE_WIDTH_LIMIT must be set.")
289  endif()
290endif()
291
292# Test compiler flags.
293if(MSVC)
294  add_compiler_flag_if_supported("/W3")
295
296  # Disable MSVC warnings that suggest making code non-portable.
297  add_compiler_flag_if_supported("/wd4996")
298  if(ENABLE_WERROR)
299    add_compiler_flag_if_supported("/WX")
300  endif()
301else()
302  require_c_flag("-std=c99" YES)
303  require_cxx_flag_nomsvc("-std=c++11" YES)
304  add_compiler_flag_if_supported("-Wall")
305  add_compiler_flag_if_supported("-Wdisabled-optimization")
306  add_compiler_flag_if_supported("-Wextra")
307  # Prior to version 3.19.0 cmake would fail to parse the warning emitted by gcc
308  # with this flag. Note the order of this check and -Wextra-semi-stmt is
309  # important due to is_flag_present() matching substrings with string(FIND
310  # ...).
311  if(CMAKE_VERSION VERSION_LESS "3.19"
312     AND CMAKE_C_COMPILER_ID STREQUAL "GNU"
313     AND CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
314    add_cxx_flag_if_supported("-Wextra-semi")
315  else()
316    add_compiler_flag_if_supported("-Wextra-semi")
317  endif()
318  add_compiler_flag_if_supported("-Wextra-semi-stmt")
319  add_compiler_flag_if_supported("-Wfloat-conversion")
320  add_compiler_flag_if_supported("-Wformat=2")
321  add_c_flag_if_supported("-Wimplicit-function-declaration")
322  add_compiler_flag_if_supported("-Wlogical-op")
323  add_compiler_flag_if_supported("-Wpointer-arith")
324  add_compiler_flag_if_supported("-Wshorten-64-to-32")
325  add_compiler_flag_if_supported("-Wsign-compare")
326  add_compiler_flag_if_supported("-Wstring-conversion")
327  add_compiler_flag_if_supported("-Wtype-limits")
328  add_compiler_flag_if_supported("-Wuninitialized")
329  add_compiler_flag_if_supported("-Wunused")
330  add_compiler_flag_if_supported("-Wvla")
331  add_cxx_flag_if_supported("-Wc++14-extensions")
332  add_cxx_flag_if_supported("-Wc++17-extensions")
333  add_cxx_flag_if_supported("-Wc++20-extensions")
334
335  if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND SANITIZE MATCHES "address|undefined")
336
337    # This combination has more stack overhead, so we account for it by
338    # providing higher stack limit than usual.
339    add_c_flag_if_supported("-Wstack-usage=170000")
340    add_cxx_flag_if_supported("-Wstack-usage=270000")
341  elseif(CONFIG_RD_DEBUG) # Another case where higher stack usage is expected.
342    add_c_flag_if_supported("-Wstack-usage=135000")
343    add_cxx_flag_if_supported("-Wstack-usage=240000")
344  else()
345    add_c_flag_if_supported("-Wstack-usage=100000")
346    add_cxx_flag_if_supported("-Wstack-usage=240000")
347  endif()
348
349  if(CMAKE_C_COMPILER_ID MATCHES "GNU" AND SANITIZE MATCHES "address")
350    # Disable no optimization warning when compiling with sanitizers
351    add_compiler_flag_if_supported("-Wno-disabled-optimization")
352  endif()
353
354  # Add -Wshadow only for C files to avoid massive gtest warning spam.
355  add_c_flag_if_supported("-Wshadow")
356
357  # Add -Wundef only for C files to avoid massive gtest warning spam.
358  add_c_flag_if_supported("-Wundef")
359
360  # Quiet gcc 6 vs 7 abi warnings:
361  # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77728
362  if(AOM_TARGET_CPU MATCHES "arm")
363    add_cxx_flag_if_supported("-Wno-psabi")
364  endif()
365
366  if(ENABLE_WERROR)
367    add_compiler_flag_if_supported("-Werror")
368  endif()
369
370  if(build_type_lowercase MATCHES "rel")
371    add_compiler_flag_if_supported("-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0")
372  endif()
373  add_compiler_flag_if_supported("-D_LARGEFILE_SOURCE")
374  add_compiler_flag_if_supported("-D_FILE_OFFSET_BITS=64")
375endif()
376
377# Prior to r23, or with ANDROID_USE_LEGACY_TOOLCHAIN_FILE set,
378# android.toolchain.cmake would set normal (non-cache) versions of variables
379# like CMAKE_C_FLAGS_RELEASE which would mask the ones added to the cache
380# variable in add_compiler_flag_if_supported(), etc. As a workaround we add
381# everything accumulated in AOM_C/CXX_FLAGS to the normal versions. This could
382# also be addressed by reworking the flag tests and adding the results directly
383# to target_compile_options() as in e.g., libgav1, but that's a larger task.
384# https://github.com/android/ndk/wiki/Changelog-r23#changes
385if(ANDROID
386   AND ("${ANDROID_NDK_MAJOR}" LESS 23 OR ANDROID_USE_LEGACY_TOOLCHAIN_FILE))
387  foreach(lang C;CXX)
388    string(STRIP "${AOM_${lang}_FLAGS}" AOM_${lang}_FLAGS)
389    if(AOM_${lang}_FLAGS)
390      foreach(config ${AOM_${lang}_CONFIGS})
391        set(${config} "${${config}} ${AOM_${lang}_FLAGS}")
392      endforeach()
393    endif()
394  endforeach()
395endif()
396
397set(AOM_LIB_LINK_TYPE PUBLIC)
398if(EMSCRIPTEN)
399
400  # Avoid CMake generation time errors resulting from collisions with the form
401  # of target_link_libraries() used by Emscripten.cmake.
402  unset(AOM_LIB_LINK_TYPE)
403endif()
404
405# Generate aom_config templates.
406set(aom_config_asm_template "${AOM_CONFIG_DIR}/config/aom_config.asm.cmake")
407set(aom_config_h_template "${AOM_CONFIG_DIR}/config/aom_config.h.cmake")
408execute_process(
409  COMMAND ${CMAKE_COMMAND}
410          -DAOM_CONFIG_DIR=${AOM_CONFIG_DIR} -DAOM_ROOT=${AOM_ROOT} -P
411          "${AOM_ROOT}/build/cmake/generate_aom_config_templates.cmake")
412
413# Generate aom_config.{asm,h}.
414configure_file("${aom_config_asm_template}"
415               "${AOM_CONFIG_DIR}/config/aom_config.asm")
416configure_file("${aom_config_h_template}"
417               "${AOM_CONFIG_DIR}/config/aom_config.h")
418
419# Read the current git hash.
420find_package(Git)
421if(NOT GIT_FOUND)
422  message("--- Git missing, version will be read from CHANGELOG.")
423endif()
424
425configure_file("${AOM_ROOT}/build/cmake/aom_config.c.template"
426               "${AOM_CONFIG_DIR}/config/aom_config.c")
427
428# Find Perl and generate the RTCD sources.
429find_package(Perl)
430if(NOT PERL_FOUND)
431  message(FATAL_ERROR "Perl is required to build libaom.")
432endif()
433
434set(AOM_RTCD_CONFIG_FILE_LIST "${AOM_ROOT}/aom_dsp/aom_dsp_rtcd_defs.pl"
435                              "${AOM_ROOT}/aom_scale/aom_scale_rtcd.pl"
436                              "${AOM_ROOT}/av1/common/av1_rtcd_defs.pl")
437set(AOM_RTCD_HEADER_FILE_LIST "${AOM_CONFIG_DIR}/config/aom_dsp_rtcd.h"
438                              "${AOM_CONFIG_DIR}/config/aom_scale_rtcd.h"
439                              "${AOM_CONFIG_DIR}/config/av1_rtcd.h")
440set(AOM_RTCD_SOURCE_FILE_LIST "${AOM_ROOT}/aom_dsp/aom_dsp_rtcd.c"
441                              "${AOM_ROOT}/aom_scale/aom_scale_rtcd.c"
442                              "${AOM_ROOT}/av1/common/av1_rtcd.c")
443set(AOM_RTCD_SYMBOL_LIST aom_dsp_rtcd aom_scale_rtcd av1_rtcd)
444list(LENGTH AOM_RTCD_SYMBOL_LIST AOM_RTCD_CUSTOM_COMMAND_COUNT)
445math(EXPR AOM_RTCD_CUSTOM_COMMAND_COUNT "${AOM_RTCD_CUSTOM_COMMAND_COUNT} - 1")
446
447foreach(NUM RANGE ${AOM_RTCD_CUSTOM_COMMAND_COUNT})
448  list(GET AOM_RTCD_CONFIG_FILE_LIST ${NUM} AOM_RTCD_CONFIG_FILE)
449  list(GET AOM_RTCD_HEADER_FILE_LIST ${NUM} AOM_RTCD_HEADER_FILE)
450  list(GET AOM_RTCD_SOURCE_FILE_LIST ${NUM} AOM_RTCD_SOURCE_FILE)
451  list(GET AOM_RTCD_SYMBOL_LIST ${NUM} AOM_RTCD_SYMBOL)
452  execute_process(
453    COMMAND
454      ${PERL_EXECUTABLE} "${AOM_ROOT}/build/cmake/rtcd.pl"
455      --arch=${AOM_TARGET_CPU}
456      --sym=${AOM_RTCD_SYMBOL} ${AOM_RTCD_FLAGS}
457      --config=${AOM_CONFIG_DIR}/config/aom_config.h ${AOM_RTCD_CONFIG_FILE}
458    OUTPUT_FILE ${AOM_RTCD_HEADER_FILE})
459endforeach()
460
461# Generate aom_version.h.
462execute_process(COMMAND ${CMAKE_COMMAND}
463                        -DAOM_CONFIG_DIR=${AOM_CONFIG_DIR}
464                        -DAOM_ROOT=${AOM_ROOT}
465                        -DGIT_EXECUTABLE=${GIT_EXECUTABLE}
466                        -DPERL_EXECUTABLE=${PERL_EXECUTABLE} -P
467                        "${AOM_ROOT}/build/cmake/version.cmake")
468