Skip to content

Commit 62b9dad

Browse files
benjaminpluben
authored andcommitted
Fix lgtm C++.
1 parent 73ae46e commit 62b9dad

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
cmake_minimum_required(VERSION 3.5)
2+
include(CheckCXXCompilerFlag)
23
project(zstd-jni)
34
file(STRINGS "version" NATIVE_VERSION)
45
enable_language(C ASM)
@@ -11,4 +12,7 @@ file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "src/*.[cS]")
1112
add_library(zstd-jni-${NATIVE_VERSION} SHARED ${SOURCES})
1213
add_definitions("-DZSTD_MULTITHREAD=1")
1314
add_definitions("-DZSTD_LEGACY_SUPPORT=4")
14-
add_definitions("-Oz")
15+
CHECK_CXX_COMPILER_FLAG(-Oz COMPILER_SUPPORTS_OZ)
16+
if(COMPILER_SUPPORTS_OZ)
17+
add_definitions("-Oz")
18+
endif()

0 commit comments

Comments
 (0)