]> git.proxmox.com Git - ceph.git/blob - ceph/src/zstd/build/cmake/CMakeLists.txt
add subtree-ish sources for 12.0.3
[ceph.git] / ceph / src / zstd / build / cmake / CMakeLists.txt
1 # ################################################################
2 # Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
3 # All rights reserved.
4 #
5 # This source code is licensed under the BSD-style license found in the
6 # LICENSE file in the root directory of this source tree. An additional grant
7 # of patent rights can be found in the PATENTS file in the same directory.
8 # ################################################################
9
10 PROJECT(zstd)
11 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
12
13 OPTION(ZSTD_LEGACY_SUPPORT "LEGACY SUPPORT" OFF)
14
15 IF (ZSTD_LEGACY_SUPPORT)
16 MESSAGE(STATUS "ZSTD_LEGACY_SUPPORT defined!")
17 ADD_DEFINITIONS(-DZSTD_LEGACY_SUPPORT=1)
18 ELSE (ZSTD_LEGACY_SUPPORT)
19 MESSAGE(STATUS "ZSTD_LEGACY_SUPPORT not defined!")
20 ADD_DEFINITIONS(-DZSTD_LEGACY_SUPPORT=0)
21 ENDIF (ZSTD_LEGACY_SUPPORT)
22
23 ADD_SUBDIRECTORY(lib)
24 ADD_SUBDIRECTORY(programs)
25 ADD_SUBDIRECTORY(tests)
26
27 #-----------------------------------------------------------------------------
28 # Add extra compilation flags
29 #-----------------------------------------------------------------------------
30 INCLUDE(CMakeModules/AddExtraCompilationFlags.cmake)
31 ADD_EXTRA_COMPILATION_FLAGS()
32
33 ADD_CUSTOM_TARGET(clean-all
34 COMMAND ${CMAKE_BUILD_TOOL} clean
35 COMMAND rm -rf ${CMAKE_BINARY_DIR}/
36 )