1 # ################################################################
2 # Copyright (c) 2016-present, Yann Collet, Facebook, Inc.
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 # ################################################################
11 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
13 OPTION(ZSTD_LEGACY_SUPPORT "LEGACY SUPPORT" OFF)
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)
24 ADD_SUBDIRECTORY(programs)
25 ADD_SUBDIRECTORY(tests)
27 #-----------------------------------------------------------------------------
28 # Add extra compilation flags
29 #-----------------------------------------------------------------------------
30 INCLUDE(CMakeModules/AddExtraCompilationFlags.cmake)
31 ADD_EXTRA_COMPILATION_FLAGS()
33 ADD_CUSTOM_TARGET(clean-all
34 COMMAND ${CMAKE_BUILD_TOOL} clean
35 COMMAND rm -rf ${CMAKE_BINARY_DIR}/