Commit Graph

454 Commits

Author SHA1 Message Date
Sam Edwards d0ebc59d32 Merge branch 'master' into cmake 2018-05-27 14:07:05 -06:00
Sam Edwards a504a910b0 CMake: Rename `check` function in checkPandaVersion.h
This mirrors 239f66c on master.
2018-05-27 14:06:58 -06:00
Sam Edwards 0ce9dc98b1 general: Move inclusion of checkPandaVersion.h to dtoolbase
This includes it everywhere, meaning developers no longer must
remember to include it in each metalib init file.
2018-05-26 18:39:24 -06:00
Sam Edwards 399f4a33a1 CMake: Check Git commit SHA1
This is for PandaSystem::get_git_commit()
2018-05-25 13:33:47 -06:00
Sam Edwards 85b8d96919 CMake: Add reminder for when we upgrade to C++17 2018-05-24 14:47:12 -06:00
rdb 5e0ce969fe Work around clang 3.1 compile error with static constexpr
There is a bug in clang versions before 3.2 (including the one shipped with Xcode) that makes it give a "conflicting types" compile error when there is a static constexpr function defined outside the class.  The way to work around this is either to remove one of the "static" or "constexpr" keywords, or to simply put the definition inline.

See: https://stackoverflow.com/a/17494592/2135754

