Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects.

This allows IDEs to recognize the entire set of header files for
each of the core LLVM projects.

Differential Revision: http://reviews.llvm.org/D7526
Reviewed By: Chris Bieneman

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228798 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Zachary Turner 2015-02-11 03:28:02 +00:00
parent 167ce4489c
commit c371307e60
28 changed files with 87 additions and 3 deletions

View File

@ -60,6 +60,9 @@ add_llvm_library(LLVMAnalysis
TypeBasedAliasAnalysis.cpp TypeBasedAliasAnalysis.cpp
ScopedNoAliasAA.cpp ScopedNoAliasAA.cpp
ValueTracking.cpp ValueTracking.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Analysis
) )
add_dependencies(LLVMAnalysis intrinsics_gen) add_dependencies(LLVMAnalysis intrinsics_gen)

View File

@ -3,4 +3,7 @@ add_llvm_library(LLVMAsmParser
LLLexer.cpp LLLexer.cpp
LLParser.cpp LLParser.cpp
Parser.cpp Parser.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Analysis
) )

View File

@ -2,6 +2,9 @@ add_llvm_library(LLVMBitReader
BitReader.cpp BitReader.cpp
BitcodeReader.cpp BitcodeReader.cpp
BitstreamReader.cpp BitstreamReader.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Bitcode
) )
add_dependencies(LLVMBitReader intrinsics_gen) add_dependencies(LLVMBitReader intrinsics_gen)

View File

@ -119,6 +119,10 @@ add_llvm_library(LLVMCodeGen
UnreachableBlockElim.cpp UnreachableBlockElim.cpp
VirtRegMap.cpp VirtRegMap.cpp
WinEHPrepare.cpp WinEHPrepare.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/CodeGen
${LLVM_MAIN_INCLUDE_DIR}/llvm/CodeGen/PBQP
) )
add_dependencies(LLVMCodeGen intrinsics_gen) add_dependencies(LLVMCodeGen intrinsics_gen)

View File

@ -16,4 +16,7 @@ add_llvm_library(LLVMDebugInfoDWARF
DWARFTypeUnit.cpp DWARFTypeUnit.cpp
DWARFUnit.cpp DWARFUnit.cpp
SyntaxHighlighting.cpp SyntaxHighlighting.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/DWARF
) )

View File

@ -23,11 +23,11 @@ if(HAVE_DIA_SDK)
DIA/DIASourceFile.cpp DIA/DIASourceFile.cpp
) )
set(LIBPDB_ADDITIONAL_HEADER_DIRS "../../../include/llvm/DebugInfo/PDB/DIA/") set(LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB/DIA")
endif() endif()
list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "../../../include/llvm/DebugInfo/PDB") list(APPEND LIBPDB_ADDITIONAL_HEADER_DIRS "${LLVM_MAIN_INCLUDE_DIR}/llvm/DebugInfo/PDB")
add_llvm_library(LLVMDebugInfoPDB add_llvm_library(LLVMDebugInfoPDB
IPDBSourceFile.cpp IPDBSourceFile.cpp

View File

@ -7,6 +7,9 @@ add_llvm_library(LLVMExecutionEngine
RTDyldMemoryManager.cpp RTDyldMemoryManager.cpp
SectionMemoryManager.cpp SectionMemoryManager.cpp
TargetSelect.cpp TargetSelect.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/ExecutionEngine
) )
add_subdirectory(Interpreter) add_subdirectory(Interpreter)

View File

@ -3,4 +3,7 @@ add_llvm_library(LLVMOrcJIT
IndirectionUtils.cpp IndirectionUtils.cpp
OrcMCJITReplacement.cpp OrcMCJITReplacement.cpp
OrcTargetSupport.cpp OrcTargetSupport.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/ExecutionEngine/Orc
) )

View File

@ -47,6 +47,9 @@ add_llvm_library(LLVMCore
ValueSymbolTable.cpp ValueSymbolTable.cpp
ValueTypes.cpp ValueTypes.cpp
Verifier.cpp Verifier.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/IR
) )
add_dependencies(LLVMCore intrinsics_gen) add_dependencies(LLVMCore intrinsics_gen)

View File

@ -1,3 +1,6 @@
add_llvm_library(LLVMIRReader add_llvm_library(LLVMIRReader
IRReader.cpp IRReader.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/IRReader
) )

View File

@ -1,6 +1,9 @@
add_llvm_library(LLVMLTO add_llvm_library(LLVMLTO
LTOModule.cpp LTOModule.cpp
LTOCodeGenerator.cpp LTOCodeGenerator.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/LTO
) )
add_dependencies(LLVMLTO intrinsics_gen) add_dependencies(LLVMLTO intrinsics_gen)

View File

@ -5,7 +5,10 @@ endif()
add_llvm_library(LLVMLineEditor add_llvm_library(LLVMLineEditor
LineEditor.cpp LineEditor.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/LineEditor
LINK_LIBS LINK_LIBS
LLVMSupport LLVMSupport
${link_libs} ${link_libs}
) )

View File

@ -1,3 +1,6 @@
add_llvm_library(LLVMLinker add_llvm_library(LLVMLinker
LinkModules.cpp LinkModules.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Linker
) )

View File

