forked from mamba-org/mamba
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
60 lines (49 loc) · 1.36 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
55
56
57
58
59
60
# Copyright (c) 2019, QuantStack and Mamba Contributors
#
# Distributed under the terms of the BSD 3-Clause License.
#
# The full license is in the file LICENSE, distributed with this software.
cmake_minimum_required (VERSION 3.2)
if(POLICY CMP0025)
cmake_policy(SET CMP0025 NEW)
endif()
cmake_policy(SET CMP0077 NEW)
#if(POLICY CMP0028)
# cmake_policy(SET CMP0028 NEW)
#endif()
project(mamba)
# Build options
# =============
option(BUILD_LIBMAMBA "Build libmamba library" OFF)
option(BUILD_LIBMAMBAPY "Build libmamba Python bindings" OFF)
option(BUILD_LIBMAMBA_TESTS "Build libmamba C++ tests" OFF)
option(BUILD_MICROMAMBA "Build micromamba" OFF)
option(BUILD_MAMBA_PACKAGE "Build mamba package utility" OFF)
if (MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /DNOMINMAX")
set(CMAKE_BUILD_TYPE Release)
# add_definitions("-DUNICODE -D_UNICODE")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
endif()
# Variants
# ========
# libmamba library and tests
if (BUILD_LIBMAMBA)
if (BUILD_LIBMAMBA_TESTS)
set(BUILD_TESTS ON)
endif()
add_subdirectory(libmamba)
endif()
# Python bindings of libmamba
if (BUILD_LIBMAMBAPY)
add_subdirectory(libmambapy)
endif()
# micromamba
if (BUILD_MICROMAMBA)
add_subdirectory(micromamba)
endif()
# mamba package tarball utility
if (BUILD_MAMBA_PACKAGE)
add_subdirectory(mamba_package)
endif()