File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ set(CMAKE_CXX_STANDARD 11)
26
26
27
27
project (OpenCLRuntimeLoader LANGUAGES C CXX )
28
28
29
+ option (BUILD_SHARED_LIBS "Set to ON to build a shared library." OFF )
30
+
29
31
if (CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME )
30
32
include (CTest )
31
33
endif ()
@@ -40,17 +42,16 @@ set( OpenCLRuntimeLoader_SOURCE_FILES
40
42
41
43
source_group (Source FILES ${OpenCLRuntimeLoader_SOURCE_FILES} )
42
44
43
- add_library (OpenCLRuntimeLoader STATIC ${OpenCLRuntimeLoader_SOURCE_FILES} )
45
+ add_library (OpenCLRuntimeLoader ${OpenCLRuntimeLoader_SOURCE_FILES} )
44
46
set_target_properties (OpenCLRuntimeLoader PROPERTIES FOLDER "OpenCLRuntimeLoader" )
45
47
target_include_directories (OpenCLRuntimeLoader PUBLIC ${OpenCL_INCLUDE_DIRS} )
46
48
target_compile_definitions (OpenCLRuntimeLoader PRIVATE CL_TARGET_OPENCL_VERSION=300 )
47
49
target_link_libraries (OpenCLRuntimeLoader PRIVATE ${CMAKE_DL_LIBS} )
48
50
49
- if (${CMAKE_SYSTEM_NAME} STREQUAL "Windows" )
51
+ if (MSVC )
50
52
target_compile_options (OpenCLRuntimeLoader PRIVATE /EHsc )
51
53
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Linux" )
52
54
target_compile_options (OpenCLRuntimeLoader PRIVATE -Wall )
53
- set_target_properties (OpenCLRuntimeLoader PROPERTIES LINK_FLAGS "-Wl,--version-script" )
54
55
elseif (${CMAKE_SYSTEM_NAME} STREQUAL "Darwin" )
55
56
# TODO
56
57
endif ()
You can’t perform that action at this time.
0 commit comments