Compare commits

...

3 Commits

Author SHA1 Message Date
Rémi Verschelde
78ffea5b13 gdextension: Sync with upstream commit b09f793f564a6c95dc76acc654b390e68441bd01 (4.2.1-stable) 2023-12-12 13:48:47 +01:00
dependabot[bot]
f93a6c5a5b Bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit a7becb43e6)
2023-12-12 13:47:56 +01:00
Rémi Verschelde
b03e56922d CMake: Remove hardcoded warnings list and forcing -Werror on library builds
The CMake buildsystem should be completely reviewed to properly match
what is done by SCons, instead of making its own arbitrary decisions on
how godot-cpp should be compiled.

Currently the SCons setup doesn't include warning options, so CMake
shouldn't either. Options similar to upstream Godot's SCons setup could
be added, and then replicated for CMake.

(cherry picked from commit 41517eacb1)
2023-12-12 13:47:21 +01:00
4 changed files with 47 additions and 36 deletions

View File

@@ -104,7 +104,7 @@ jobs:
continue-on-error: true
- name: Set up Python (for SCons)
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.x'

View File

@@ -47,11 +47,6 @@ option(GODOT_CPP_WARNING_AS_ERROR "Treat warnings as errors" OFF)
# Add path to modules
list( APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/" )
# Check if we are building ourself or being included
if(${PROJECT_NAME} STREQUAL ${CMAKE_PROJECT_NAME})
set(GODOT_CPP_BUILDING_SELF ON)
endif()
# Set some helper variables for readability
set( compiler_is_clang "$<OR:$<CXX_COMPILER_ID:AppleClang>,$<CXX_COMPILER_ID:Clang>>" )
set( compiler_is_gnu "$<CXX_COMPILER_ID:GNU>" )
@@ -158,12 +153,6 @@ add_library(godot::cpp ALIAS ${PROJECT_NAME})
include(GodotCompilerWarnings)
# Treat warnings as errors if we are building ourself
if(GODOT_CPP_BUILDING_SELF)
unset( GODOT_CPP_WARNING_AS_ERROR CACHE )
set_warning_as_error()
endif()
target_compile_features(${PROJECT_NAME}
PRIVATE
cxx_std_17

View File

@@ -2,10 +2,10 @@
"header": {
"version_major": 4,
"version_minor": 2,
"version_patch": 0,
"version_patch": 1,
"version_status": "stable",
"version_build": "official",
"version_full_name": "Godot Engine v4.2.stable.official"
"version_full_name": "Godot Engine v4.2.1.stable.official"
},
"builtin_class_sizes": [
{
@@ -136403,6 +136403,17 @@
"inherits": "Node2D",
"api_type": "core",
"methods": [
{
"name": "get_rid",
"is_const": true,
"is_vararg": false,
"is_static": false,
"is_virtual": false,
"hash": 2944877500,
"return_value": {
"type": "RID"
}
},
{
"name": "set_enabled",
"is_const": false,
@@ -136724,6 +136735,17 @@
"inherits": "Node3D",
"api_type": "core",
"methods": [
{
"name": "get_rid",
"is_const": true,
"is_vararg": false,
"is_static": false,
"is_virtual": false,
"hash": 2944877500,
"return_value": {
"type": "RID"
}
},
{
"name": "set_enabled",
"is_const": false,
@@ -140321,6 +140343,17 @@
"inherits": "Node2D",
"api_type": "core",
"methods": [
{
"name": "get_rid",
"is_const": true,
"is_vararg": false,
"is_static": false,
"is_virtual": false,
"hash": 2944877500,
"return_value": {
"type": "RID"
}
},
{
"name": "set_navigation_polygon",
"is_const": false,
@@ -140721,6 +140754,17 @@
"inherits": "Node3D",
"api_type": "core",
"methods": [
{
"name": "get_rid",
"is_const": true,
"is_vararg": false,
"is_static": false,
"is_virtual": false,
"hash": 2944877500,
"return_value": {
"type": "RID"
}
},
{
"name": "set_navigation_mesh",
"is_const": false,

View File

@@ -59,31 +59,9 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
else()
#elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
# using Clang
#elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# using GCC and maybe MinGW?
set(GODOT_LINKER_FLAGS "-static-libgcc -static-libstdc++ -Wl,-R,'$$ORIGIN'")
# Hmm.. maybe to strikt?
set(GODOT_COMPILE_FLAGS "-fPIC -g -Wwrite-strings")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wchar-subscripts -Wcomment -Wdisabled-optimization")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wformat -Wformat=2 -Wformat-security -Wformat-y2k")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wimport -Winit-self -Winline -Winvalid-pch -Werror")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wmissing-braces -Wmissing-format-attribute")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wmissing-include-dirs -Wmissing-noreturn -Wpacked -Wpointer-arith")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wredundant-decls -Wreturn-type -Wsequence-point")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wswitch -Wswitch-enum -Wtrigraphs")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wuninitialized -Wunknown-pragmas -Wunreachable-code -Wunused-label")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wunused-value -Wvariadic-macros -Wvolatile-register-var -Wno-error=attributes")
# -Wshadow -Wextra -Wall -Weffc++ -Wfloat-equal -Wstack-protector -Wunused-parameter -Wsign-compare -Wunused-variable -Wcast-align
# -Wunused-function -Wstrict-aliasing -Wstrict-aliasing=2 -Wmissing-field-initializers
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Android")
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -Wno-ignored-attributes")
endif()
if(CMAKE_BUILD_TYPE MATCHES Debug)
set(GODOT_COMPILE_FLAGS "${GODOT_COMPILE_FLAGS} -fno-omit-frame-pointer -O0")