1 include_directories( ${CMAKE_CURRENT_SOURCE_DIR}/libSPIRV 2 ${CMAKE_CURRENT_SOURCE_DIR}/Mangler 3 ${CMAKE_CURRENT_SOURCE_DIR}/..) 4 5 option(SPIRV_USE_LLVM_API "Enable usage of LLVM API for libSPIRV." ON) 6 if ( SPIRV_USE_LLVM_API ) 7 add_definitions(-D_SPIRV_LLVM_API) 8 endif() 9 10 add_llvm_library(LLVMSPIRVLib 11 libSPIRV/SPIRVBasicBlock.cpp 12 libSPIRV/SPIRVDebug.cpp 13 libSPIRV/SPIRVDecorate.cpp 14 libSPIRV/SPIRVEntry.cpp 15 libSPIRV/SPIRVFunction.cpp 16 libSPIRV/SPIRVInstruction.cpp 17 libSPIRV/SPIRVModule.cpp 18 libSPIRV/SPIRVStream.cpp 19 libSPIRV/SPIRVType.cpp 20 libSPIRV/SPIRVValue.cpp 21 Mangler/FunctionDescriptor.cpp 22 Mangler/Mangler.cpp 23 Mangler/ManglingUtils.cpp 24 Mangler/ParameterType.cpp 25 OCL20To12.cpp 26 OCL20ToSPIRV.cpp 27 OCL21ToSPIRV.cpp 28 OCLTypeToSPIRV.cpp 29 OCLUtil.cpp 30 SPIRVLowerBool.cpp 31 SPIRVLowerConstExpr.cpp 32 SPIRVLowerOCLBlocks.cpp 33 SPIRVReader.cpp 34 SPIRVRegularizeLLVM.cpp 35 SPIRVToOCL20.cpp 36 SPIRVUtil.cpp 37 SPIRVWriter.cpp 38 SPIRVWriterPass.cpp 39 TransOCLMD.cpp 40 ) 41 42 add_dependencies(LLVMSPIRVLib intrinsics_gen) 43