-
Notifications
You must be signed in to change notification settings - Fork 27
/
CMakeLists.txt
54 lines (42 loc) · 1.32 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#
# CMakeLists.txt - CMake configuration file for swmm-toolkit python package
#
# Created: Feb 6, 2020
# Modified Jun 7, 2021
#
# Author: See AUTHORS
#
################################################################################
################## CMAKELISTS FOR SWMM-TOOLKIT PROJECT ###################
################################################################################
cmake_minimum_required (VERSION 3.17)
project(swmm-toolkit
VERSION
0.14.0
)
# Trick here is to perform build in a python virtual environment
set(Python_FIND_VIRTUALENV FIRST)
#set(CMAKE_FIND_DEBUG_MODE TRUE)
if(NOT MSVC)
find_package (Python3 ${PYTHON_VERSION_STRING} COMPONENTS Interpreter Development.Module REQUIRED)
else()
find_package (Python3 ${PYTHON_VERSION_STRING} COMPONENTS Interpreter Development REQUIRED)
endif()
#set(CMAKE_FIND_DEBUG_MODE FALSE)
# SWIG is a build requirement so needs to be installed first
find_package(SWIG REQUIRED)
cmake_policy(SET CMP0078 NEW)
cmake_policy(SET CMP0086 NEW)
include(${SWIG_USE_FILE})
# If wheel build on Apple fetch and build OpenMP Library
if (APPLE)
include(./extern/openmp.cmake)
else()
find_package(OpenMP
OPTIONAL_COMPONENTS
C
)
endif()
# Add project subdirectories
add_subdirectory(swmm-solver)
add_subdirectory(src/swmm/toolkit)