-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
32 lines (24 loc) · 1007 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
cmake_minimum_required(VERSION 3.10)
# set the project name and version
project(RangeShifter VERSION 2.1.0)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# add RScore to source search path
set(batchmode ON) # don't config RScore as standalone
add_subdirectory(src/RScore)
# add the executable
add_executable(RangeShifter src/Main.cpp src/BatchMode.cpp)
target_compile_definitions(RangeShifter PRIVATE RSWIN64)
# enable LINUX_CLUSTER macro on Linux + macOS
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
add_compile_definitions(LINUX_CLUSTER)
endif()
# Debug Mode by default, unless "release" is passed i.e. `cmake -Drelease=`
if(NOT DEFINED release)
add_compile_definitions(RSDEBUG)
endif()
# link RScore to the executable as a library
target_link_libraries(RangeShifter PUBLIC RScore)
# add RScore as an include dir
target_include_directories(RangeShifter PUBLIC "${PROJECT_BINARY_DIR}" "${PROJECT_SOURCE_DIR}/RScore")