Commit Graph

1534 Commits (38056d108620cd34dfea19444f08561965fad1c3)

Author SHA1 Message Date
David Snopek 38056d1086
Merge pull request #1651 from enetheru/clang-cl
CMake: Enable using clang-cl on windows
2024-12-09 08:30:20 -06:00
Samuel Nicholas ef9778a392 CMake: Enable using clang-cl on windows
detect clang with MSVC frontend using CMAKE_CXX_COMPILER_FRONTEND_VARIANT
2024-12-09 11:58:40 +10:30
David Snopek ce66e6bb39
Merge pull request #1648 from enetheru/dev_tag
CMake: Handle GODOT_DEV_BUILD flag
2024-12-08 08:18:07 -06:00
Samuel Nicholas 542ab19a21 CMake: Handle GODOT_DEV_BUILD flag correctly
.dev is added to output artifacts
Warn users for specifying dev_build and Release build config
Update documentation with deviations to SCons
Update debug_symbols handling, its rolled into build config
Cleanup helper variables and comments
2024-12-07 09:50:59 +10:30
David Snopek 163189fba9
Merge pull request #1660 from enetheru/exclude_typo
CMake: Replace empty ${EXCLUDE} variable with EXCLUDE_FROM_ALL
2024-12-06 16:08:27 -06:00
David Snopek 4eaef4ca9a
Merge pull request #1663 from enetheru/fix_crt_debug
CMake: Fix selection of MSVC Runtime compile flags
2024-12-06 16:08:19 -06:00
David Snopek 72aeb35691
Merge pull request #1655 from Ivorforce/variant-internal
Add variant_internal.hpp.
2024-12-06 16:08:04 -06:00
Samuel Nicholas 9df3a66a88 Replace empty EXCLUDE variable with EXCLUDE_FROM_ALL
This was a mistake left over from the modernise PR
2024-12-05 09:16:11 +10:30
Samuel Nicholas 732df06a81 CMake: Fix selection of MSVC Runtime compile flags
My last attempt at solving this was not correct. I have left lots of comments in the source detailing the issue as it will effect consumers.
2024-12-05 09:15:40 +10:30
David Snopek bb567060f4
Merge pull request #1616 from dsnopek/ptrtoarg-no-error-for-null-ref
Don't print an error when decoding a null Ref<T>
2024-12-02 12:54:26 -06:00
Lukas Tenbrink daef7d48ea Add variant_internal.hpp.
This module contains VariantInternalType, VariantInternal, VariantGetInternalPtr, VariantInternalAccessor and VariantDefaultInitializer, allowing to access and manipulate Variant's internal values.
2024-11-28 15:15:03 +01:00
David Snopek 5255034fb0
Merge pull request #1653 from aaronfranke/print
Add `print_line` for compatibility with engine modules
2024-11-28 07:31:06 -06:00
David Snopek b378d8c21f
Merge pull request #1654 from Ivorforce/gdextension-interface-update
Update gdextension_interface.h. Add metadata to GetTypeInfo of char16_t and char32_t.
2024-11-28 06:59:21 -06:00
David Snopek af4eaa76d7
Merge pull request #1649 from enetheru/fix-backward-break
CMake: fix break for build prior to modernisation PR
2024-11-28 06:58:57 -06:00
David Snopek 3a8d7a25ae
Merge pull request #1647 from enetheru/fix#1459
CMake: Align MSVC runtime (MD[d], MT) options to engine
2024-11-28 06:57:53 -06:00
David Snopek bc6f79c67a
Merge pull request #1617 from zhehangd/fix_def_hpp_namespace
Use namespace in defs.hpp
2024-11-28 06:57:20 -06:00
Samuel Nicholas b7dbd26d8f Align MSVC runtime (MD[d], MT) options to engine #1647
Engine has an option to link to MDd debug_crt
add flag to SCons options
Add flag to CMAKE options
2024-11-28 13:46:41 +10:30
Lukas Tenbrink f174b4a445 Update gdextension_interface.h. Add metadata to GetTypeInfo of char16_t and char32_t. 2024-11-26 21:43:59 +01:00
Aaron Franke ac466e4766
Add `print_line` for compatibility with engine modules 2024-11-26 03:06:22 -08:00
Samuel Nicholas 597055d13c CMake: re-add the godot::cpp alias pointing to template_debug
So that builds that relied on the alias already wont break.
2024-11-26 19:42:33 +10:30
David Snopek a42b3634d2
Merge pull request #1598 from enetheru/modernise
Modernise existing cmake options
2024-11-22 08:23:46 -06:00
Samuel Nicholas 8534e2104f Modernise Existing CMakeLists.txt
- Added to .gitignore CMakeUserPresets.json

### Configuration:
- Changed python command to use single quotes to make build output log more legible.
- Added GODOT_DEV_BUILD to allow differentiation of debug or Release builds.
- Added find logic for macos Cocoa library

### godot-cpp Changes
- godot-cpp-test is changed to be incorporated into the cmake build as a target.
- Duplicated godot-cpp target into [template_release, template_debug, editor]
- Created {platform}.cmake files mirroring the style of the SCons build.

CMake has a feature called generator expressions for its configuration variables that are evaluated at build time. This allows multi-configuration build systems to properly evaulate options. for msvc, xcode and nijna multi-config.

- Moved configuration options to generator expressions with the notable exclusion of OSX_ARCHITECTURES.
- Remove CMAKE_BUILD_TYPE from msvc CI target as Multi-Config generators ignore it

