-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
39 lines (28 loc) · 1.15 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
cmake_minimum_required (VERSION 2.6)
project (libOpenCL_loader)
# The version number.
set (clloader_VERSION_MAJOR 1)
set (clloader_VERSION_MINOR 0)
set(CMAKE_MACOSX_RPATH 1)
option( BUILD_TESTS "Build test program." ON )
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
include_directories("${PROJECT_SOURCE_DIR}/include/")
#include(CMakeParseArguments)
add_definitions(-DENABLE_OPENCL=1)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS TRUE)
message(STATUS "Project source dir = ${PROJECT_SOURCE_DIR}")
message(STATUS "Project build dir = ${PROJECT_BINARY_DIR}")
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
if(CMAKE_COMPILER_IS_GNUCC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC -Wno-deprecated-declarations")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wno-deprecated-declarations")
endif()
add_definitions(-DCL_USE_DEPRECATED_OPENCL_1_1_APIS)
add_subdirectory(src)
if( BUILD_TESTS )
add_subdirectory(test)
endif( BUILD_TESTS )