diff options
| author | Egor Yusov <egor.yusov@gmail.com> | 2017-12-17 03:11:56 +0000 |
|---|---|---|
| committer | Egor Yusov <egor.yusov@gmail.com> | 2017-12-17 03:11:56 +0000 |
| commit | a03619d03a9ca6605c8ea1d3638c2b10c954edf9 (patch) | |
| tree | 263fd232223acac0326ea145263bfc241881229f /External/lua-5.2.3 | |
| parent | Cmake: downgraded minimum required version to 3.6 to allow Android build (diff) | |
| download | DiligentTools-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.txt | 11 |
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}) |
