-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
36 lines (25 loc) · 948 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
# Works with X as minimum and tested through Y (X...Y)
cmake_minimum_required(VERSION 3.11...3.13)
project(PyPoPS
VERSION 0.9
DESCRIPTION "Python interface to PoPS (Pest or Pathogen Spread) Model C++ library"
LANGUAGES CXX)
#add_library(PoPS fun.cpp)
#include_directories("${PROJECT_SOURCE_DIR}/")
add_subdirectory(pybind11)
add_subdirectory(PoPS)
pybind11_add_module(_pypops src/pypops.cpp include/raster.hpp include/helpers.hpp)
target_include_directories(_pypops PRIVATE include)
target_link_libraries(_pypops PRIVATE pops)
if(MSVC)
target_compile_options(_pypops PRIVATE /W4 /WX)
else()
target_compile_options(_pypops PRIVATE -Wall -Wextra -pedantic -Werror)
endif()
# Testing only available if this is the main app
#if((CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME) AND BUILD_TESTING)
#add_subdirectory(tests)
#endif()
# Enables testing for subdirectories and adds target test
include(CTest)
add_subdirectory(tests)