Commit Graph

2525 Commits

Author SHA1 Message Date
Donny Lawrence beec6578c8 Fix CMake build issues on macOS. 2018-05-17 15:41:31 -05:00
Sam Edwards 95785407a3 CMake: General whitespace fixes
- Remove trailing whitespace from ends of lines
- Convert tabs to (two) spaces
2018-04-20 02:30:04 -06:00
Sam Edwards 56a6e6a80a Merge remote-tracking branch 'origin/master' into cmake 2018-04-20 01:57:46 -06:00
Sam Edwards 570afa6973 CMake: Fix include path when building prc into metalib 2018-04-19 20:06:09 -06:00
Sam Edwards 218d0e8ade CMake: Build dtool metalibs as metalibs 2018-04-19 00:07:08 -06:00
Sam Edwards 4cec331722 CMake: Add support for building metalibs as metalibs 2018-04-18 14:42:56 -06:00
Sam Edwards 655e661035 CMake: Minor typo fix 2018-04-18 14:38:59 -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 cfd603bb8d CMake: Build Python binary modules as MODULE, never SHARED 2018-04-05 16:11:59 -06:00
rdb 7125a3e587 interrogate: allow passing None for args that have NULL as default value 2018-04-05 20:49:13 +02:00
rdb 552a649ef3 interrogate: add back NULL definition, fixes some keyword arguments
I am not sure why the definition of NULL was removed; it might have been by mistake, but in any case it broke code like this:

    img = PNMImage(w, h, color_space=CS_srgb)

since it would not understand the default value (NULL) for the argument preceding color_space.
2018-04-04 21:50:02 +02:00
Sam Edwards aed544bf5f CMake: Have CMake itself track versions 2018-04-02 15:47:53 -06:00
rdb e9ae7dcc40 Use vector_uchar instead of string for binary network/file data
This distinction allows us to better support Python 3, since it will raise exceptions when trying to put arbitrary binary data in a str object.

This also adds some convenience functions for efficiently initializing a Datagram or PTA_uchar from a vector_uchar.
2018-04-02 23:17:14 +02:00
Sam Edwards 449195a33d CMake: Define appropriate BUILDING_ symbols 2018-03-31 04:24:06 -06:00
Sam Edwards dd42371610 CMake: Update for upstream changes 2018-03-31 04:24:03 -06:00
Sam Edwards 25b13ad199 Merge branch 'master' into cmake 2018-03-31 04:23:49 -06:00
rdb 84915073e1 Fix compilation warning on MSVC 2015 2018-03-30 20:15:13 +02: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 cfd70ebead general: Remove '#pragma interface'/'#pragma implementation'
The GCC documentation states that, as of GCC 2.7.2, these aren't
necessary for proper program behavior. The documentation further
discourages their use because they don't suppress unnecessary code
duplication.

The Panda codebase these days uses "extern template class" instead,
which tells the compiler not to perform implicit template expansion
because an explicit template expansion is available for linking
elsewhere in the program. This is a more compiler-neutral way of
achieving the same thing as '#pragma interface', making
'#pragma interface' not only redundant, it could also mask problems
in the "extern template class" machinery.
2018-03-20 14:36:19 -04: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 013af2ac4b dtool: Delete 'newheader'
This is a task better handled by editors/scripts.

[skip ci]
2018-03-04 20:28:09 -07:00
rdb 8b6616814d interrogate_module: warn about circular dependencies between classes
This will help us catch cases wherein we inadvertently create a circular dependency between component libraries.  Right now it only checks inheritance and typedefs, but this can be expanded in the future.

Also, sorts the module initialization by dependency topology.  This isn't very important right now, but having this guarantee might help when refactoring module initialization in the future.
2018-02-27 20:23:36 +01:00
rdb bdb575e766 interrogatedb: add interrogate_type_is_global (+regenerate pydtool) 2018-02-27 19:44:14 +01:00
rdb 162b86c6d9 interrogatedb: fix library name setting for typedefs
Typedefs are evidently always considered "fully defined", so we need to add another condition to the database merging code to prefer the type that is marked "global" when merging two types.
2018-02-27 19:33:18 +01:00
rdb fa231664bd interrogate: don't mark base types as global 2018-02-27 18:47:51 +01:00
rdb 2450f31ef5 interrogate: remove deprecated and unneeded downcastTo*() functions
They have not been needed for a very long time, and they create an awkward reverse dependency of base classes on derived classes.
2018-02-27 15:06:12 +01:00
Sam Edwards 705fd445f3 dtool: Fix an inconsistent EXPCL/EXPTP 2018-02-26 00:03:09 -07:00
Sam Edwards c3106411f5 dtool: Remove 'attach'
See #244 for discussion. It's really old, hasn't been used in almost
a decade, and doesn't support the current Git workflow either.
2018-02-25 18:27:10 -07:00
Sam Edwards 9e841800ee CMake: Migrate detection for the physics packages 2018-02-21 02:38:54 -07:00
Sam Edwards 196d780820 CMake: Remove commented-out TODOs regarding unsupported rendering backends 2018-02-20 23:38:39 -07:00
Sam Edwards 17d56279f5 CMake: Migrate FreeType package detection 2018-02-20 19:28:32 -07:00
Sam Edwards 590523ac8c CMake: Rename FindSquish to FindLibSquish
CMake already has a "FindSquish" for finding the GUI testing product.
This minimizes the chances of the wrong module being run on accident.
2018-02-20 18:58:52 -07:00
Sam Edwards 2717c24ffc CMake: Migrate detection of the audio libraries 2018-02-20 18:19:45 -07:00
Sam Edwards 769fd30119 CMake: Remove more HAVE_MESA references 2018-02-20 17:52:33 -07:00
Sam Edwards 3210302caf CMake: Migrate FFmpeg package detection 2018-02-20 17:52:33 -07:00
Sam Edwards 72d668e05a CMake: Migrate zlib package detection 2018-02-20 17:19:21 -07:00
Sam Edwards 0ed64c72ce CMake: Migrate over VRPN detection 2018-02-20 17:02:17 -07:00
Sam Edwards e882088421 CMake: Remove INSTALL_PYTHON_SOURCE option
It's unused and easy to run "make" in between changes anyway
2018-02-20 13:55:28 -07:00
Sam Edwards 75366484b0 CMake: Migrate over Nvidia Cg package detection 2018-02-19 00:05:49 -07:00
Sam Edwards ecfd924f0d CMake: Remove references to unsupported versions of DirectX. 2018-02-18 23:34:02 -07:00
Sam Edwards a9717cf3ab CMake: Migrate detection of libsquish 2018-02-18 21:41:33 -07:00
Sam Edwards 71836f09e3 CMake: Remove references to genPyCode 2018-02-18 20:42:59 -07:00
Sam Edwards 283db1fb7a CMake: Implement detection for FFTW3 2018-02-17 23:35:43 -07:00