-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
38 lines (27 loc) · 969 Bytes
/
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
cmake_minimum_required(VERSION 3.25.2)
project(
cumccormick
VERSION 0.0.1
DESCRIPTION "CUDA McCormick library"
LANGUAGES CXX CUDA)
# Only do these if this is the main project, and not if it is included through add_subdirectory
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
# Let's ensure -std=c++xx instead of -std=g++xx
set(CMAKE_CXX_EXTENSIONS OFF)
# Better support of clang based tools
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
# Enable position independent code
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
# Let's nicely support folders in IDEs
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
# Include example programs
add_subdirectory(examples)
# Testing only available if this is the main project.
# Note this needs to be done in the main CMakeLists
# since it calls enable_testing, which must be in the
# main CMakeLists.
include(CTest)
add_subdirectory(tests)
endif()
# Include main library
add_subdirectory(src)