summaryrefslogtreecommitdiffstats
path: root/External/lua-5.2.3
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2017-12-17 03:11:56 +0000
committerEgor Yusov <egor.yusov@gmail.com>2017-12-17 03:11:56 +0000
commita03619d03a9ca6605c8ea1d3638c2b10c954edf9 (patch)
tree263fd232223acac0326ea145263bfc241881229f /External/lua-5.2.3
parentCmake: downgraded minimum required version to 3.6 to allow Android build (diff)
downloadDiligentTools-a03619d03a9ca6605c8ea1d3638c2b10c954edf9.tar.gz
DiligentTools-a03619d03a9ca6605c8ea1d3638c2b10c954edf9.zip
Fixed Android warnings
Diffstat (limited to 'External/lua-5.2.3')
-rw-r--r--External/lua-5.2.3/CMakeLists.txt11
1 files changed, 11 insertions, 0 deletions
diff --git a/External/lua-5.2.3/CMakeLists.txt b/External/lua-5.2.3/CMakeLists.txt
index 78d2615..383bae8 100644
--- a/External/lua-5.2.3/CMakeLists.txt
+++ b/External/lua-5.2.3/CMakeLists.txt
@@ -86,6 +86,17 @@ if(MSVC)
target_compile_options(Lua PRIVATE /W3 /wd4244 /wd4334 /wd4702)
endif(MSVC)
+if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
+ CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
+ # Setting LANGUAGE to CXX is not enough for clang, so use -x c++ to compile c files as c++ and suppress
+ # the following warning:
+ # clang++.exe: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
+ target_compile_options(Lua PRIVATE -x c++)
+
+ # For loslib.c, disable the following
+ # warning: 'tmpnam' is deprecated: tempnam is unsafe, use mkstemp or tmpfile instead [-Wdeprecated-declarations]
+ set_source_files_properties(src/loslib.c PROPERTIES COMPILE_FLAGS -Wno-deprecated-declarations)
+endif()
source_group("src" FILES ${SOURCE})
source_group("include" FILES ${INCLUDE})