I would try and upgrade Xcode to version 5 to see if the problem is fixed, but the buildbot still runs OS X Lion (10.7) and the last version of Xcode that works on Lion is 4.6.3, so it seems easier to just apply these workarounds for now.
2018-05-24 14:34:03 +02:00
rdb 9fad3dba60 general: remove macros for compatibility with non-C++11 compilers
Now that we require MSVC 2015, we no longer need all this nonsense, so we can write cleaner code.
2018-05-23 23:33:05 +02:00
rdb f45ddcab2f general: switch to C++11 Lockable semantics for mutexes
This renames acquire/release to lock/unlock in order to be compatible with std::lock_guard and std::unique_lock (which will eventually replace the *MutexHolder classes).  It will also allow us to typedef MutexImpl to std::mutex later on.
2018-05-23 20:37:56 +02:00
Sam Edwards d96765b957 CMake: Enhance checkPandaVersion.h
This removes the requirement that it only be included
in a single C++ file per library, by forcing the compiler
to emit the function that references the version symbol
as a weak symbol itself.  Now, the linker will not only
tolerate redundant inclusions, it will also coalesce them
together.
2018-05-16 17:38:13 -06:00
Sam Edwards b08ab6324e CMake: Move panda version logic to dtoolbase 2018-05-16 14:36:31 -06:00
rdb 0bb81a43c9 express: make a thread safe weak pointer implementation (#321)
To access a WeakPointerTo in a thread-safe way, use something like this:

    if (auto ptr = weak_ptr.lock()) {
      ..use ptr as regular PointerTo
    }

The new implementation no longer needs a reference to be stored to all weak pointers on the WeakReferenceList; a mere count of weak pointers is sufficient.  Therefore, callbacks theoretically no longer require a WeakPointerTo to be constructed.

The WeakPointerTo class is not actually atomic; it could be made so, but I don't believe it's worth it at this time.
2018-05-15 13:40:21 +02:00
Sam Edwards 6efb07de93 Merge branch 'master' into cmake 2018-05-14 19:09:14 -06:00
rdb 8a98bf42a3 general: enable use of tie and tuple on macOS (from TR1, for now) 2018-05-05 23:09:39 +02:00
Sam Edwards 56a6e6a80a Merge remote-tracking branch 'origin/master' into cmake 2018-04-20 01:57:46 -06:00
Sam Edwards 218d0e8ade CMake: Build dtool metalibs as metalibs 2018-04-19 00:07:08 -06:00
rdb d13464104c Fix compilation issue with --nothing on MSVC
I have no idea why this error happens, but it does not seem worth the effort to investigate further, so I'm just reverting the previous change to this file.
2018-04-06 20:50:31 +02:00
Sam Edwards 449195a33d CMake: Define appropriate BUILDING_ symbols 2018-03-31 04:24:06 -06:00
Sam Edwards 25b13ad199 Merge branch 'master' into cmake 2018-03-31 04:23:49 -06:00
Sam Edwards 9dd37e9dbc general: Add guards to ensure proper BUILDING_ macros defined
This is designed to sanity-check the buildsystem, ensuring that the
expected BUILDING_ macros are defined at the expected time. It
also helps catch cases where the wrong BUILDING_/EXPCL_ macros
are used.
2018-03-25 13:17:52 -06:00
Sam Edwards bd2a9d709a dtoolbase: Introduce BUILDING_ defines for each component
This mirrors the prior commit.
2018-03-25 13:17:52 -06:00
Sam Edwards 9739923593 dconfig: Change export macros to EXP*_DTOOL_DCONFIG
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards 775fcb5b0b prc: Change export macros to EXP*_DTOOL_PRC
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards ad5b45811d dtoolutil: Change export macros to EXP*_DTOOL_DTOOLUTIL
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards 9852ada792 dtoolbase: Change export macros to EXP*_DTOOL_DTOOLBASE
This is for consistency with `panda`, which follows this format.
2018-03-25 13:17:52 -06:00
Sam Edwards a4c1b44371 dtoolbase: Remove EXPORT_TEMPLATES define
As of f69354d9fa, this is just always
expected on all platforms. If it's not defined,
TemplateClass<X>::_type_handle won't link correctly with some compilers
(e.g. Clang) and the lack of 'extern template class' will result in
duplicated code in any case. In short, turning it off causes problems.

makepanda also always turns this on, so it doesn't represent any
optional feature or autodetected platform-specific behavior anyway.
2018-03-20 14:36:19 -04:00
rdb 766b38fb7a dtoolbase: make TypeHandle a constexpr class 2018-03-08 12:58:16 +01:00
Sam Edwards ebe9e75d84 dtoolbase: Delete unused preprocessor macro
[skip ci]
2018-03-04 20:28:51 -07:00
Sam Edwards 84e7539f99 Merge branch 'master' into cmake 2018-02-17 23:35:19 -07:00
Sam Edwards 5c4ef25bb7 CMake: Use proper target_use_packages definitions for Eigen 2018-02-17 16:56:35 -07:00
rdb 730279531a makepanda: build on Intel Android machines 2018-02-10 12:13:05 +01:00
Sam Edwards 556c03c0c1 CMake: Take care of panda3d.interrogatedb module 2018-02-07 18:59:41 -07:00
Sam Edwards eda119dac4 Merge branch 'master' into cmake
# Conflicts:
#	.travis.yml
2018-02-04 17:12:51 -07:00
rdb 60a572f88a android: some changes for building on Android:
- allow setting API target with --target=android-21
 - always link to libpython on Android, seems to be necessary
 - support aarch64 (arm64-v8 ABI) architecture
 - enable building on an Android machine (tested in termux)

[skip ci]
2018-01-28 14:24:51 +01:00
rdb 27f20c80fd Don't include dlmalloc_src.cxx in interrogate
Fixes: #200
2017-11-27 18:49:28 +01:00
rdb 69b3468b2c interrogate: more improvements to seq/map wrappers
Gets rid of properties defined as both MAKE_SEQ_PROPERTY/MAKE_MAP_PROPERTY, which are just a bad idea. Instead, adds a way for map properties to define a separate "keys" interface.

Fixes: #203
2017-11-27 17:29:50 +01:00
rdb 464cd5fc8b Replace __builtin_expect macros with LIKELY/UNLIKELY 2017-10-09 00:22:28 +02:00
rdb bf190f7306 interrogate: support MAKE_MAP_PROPERTY 2017-10-09 00:02:46 +02:00
rdb 925ce854d0 general: make DO_MEMORY_USAGE setting not change ABI compatibility 2017-07-10 19:50:09 +02:00
rdb 7228bc7e5f Fix NATIVE_WORDSIZE on 64-bit Windows (fixes memory alignment) 2017-07-10 01:51:12 +02:00
rdb fa1c480508 general: clean up use of override keyword 2017-07-03 12:56:23 +02:00
rdb f57a3f9cde Hack to remove build warning on MSVC 2010
Fixes LP #1700329
2017-07-03 11:13:02 +02:00
rdb a66b497f2b We no longer support GCC 4.6. Version 4.8+ is recommended.
Ubuntu Precise users can install GCC 4.8 from the ppa:ubuntu-toolchain-r/test repository.
CentOS 5/6 users can install devtoolset-2 or later.
2017-06-12 19:47:54 +02:00
rdb 88e963b936 Fix compilation errors in GCC 4.6 and 4.8 2017-06-09 20:36:45 +02:00
rdb 904209b277 Split out interrogate jobs for dtool directories from express 2017-05-24 13:44:52 +02:00
rdb d576c6b638 Improvements to generated API docs, especially in direct tree.
Also add an entry point for pfreeze.
2017-05-24 13:30:21 +02:00
rdb 325ac4c114 Fix memory tracking bug - DeletedBufferChain erroneously showed leak 2017-05-13 21:59:29 +02:00
rdb 2669cc8710 Remove unused macros 2017-04-07 13:56:35 +02:00
rdb 6f8b379bda Big patch full of performance improvements
This particularly benefits applications with a lot of nodes.
2017-04-03 01:41:23 +02:00
Sam Edwards 76a7c84330 Merge branch 'master' into cmake 2017-03-08 01:59:15 -07:00
Sam Edwards 6926fbfbe6 CMake: Push Python links back to where they're actually needed
This keeps the Panda3D core free of any Python-specific linkage
2017-03-08 01:44:27 -07:00