@ -46,6 +46,9 @@ add_llvm_library(LLVMMC
WinCOFFObjectWriter.cpp WinCOFFObjectWriter.cpp
WinCOFFStreamer.cpp WinCOFFStreamer.cpp
YAML.cpp YAML.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/MC
) )
add_subdirectory(MCParser) add_subdirectory(MCParser)

View File

@ -8,4 +8,7 @@ add_llvm_library(LLVMMCParser
MCAsmParser.cpp MCAsmParser.cpp
MCAsmParserExtension.cpp MCAsmParserExtension.cpp
MCTargetAsmParser.cpp MCTargetAsmParser.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/MCParser
) )

View File

@ -14,4 +14,7 @@ add_llvm_library(LLVMObject
ObjectFile.cpp ObjectFile.cpp
RecordStreamer.cpp RecordStreamer.cpp
SymbolicFile.cpp SymbolicFile.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Object
) )

View File

@ -3,4 +3,7 @@ add_llvm_library(LLVMOption
ArgList.cpp ArgList.cpp
Option.cpp Option.cpp
OptTable.cpp OptTable.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Option
) )

View File

@ -8,4 +8,7 @@ add_llvm_library(LLVMProfileData
SampleProf.cpp SampleProf.cpp
SampleProfReader.cpp SampleProfReader.cpp
SampleProfWriter.cpp SampleProfWriter.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/ProfileData
) )

View File

@ -124,6 +124,7 @@ add_llvm_library(LLVMSupport
ADDITIONAL_HEADER_DIRS ADDITIONAL_HEADER_DIRS
Unix Unix
Windows Windows
${LLVM_MAIN_INCLUDE_DIR}/llvm/Support
LINK_LIBS ${system_libs} LINK_LIBS ${system_libs}
) )

View File

@ -7,4 +7,7 @@ add_llvm_library(LLVMTableGen
TableGenBackend.cpp TableGenBackend.cpp
TGLexer.cpp TGLexer.cpp
TGParser.cpp TGParser.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/TableGen
) )

View File

@ -7,6 +7,9 @@ add_llvm_library(LLVMTarget
TargetMachine.cpp TargetMachine.cpp
TargetMachineC.cpp TargetMachineC.cpp
TargetSubtargetInfo.cpp TargetSubtargetInfo.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Target
) )
foreach(t ${LLVM_TARGETS_TO_BUILD}) foreach(t ${LLVM_TARGETS_TO_BUILD})

View File

@ -20,6 +20,10 @@ add_llvm_library(LLVMipo
PruneEH.cpp PruneEH.cpp
StripDeadPrototypes.cpp StripDeadPrototypes.cpp
StripSymbols.cpp StripSymbols.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms/IPO
) )
add_dependencies(LLVMipo intrinsics_gen) add_dependencies(LLVMipo intrinsics_gen)

View File

@ -12,6 +12,10 @@ add_llvm_library(LLVMInstCombine
InstCombineShifts.cpp InstCombineShifts.cpp
InstCombineSimplifyDemanded.cpp InstCombineSimplifyDemanded.cpp
InstCombineVectorOps.cpp InstCombineVectorOps.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms/InstCombine
) )
add_dependencies(LLVMInstCombine intrinsics_gen) add_dependencies(LLVMInstCombine intrinsics_gen)

View File

@ -8,6 +8,9 @@ add_llvm_library(LLVMInstrumentation
InstrProfiling.cpp InstrProfiling.cpp
SanitizerCoverage.cpp SanitizerCoverage.cpp
ThreadSanitizer.cpp ThreadSanitizer.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
) )
add_dependencies(LLVMInstrumentation intrinsics_gen) add_dependencies(LLVMInstrumentation intrinsics_gen)

View File

@ -9,6 +9,9 @@ add_llvm_library(LLVMObjCARCOpts
DependencyAnalysis.cpp DependencyAnalysis.cpp
ProvenanceAnalysis.cpp ProvenanceAnalysis.cpp
ProvenanceAnalysisEvaluator.cpp ProvenanceAnalysisEvaluator.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
) )
add_dependencies(LLVMObjCARCOpts intrinsics_gen) add_dependencies(LLVMObjCARCOpts intrinsics_gen)

View File

@ -42,6 +42,10 @@ add_llvm_library(LLVMScalarOpts
StraightLineStrengthReduce.cpp StraightLineStrengthReduce.cpp
StructurizeCFG.cpp StructurizeCFG.cpp
TailRecursionElimination.cpp TailRecursionElimination.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms/Scalar
) )
add_dependencies(LLVMScalarOpts intrinsics_gen) add_dependencies(LLVMScalarOpts intrinsics_gen)

View File

@ -36,6 +36,10 @@ add_llvm_library(LLVMTransformUtils
UnifyFunctionExitNodes.cpp UnifyFunctionExitNodes.cpp
Utils.cpp Utils.cpp
ValueMapper.cpp ValueMapper.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms/Utils
) )
add_dependencies(LLVMTransformUtils intrinsics_gen) add_dependencies(LLVMTransformUtils intrinsics_gen)

View File

@ -3,6 +3,9 @@ add_llvm_library(LLVMVectorize
Vectorize.cpp Vectorize.cpp
LoopVectorize.cpp LoopVectorize.cpp
SLPVectorizer.cpp SLPVectorizer.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/Transforms
) )
add_dependencies(LLVMVectorize intrinsics_gen) add_dependencies(LLVMVectorize intrinsics_gen)