summaryrefslogtreecommitdiff
path: root/CMake
AgeCommit message (Collapse)AuthorFilesLines
2017-02-10FindLLVM: Accept LLVM 3.9Rebecca N. Palmer1-2/+2
Signed-off-by: Rebecca N. Palmer <rebecca_palmer@zoho.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-09-12Runtime: re-enable cl_khr_gl_sharing with existing egl extension.Chuanbo Weng1-26/+0
In order to query low level layout of GL buffer object/texture/render buffer, previous implementation introduced an egl extension and implemented in Beignet side. This way is broken once mesa change its related internal code. In this patch, we use an new egl extension (EGL_MESA_image_dma_buf_export) to query related layout infomations of gl texture. Since this egl extension is already accepted by Khronos, so it's a stable method. This patch just implement GL texture 2d buffer sharing, and we will implement other target type if necessary. v2: Add CMake build option to enable cl_khr_gl_sharing(default off). Clean up related CMake code. Signed-off-by: Chuanbo Weng <chuanbo.weng@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2016-08-03FindLLVM: allow LLVM/Clang 3.8 and reorder the llvm-config priority.Yang Rong1-2/+2
Beignet support 3 released llvm version, now is 3.6, 3.7, 3.8. For LLVM 3.4, 3.5, beignet may still support them, but full test don't cover them. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Ruiling Song <ruiling.song@intel.com>
2016-05-11FindLLVM: allow LLVM/Clang 3.7Rebecca N. Palmer1-2/+2
As beignet now works with LLVM/Clang 3.7, accept this version when searching for llvm-config. Signed-off-by: Rebecca Palmer <rebecca_palmer@zoho.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2015-12-25FindLLVM: check for empty system-libs variableSteven Newbury1-0/+2
When dynamic linking against LLVM, "llvm-config --system-libs" may be empty. Add check for a result before attempting to call REGEX REPLACE with an empty variable. Signed-off-by: Steven Newbury <steve@snewbury.org.uk> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2015-03-24FindLLVM: allow LLVM/Clang 3.6Rebecca N. Palmer1-2/+2
As beignet now works with LLVM/Clang 3.6, accept this version when searching for llvm-config. Signed-off-by: Rebecca Palmer <rebecca_palmer@zoho.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2015-03-24Use matching versions of clang/llvm and libclang/libllvmRebecca Palmer1-5/+26
compile the OpenCL standard library with the same version of clang as will compile OpenCL user code, not plain "clang" (i.e. the system default version, which may be different). Signed-off-by: Rebecca Palmer <rebecca_palmer@zoho.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2015-02-11prefer newer llvm versions over 3.3Andreas Beckmann1-2/+2
v2: LLVM 3.3 is better than 3.4, switch the order of 3.4 and 3.3. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2015-01-12add CMake option USE_STANDALONE_GBE_COMPILER and STANDALONE_GBE_COMPILER_DIRGuo Yejun1-0/+35
At some platforms with old c/c++ environment, C++11 features are not supported, it results in the failure to build the gbe compiler part which depends on LLVM/clang using C++11 features. The way to resolve is to build a standalone gbe compiler within another feasible system, and build beignet with the already built standalone gbe compiler by setting USE_STANDALONE_GBE_COMPILER=true. The path of the standalone compiler is /usr/local/lib/beignet as default or could be specified by STANDALONE_GBE_COMPILER_DIR. Once USE_STANDALONE_GBE_COMPILER is given, all the gbe compiler relative code will not be built any longer, only libcl.so and libgebinterp.so are built. And libcl.so is special for GEN_PCI_ID, which is queried from the building machie or could be specified as CMake option. v2: separate the CMake option name. update the commit comments. add back the script for gen pci id, and build driver with it. v3: add file FindStandaloneGbeCompiler.cmake to make the main cmakefile clean. Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-11-11License: adjust all license version to LGPL v2.1+.Zhigang Gong1-1/+1
To make the license statement consistent to each other, adjust all license versions to v2.1+. Thus beignet should have a pure LGPL v2.1+ license. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2014-09-16Fix the bug of LLVM_LFLAGS fail to setJunyan He1-2/+2
The LLVM_LFLAGS is used before finding the LLVM package, which causes the CMake fails to set correct -L flags and cause linkage error. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-06-19Fix build with mesa 10.1.Abrahm Scully1-1/+1
Mesa renamed some constants and a directory. Signed-off-by: Abrahm Scully <abrahm.scully@gmail.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-04-28add support for cross compilerGuo Yejun1-1/+1
Signed-off-by: Guo Yejun <yejun.guo@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2014-04-17Use pkg-config to check modulesZhenyu Wang5-187/+3
Instead of use pre-defined path for dependent modules, e.g libdrm, libdrm_intel, etc. Use pkg-config helper for cmake instead. This makes it easy to work with developer own built version of those dependences. Also remove libGL dependence for 'gbe_bin_generator' which is not required. libutest.so still requires libGL now but might be fixed by checking real GL dependence. v2: Fix build with mesa source (92e6260) and link required EGL lib with utests too. Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com> Reviewed-by:Zhigang Gong <zhigang.gong@linux.intel.com>
2014-02-11Fix the cmake problem in FindLLVM.Zhigang Gong1-1/+1
Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2014-02-11Add clang/LLVM 3.5svn support.Zhigang Gong1-0/+9
The clang/llvm 3.3 has some minor bugs such as the vector ++/-- which was fixed in 3.4. But the 3.4 version introduces severer OCL bugs as below: http://llvm.org/bugs/show_bug.cgi?id=18119 http://llvm.org/bugs/show_bug.cgi?id=18120 It seems that the community will only fix these bugs in the ToT version rather than the llvm 3.4 branch. I think we'd better to enable clang/llvm 3.5 in beignet. Currently, the 18120 was fixed in ToT, but 18119 still breaks us. When 18119 get fixed, I will switch the preferred version to 3.5. Please be noted, when you build clang/llvm 3.5, you need to enable the cxx11 to make it compatible with beignet. --enable-cxx11 v2: fix the llvm3.4 issue. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
2014-01-16CL: prepare to support ICD if the system has ocl-icd..Zhigang Gong1-37/+0
v2: Only install the intel-beignet.icd if the system has ocl-icd support. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com> Tested-by: "Song, Ruiling" <ruiling.song@intel.com>
2014-01-14Revert faulty pushed patchsetZhigang Gong1-0/+37
This reverts: Revert "GBE: fixed a long related bug." Revert "Refine the method to find pch and pcm files." Revert "GBE: enable relocatable pch files." Revert "CL: prepare to support ICD if the system has ocl-icd.." Revert "CL: back port ICD support to 1.1 branch." The above patches are merged by accident without review comments and are broken. Now revert them.
2014-01-10CL: prepare to support ICD if the system has ocl-icd..Zhigang Gong1-37/+0
v2: Only install the intel-beignet.icd if the system has ocl-icd support. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2014-01-08Start looking for LLVM from version 3.3 then higher version.Simon Richter1-2/+7
When different LLVM versions are installed, look for 3.5, 3.4 and 3.3 in order, then try the system default. As configuring for 3.1 and 3.2 gives an error now, drop these versions from the search. v2: change to use llvm 3.3 as the preferred version. update the document accordingly. Signed-off-by: Simon Richter <Simon.Richter@hogyros.de> Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-11-27Add the drm include and lib path for find when drm is not the system one.Junyan He2-2/+12
Add the support when the DRM lib is not in the system standard location. In some cases, we want to debug the libdrm but not want to influence the whole system. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-11-27Fix a build problem when the llvm version has the fix version digit.Zhigang Gong1-1/+1
If the llvm version is something like 3.3.1, the previous cmake script will generate an incorrect cflags as: -DLLVM_33 1 which breaks the build. This commit also update the stable llvm version from 3.1 to 3.3. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: Yang Rong <rong.r.yang@intel.com>
2013-11-04Add a necessary include path for building with mesa.Zhigang Gong1-0/+1
Reported by Lv Meng. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com>
2013-10-14support LLVM 3.4Homer Hsing1-2/+2
LLVM 3.3 or earlier version don't support unary addition of vectors, such as "++ int2". This patch supports LLVM 3.4. Tested by PIGLIT, no regression. Signed-off-by: Homer Hsing <homer.xing@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
2013-09-18Refine cmake script file.Zhigang Gong2-37/+5
Remove GBM which is not needed. Adjust the header file including sequence to avoid including incorrect cl header file when compile with mesa source code package. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Tested-by: "Yang, Rong R" <rong.r.yang@intel.com>
2013-09-06CL: Enalbe gl sharing with new egl extension.Zhigang Gong1-0/+14
The previous implementation is only for 2d/3d texture sharing and is implemented in a hacky fashinon. We need to replace it with a clean and complete one. We introduce a new egl extension to export low level layout information of a buffer object/texture/render buffer from the mesa dri driver to the cl driver layer. As the extension is not accpepted by mesa, we have to implement this new extension in beignet internally. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Tested-by: He Junyan <junyan.he@inbox.com>
2013-05-23Change CMake to support LLVM 3.1.Yang Rong1-2/+2
Also fix LLVM 3.1 build errors caused by my vector scalarize commit. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-05-23Change clang system call to libclang api call.Yang Rong1-1/+26
The original call clang command directly as frontend. The implement is not very flexible. I change to call libclang apis, support both clang 3.1 and clang 3.2. Now still write the intermediate to the file, for code simply. Signed-off-by: Yang Rong <rong.r.yang@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-04-27Add the INCLUDE_DIRECTORIES directive to all the FindXXX modules.Junyan He8-0/+8
If the header files are not at the standard location, we will FAIL to compile because FIND_PATH directive will not add the Include Dir to CXX flags. Add the INCLUDE_DIRECTORIES to handle this if we find the headers we neeeds. Signed-off-by: Junyan He <junyan.he@linux.intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-04-18Prefer versioned llvm-configSimon Richter1-3/+3
If multiple versions are installed, prefer version 3.2 before falling back to the default version. Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-04-18Implement KHR ICD extensionSimon Richter1-0/+23
This adds a pointer to the dispatch table at the beginning of every object of type - cl_command_queue - cl_context - cl_device_id - cl_event - cl_kernel - cl_mem - cl_platform_id - cl_program - cl_sampler as required by the ICD specification. The layout of the dispatch table comes from the OpenCL ICD loader by Brice Videau <brice.videau@imag.fr> and Vincent Danjean <Vincent.Danjean@ens-lyon.org>. To avoid dispatch table entries being overwritten with the ICD loader's implementations of the CL functions (as would be the proper behaviour for the ELF loader), the -Bsymbolic option is given to the linker. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-04-10fix typo in FindLLVM.cmakeLu Guanqun1-1/+1
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com> Reviewed-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-04-10Find GBM/EGL library at build time.Zhigang Gong2-0/+70
We will change to use EGL_KHR_gl_texture_2D_image and GBM library to implement OCL and OGL interoperation. We need to check GBM. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com> Tested-by: Homer Hsing <homer.xing@intel.com>
2013-04-10backend: Add LLVM stable version supportFeng, Boqun1-3/+14
support current llvm stable version 3.2 modify cmake file to check the version of llvm provided by system or configured by LLVM_INSTALL_DIR, and add a macro define in the format LLVM_<MAJOR><MINOR> according the version, this macro can be used for llvm version-specific code. Signed-off-by: Feng, Boqun <boqun.feng@intel.com> Reviewed-by: Homer Hsing <homer.xing@intel.com>
2013-04-10Keep consistent naming rule for LLVM_XXX Cmake variables.Zhigang Gong1-12/+7
Also fixed inconsistent indentation in FindLLVM.cmake and remove some unecessary blank lines. Based on patch from guanqun. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-04-10fix compilation errors when it can't find correct library dirsLu Guanqun1-2/+2
The reason is that we specify `LLVM_LIBRARY_DIRS` in `backend/src/CMakeLists.txt`, while in `FindLLVM.cmake`, we name it wrong.
2013-04-10Refine CMake to check llvm version.Zhigang Gong7-88/+40
This branch need llvm 3.3 or newer version. We need to modify the cmake to check the version. This commit also fixed some minor bugs in the find_packages, and removed those useless files. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2013-03-29CMake fixup.Zhigang Gong1-0/+46
Add a FindLLVM to handle the llvm package finding function. Fixed the broken CMake files in backend. Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
2012-08-10Removed Gen6 Stripped out all dependencies from previous compiler Added a ↵Benjamin Segovia1-0/+36
dependency on the new compiler
2012-08-10Cleaned and simplified CMakeLists file Fixed some warnings with latest GCCbsegovia2-0/+3
2012-08-10Added all miniCL filesbsegovia8-0/+230