forked from avramidis/sodecl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
37 lines (29 loc) · 1.14 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
#---------------------------------------------------------------------------//
# Copyright (c) 2015 Eleftherios Avramidis <el.avramidis@gmail.com>
#
# Distributed under The MIT License (MIT)
# See accompanying file LICENSE.txt
#---------------------------------------------------------------------------//
cmake_minimum_required (VERSION 3.13.4)
project(sodecl)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_STANDARD 17)
set(default_build_type "Release")
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
message(STATUS "USING OPTIONS FOR GNU COMPILER")
set(MY_DEBUG_OPTIONS "-O0;-g;-Wall;-Wextra;-Wpedantic")
set(MY_RELEASE_OPTIONS "-O3;-Wall;-Wextra;-Wpedantic")
endif ()
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
message(STATUS "USING OPTIONS FOR MSVC COMPILER")
set(MY_DEBUG_OPTIONS "/Wall /wd4710")
set(MY_RELEASE_OPTIONS "/Wall;/wd4710;/wd4711;/wd4514")
endif ()
add_compile_options("$<$<CONFIG:DEBUG>:${MY_DEBUG_OPTIONS}>")
add_compile_options("$<$<CONFIG:RELEASE>:${MY_RELEASE_OPTIONS}>")
FIND_PACKAGE(OpenCL REQUIRED)
add_subdirectory(benchmarks)
enable_testing()
add_subdirectory(tests)
add_subdirectory(interfaces)
add_subdirectory(examples)