cmake: replace 'dummy' with 'stub'
This is a more inclusive term:
https://source.android.com/docs/setup/contribute/respectful-code
Change-Id: I140218c184a009fb643a1ef33d91521559eb7dce
diff --git a/CMakeLists.txt b/CMakeLists.txt
index dafe9bd..3bfc03c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -219,7 +219,7 @@
# Targets
add_library(aom_version ${AOM_VERSION_SOURCES})
-add_dummy_source_file_to_target(aom_version c)
+add_stub_source_file_to_target(aom_version c)
add_custom_command(OUTPUT "${AOM_CONFIG_DIR}/config/aom_version.h"
COMMAND ${CMAKE_COMMAND} ARGS
-DAOM_CONFIG_DIR=${AOM_CONFIG_DIR}
@@ -778,7 +778,7 @@
# here, it really is the Xcode generator's fault, or just a deficiency in
# Xcode itself.
foreach(aom_app ${AOM_APP_TARGETS})
- add_dummy_source_file_to_target("${aom_app}" "cc")
+ add_stub_source_file_to_target("${aom_app}" "cc")
endforeach()
endif()
endif()
diff --git a/aom_dsp/aom_dsp.cmake b/aom_dsp/aom_dsp.cmake
index 92c79bf..d6ec71f 100644
--- a/aom_dsp/aom_dsp.cmake
+++ b/aom_dsp/aom_dsp.cmake
@@ -327,8 +327,8 @@
function(setup_aom_dsp_targets)
add_library(aom_dsp_common OBJECT ${AOM_DSP_COMMON_SOURCES})
list(APPEND AOM_LIB_TARGETS aom_dsp_common)
- create_dummy_source_file("aom_av1" "c" "dummy_source_file")
- add_library(aom_dsp OBJECT "${dummy_source_file}")
+ create_stub_source_file("aom_av1" "c" "stub_source_file")
+ add_library(aom_dsp OBJECT "${stub_source_file}")
target_sources(aom PRIVATE $<TARGET_OBJECTS:aom_dsp_common>)
if(BUILD_SHARED_LIBS)
target_sources(aom_static PRIVATE $<TARGET_OBJECTS:aom_dsp_common>)
@@ -336,8 +336,8 @@
list(APPEND AOM_LIB_TARGETS aom_dsp)
# Not all generators support libraries consisting only of object files. Add a
- # dummy source file to the aom_dsp target.
- add_dummy_source_file_to_target("aom_dsp" "c")
+ # stub source file to the aom_dsp target.
+ add_stub_source_file_to_target("aom_dsp" "c")
if(CONFIG_AV1_DECODER)
add_library(aom_dsp_decoder OBJECT ${AOM_DSP_DECODER_SOURCES})
diff --git a/build/cmake/aom_install.cmake b/build/cmake/aom_install.cmake
index 91294c6..57cfcf7 100644
--- a/build/cmake/aom_install.cmake
+++ b/build/cmake/aom_install.cmake
@@ -31,8 +31,8 @@
include("GNUInstallDirs")
set(AOM_PKG_CONFIG_FILE "${AOM_CONFIG_DIR}/aom.pc")
- # Create a dummy library target for creating aom.pc.
- create_dummy_source_file(aom_pc c AOM_PKG_CONFIG_SOURCES)
+ # Create a stub library target for creating aom.pc.
+ create_stub_source_file(aom_pc c AOM_PKG_CONFIG_SOURCES)
add_library(aom_pc ${AOM_PKG_CONFIG_SOURCES})
# Setup a rule to generate aom.pc.
diff --git a/build/cmake/aom_optimization.cmake b/build/cmake/aom_optimization.cmake
index 1dd6c3b..ea6e333 100644
--- a/build/cmake/aom_optimization.cmake
+++ b/build/cmake/aom_optimization.cmake
@@ -127,7 +127,7 @@
# Adds library target named $lib_name for ASM files in variable named by
# $asm_sources. Builds an output directory path from $lib_name. Links $lib_name
-# into the aom library target(s). Generates a dummy C file with a dummy function
+# into the aom library target(s). Generates a stub C file with a stub function
# to ensure that all cmake generators can determine the linker language, and
# that build tools don't complain that an object exposes no symbols.
#
@@ -173,11 +173,11 @@
endforeach()
# The above created a target containing only ASM sources. CMake needs help
- # here to determine the linker language. Add a dummy C file to force the
+ # here to determine the linker language. Add a stub C file to force the
# linker language to C. We don't bother with setting the LINKER_LANGUAGE
# property on the library target because not all generators obey it (looking
# at you, Xcode generator).
- add_dummy_source_file_to_target("${asm_lib_name}" "c")
+ add_stub_source_file_to_target("${asm_lib_name}" "c")
# Add the new lib target to the global list of aom library targets.
list(APPEND AOM_LIB_TARGETS ${asm_lib_name})
diff --git a/build/cmake/util.cmake b/build/cmake/util.cmake
index d1f0d02..ddc6fcf 100644
--- a/build/cmake/util.cmake
+++ b/build/cmake/util.cmake
@@ -16,26 +16,26 @@
# Directory where generated sources will be written.
set(AOM_GEN_SRC_DIR "${AOM_CONFIG_DIR}/gen_src")
-# Creates dummy source file in $AOM_GEN_SRC_DIR named $basename.$extension and
-# returns the full path to the dummy source file via appending it to the list
+# Creates stub source file in $AOM_GEN_SRC_DIR named $basename.$extension and
+# returns the full path to the stub source file via appending it to the list
# variable referred to by $out_file_list_var parameter.
-macro(create_dummy_source_file basename extension out_file_list_var)
- set(dummy_source_file "${AOM_GEN_SRC_DIR}/${basename}_dummy.${extension}")
- file(WRITE "${dummy_source_file}"
+macro(create_stub_source_file basename extension out_file_list_var)
+ set(stub_source_file "${AOM_GEN_SRC_DIR}/${basename}_stub.${extension}")
+ file(WRITE "${stub_source_file}"
"// Generated file. DO NOT EDIT!\n"
"// ${target_name} needs a ${extension} file to force link language, \n"
"// or to silence a harmless CMake warning: Ignore me.\n"
- "void aom_${target_name}_dummy_function(void);\n"
- "void aom_${target_name}_dummy_function(void) {}\n")
- list(APPEND "${out_file_list_var}" "${dummy_source_file}")
+ "void aom_${target_name}_stub_function(void);\n"
+ "void aom_${target_name}_stub_function(void) {}\n")
+ list(APPEND "${out_file_list_var}" "${stub_source_file}")
endmacro()
-# Convenience function for adding a dummy source file to $target_name using
-# $extension as the file extension. Wraps create_dummy_source_file().
-function(add_dummy_source_file_to_target target_name extension)
- create_dummy_source_file("${target_name}" "${extension}"
- "dummy_source_file_list")
- target_sources(${target_name} PRIVATE ${dummy_source_file_list})
+# Convenience function for adding a stub source file to $target_name using
+# $extension as the file extension. Wraps create_stub_source_file().
+function(add_stub_source_file_to_target target_name extension)
+ create_stub_source_file("${target_name}" "${extension}"
+ "stub_source_file_list")
+ target_sources(${target_name} PRIVATE ${stub_source_file_list})
endfunction()
# Sets the value of the variable referenced by $feature to $value, and reports