### godot-cpp-test Changes
- Removed majority of the cmake code, now that the godot-cpp project is setup, the majority of the flags will be propagated as transient dependencies
- Marked with EXCLUDE_FROM_ALL so that it isn't built as part of the 'all' target
- Updated ci to build the godot-cpp-test target from the root directory using cmake
- Tests passing for Windows, Linux, and Macos builds.

### Documentation
Updated with new information
Added Emscripten example
Added Android example
2024-11-21 11:01:00 +10:30
David Snopek c20a84e483
Merge pull request #1601 from Ivorforce/lto
Add lto scons option
2024-11-12 11:16:10 -06:00
Lukas Tenbrink 5f7cf05043 Add lto scons option, defaulting to "none". 2024-11-12 12:45:35 +01:00
David Snopek f298ddd3c4
Merge pull request #1639 from AThousandShips/emsdk_cache_fix
[Web] Don't cache emsdk
2024-11-11 10:30:47 -06:00
A Thousand Ships 1e3b24f658
[Web] Don't cache emsdk
Due to how caches are accessed this cache is almost useless, it only
matters if it is from the same branch or a base branch, and is identical
between branches, so caching it just clutters the build cache
2024-11-09 16:21:59 +01:00
David Snopek 253e095c81
Merge pull request #1581 from dsnopek/classdb-add-virtual-method-arg-metadata-size
Fix crash in `ClassDB::add_virtual_method()` if arguments metadata is the wrong size
2024-11-05 09:18:01 -06:00
Zhehang Ding 450c3d65cd Use namespace in defs.hpp
A global alias of godot::real_t is defined for backward compatibility
2024-11-03 15:13:37 +08:00
David Snopek 259c757cce
Merge pull request #1609 from Ivorforce/patch-3
Rename Vector4.components -> coords.
2024-10-30 14:51:04 -05:00
Lukas Tenbrink 23c9d41d2a Rename Vector4.components -> coords.
The use of .components is deprecated.
2024-10-30 15:44:44 +01:00
David Snopek 7871cec1e7
Merge pull request #1568 from dsnopek/post-initialize-44
Update for new NOTIFICATION_POSTINITIALIZE handling
2024-10-30 08:49:59 -05:00
David Snopek 688ed4b388
Merge pull request #1626 from ruffenman/remove-unimplemented-variant-functions
Remove unimplemented static variant functions 'blend' and 'interpolate'…
2024-10-30 08:49:38 -05:00
David Snopek 7796fcc890
Merge pull request #1622 from Repiteo/ci/runner
CI: Add `runner` workflow to call other workflows
2024-10-30 08:48:37 -05:00
David Snopek 42e398e4e2 Update for new NOTIFICATION_POSTINITIALIZE handling 2024-10-29 16:29:24 -05:00
David Snopek ca5179f7d7
Merge pull request #1594 from dsnopek/macos-thread-local
Avoid `thread_local` on MacOS to prevent issues with hot reload
2024-10-29 15:39:49 -05:00
David Snopek 1e169bb809 Fix crash in `ClassDB::add_virtual_method()` if arguments metadata is the wrong size 2024-10-29 13:22:12 -05:00
David Snopek fa3dfa0e3c
Merge pull request #1591 from dsnopek/variant-object-instance-id
Directly get object instance ID from `Variant` and implement `Variant::get_validated_object()`
2024-10-29 13:10:12 -05:00
David Snopek 7fca545885
Merge pull request #1574 from dsnopek/unicode-class-names
Allow unicode class names
2024-10-29 13:09:45 -05:00
David Snopek dfdc047459
Merge pull request #1630 from dsnopek/sync-quaternion
Sync `Quaternion` with the version in Godot
2024-10-29 08:36:28 -05:00
David Snopek 2004af63a0 Sync `Quaternion` with the version in Godot 2024-10-28 15:37:45 -05:00
David Snopek 0602c32986 Directly get object instance ID from `Variant` and implement `Variant::get_validated_object()` 2024-10-17 09:58:52 -05:00
David Snopek 91833c852e Avoid `thread_local` on MacOS to prevent issues with hot reload 2024-10-17 09:06:27 -05:00
David Snopek a98d41f62b
Merge pull request #1590 from dsnopek/reload-instance-bindings
Correctly set instance bindings on reload
2024-10-17 16:05:02 +02:00
David Snopek 96675a814b
Merge pull request #1625 from Flarkk/looking_at
Add `p_use_model_front` to `Basis::looking_at()`
2024-10-17 16:02:02 +02:00
David Snopek 291147e21b
Merge pull request #1611 from Repiteo/library-no-cache
SCons: Don't cache libraries
2024-10-15 14:42:20 +02:00
ruffenman 42a35a1852 Remove unimplemented static variant functions 'blend' and 'interpolate'. If a user attempts to call either of these it will introduce a linker error and it may not be immediately clear to them why. Also, variant interpolation can already be accessed via 'UtilityFunctions::lerp', making at least the interpolate function unecessary here. 2024-10-14 20:33:20 -04:00
Florent Guiocheau 02fd535454 Add p_use_model_front to Basis::looking_at() 2024-10-14 21:50:12 +02:00
Thaddeus Crews c1524f7c86
CI: Add `runner` workflow to call other workflows 2024-10-11 10:58:28 -05:00
David Snopek 7f02301a91 Don't print an error when decoding a null Ref<T> 2024-10-07 11:22:52 -05:00
David Snopek 6facde3c29
Merge pull request #1602 from Faless/build/use_clang_cl_is_use_llvm
[SCons] Remove use_clang_cl windows flag in favor of generic use_llvm
2024-10-03 08:35:35 -05:00