#include<->
directives with the contents of the specified file. Usually indicate the relative path (ex: stdio.h
, sys/stat.h
). A natural question arises - how does the preprocessor find the header files?#include<foobar.h>
), regardless of the actual placement on the file system.definition
Header Map is an index file generated by Xcode. The file is named for the current target and has the extension ".hmap
". An index is a set of string pairs of key — value. The index is used to match the full path to the header file by the argument of theinclude
directive. Index search is case insensitive. Search in the index has a higher priority than INCLUDE_PATH. This is done to speed up the build.
By default, the header map is active. To disable, you need to create a variableUSE_HEADERMAP=NO
in the project configuration.
Time.h
). python headermap.py build/hmap.build/Debug/primary.build/primary.hmap
primary
is the name of the target. bar.h /Users/nickz/hmap/bar.h foo.h /Users/nickz/hmap/foo.h primary/foo.h /Users/nickz/hmap/foo.h
foo.h
and bar.h
everything is more or less clear, then primary/foo.h
raises questions. As it turned out, Xcode creates such entries for header files that are members of the current target. (In order for Xcode to allow target files to be made into target files, you need to add the copy headers build phase to it.)USE_HEADERMAP = [YES] / NOOn off.
HEADERMAP_INCLUDES_FLAT_ENTRIES_FOR_TARGET_BEING_BUILT = [YES] / NOInclude header files that are members of the active target in the header map. On 3.2.5 is ignored .
HEADERMAP_INCLUDES_FRAMEWORK_ENTRIES_FOR_ALL_PRODUCT_TYPES = [YES] / NOInclude header files that are members of the active target in the header map. Files get the prefix
$(PRODUCT_NAME)/
. If the setting value is YES
, such records are created for any type of purpose; otherwise, only if the target type is Framework.HEADERMAP_INCLUDES_PROJECT_HEADERS = [YES] / NOInclude in header maps all header files from project without target. On 3.2.5 is ignored .
Source: https://habr.com/ru/post/144834/
All Articles