buildSrc/linux.gradle

Print this page

        

*** 40,56 **** // Lambda for naming the generated libs LINUX.library = { name -> return "lib${name}.so" as String } // A set of common parameters to use for both compiling and linking def commonFlags = [ ! "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer", // optimization flags ! "-W", "-Wall", "-Wno-unused", "-Wno-parentheses", "-Werror=implicit-function-declaration"] // warning flags if (!IS_64) { commonFlags += "-m32" } // Specify the compilation parameters and link parameters def ccFlags = [ commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c", IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten() //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"]) --- 40,64 ---- // Lambda for naming the generated libs LINUX.library = { name -> return "lib${name}.so" as String } // A set of common parameters to use for both compiling and linking def commonFlags = [ ! "-fno-strict-aliasing", "-fPIC", "-fno-omit-frame-pointer" // optimization flags ! ] if (!IS_64) { commonFlags += "-m32" } + if (!IS_DEBUG_NATIVE) { + commonFlags += "-Wextra" + commonFlags += "-Wall" + commonFlags += "-Wno-unused" + commonFlags += "-Wno-parentheses" + commonFlags += "-Werror=implicit-function-declaration" + } + // Specify the compilation parameters and link parameters def ccFlags = [ commonFlags, "-I$JDK_HOME/include", "-I$JDK_HOME/include/linux", "-c", IS_DEBUG_NATIVE ? ["-ggdb", "-DVERBOSE"] : ["-O2", "-DNDEBUG"]].flatten() //ccFlags.addAll(["-Wnon-virtual-dtor", "-Woverloaded-virtual", "-std=c++0x"])