1. 17 Aug, 2017 2 commits
  2. 14 Aug, 2017 1 commit
    • Jason Rhinelander's avatar
      Compile with hidden visibility always; set via cmake property rather than compiler flag · 97aa54fe
      Jason Rhinelander authored
      This updates the compilation to always apply hidden visibility to
      resolve the issues with default visibility causing problems under debug
      compilations.  Moreover using the cmake property makes it easier for a
      caller to override if absolutely needed for some reason.
      
      For `pybind11_add_module` we use cmake to set the property; for the
      targets, we append to compilation option to non-MSVC compilers.
      97aa54fe
  3. 07 Aug, 2017 2 commits
    • Dean Moldovan's avatar
      Add test for custom CMake export group · 3dde6ddc
      Dean Moldovan authored
      3dde6ddc
    • Ben Boeckel's avatar
      CMake: support a custom export group (#970) · 017a747d
      Ben Boeckel authored
      When Pybind11 is used via `add_subdirectory`, when targets are installed
      from the parent project, CMake wants all of the dependencies built by
      the project in the same export set. Projects may now set
      `PYBIND11_EXPORT_NAME` to have Pybind11 put it targets into the
      project's export set. If so, do not install Pybind11's export file.
      017a747d
  4. 28 May, 2017 2 commits
  5. 07 May, 2017 1 commit
  6. 13 Apr, 2017 1 commit
    • Jason Rhinelander's avatar
      Move buffer_info to its own header · dbb4c5b5
      Jason Rhinelander authored
      Upcoming changes to buffer_info make it need some things declared in
      common.h; it also feels a bit misplaced in common.h (which is arguably
      too large already), so move it out.  (Separating this and the subsequent
      changes into separate commits to make the changes easier to distinguish
      from the move.)
      dbb4c5b5
  7. 24 Mar, 2017 1 commit
    • Ghislain Antony Vaillant's avatar
      Arch-indep CMake packaging (#764) · 5b503764
      Ghislain Antony Vaillant authored
      * Arch-indep CMake packaging
      
      Since pybind11 is a header-only library, the CMake packaging does not have to carry any architecture specific checks. Without this patch, the detection of pybind11 will fail on 32-bit architectures if the project was built on a 64-bit machine and vice-versa. This fix is similar to what is applied to `Eigen` and other header-only C++ libraries.
      5b503764
  8. 24 Feb, 2017 1 commit
    • Jason Rhinelander's avatar
      Independent tests (#665) · 60d0e0db
      Jason Rhinelander authored
      * Make tests buildable independently
      
      This makes "tests" buildable as a separate project that uses
      find_package(pybind11 CONFIG) when invoked independently.
      
      This also moves the WERROR option into tests/CMakeLists.txt, as that's
      the only place it is used.
      
      * Use Eigen 3.3.1's cmake target, if available
      
      This changes the eigen finding code to attempt to use Eigen's
      system-installed Eigen3Config first.  In Eigen 3.3.1, it exports a cmake
      Eigen3::Eigen target to get dependencies from (rather than setting the
      include path directly).
      
      If it fails, we fall back to the trying to load allowing modules (i.e.
      allowing our tools/FindEigen3.cmake).  If we either fallback, or the
      eigen version is older than 3.3.1 (or , we still set the include
      directory manually; otherwise, for CONFIG + new Eigen, we get it via
      the target.
      
      This is also needed to allow 'tests' to be built independently, when
      the find_package(Eigen3) is going to find via the system-installed
      Eigen3Config.cmake.
      
      * Add a install-then-build test, using clang on linux
      
      This tests that `make install` to the actual system, followed by a build
      of the tests (without the main pybind11 repository available) works as
      expected.
      
      To also expand the testing variety a bit, it also builds using
      clang-3.9 instead of gcc.
      
      * Don't try loading Eigen3Config in cmake < 3.0
      
      It could FATAL_ERROR as the newer cmake includes a cmake 3.0 required
      line.
      
      If doing an independent, out-of-tree "tests" build, the regular
      find_package(Eigen3) is likely to fail with the same error, but I think
      we can just let that be: if you want a recent Eigen with proper cmake
      loading support *and* want to do an independent tests build, you'll
      need at least cmake 3.0.
      60d0e0db
  9. 23 Feb, 2017 1 commit
    • Dean Moldovan's avatar
      Reimplement static properties by extending PyProperty_Type · c91f8bd6
      Dean Moldovan authored
      Instead of creating a new unique metaclass for each type, the builtin
      `property` type is subclassed to support static properties. The new
      setter/getters always pass types instead of instances in their `self`
      argument. A metaclass is still required to support this behavior, but
      it doesn't store any data anymore, so a new one doesn't need to be
      created for each class. There is now only one common metaclass which
      is shared by all pybind11 types.
      c91f8bd6
  10. 14 Feb, 2017 1 commit
  11. 08 Feb, 2017 1 commit
    • Matthew Woehlke's avatar
      Avoid C-style const casts (#659) · e15fa9f9
      Matthew Woehlke authored
      * Avoid C-style const casts
      
      Replace C-style casts that discard `const` with `const_cast` (and, where
      necessary, `reinterpret_cast` as well).
      
      * Warn about C-style const-discarding casts
      
      Change pybind11_enable_warnings to also enable `-Wcast-qual` (warn if a
      C-style cast discards `const`) by default. The previous commit should
      have gotten rid of all of these (at least, all the ones that tripped in
      my build, which included the tests), and this should discourage more
      from newly appearing.
      e15fa9f9
  12. 26 Dec, 2016 1 commit
    • Jason Rhinelander's avatar
      Avoid CMP0048 warning (#570) · a3fec901
      Jason Rhinelander authored
      Fixes #567.
      
      If pybind's CMakeLists gets loaded via an include_directory from another
      CMakeLists with a higher minimum version (e.g. 3.0), the project()
      command without a version produces a CMP0048 warning.
      
      This commit explicitly requests the new behaviour if the policy exists,
      as it won't cause problems (we set VERSION later).
      a3fec901
  13. 19 Dec, 2016 2 commits
    • Dean Moldovan's avatar
      Rename target from pybind11::pybind11 to pybind11::module · 71e8a796
      Dean Moldovan authored
      Makes room for an eventual pybind11::embedded target.
      71e8a796
    • Dean Moldovan's avatar
      Make sure add_subdirectory and find_package behave identically · b0f3885c
      Dean Moldovan authored
      Add a BUILD_INTERFACE and a pybind11::pybind11 alias for the interface
      library to match the installed target.
      
      Add new cmake tests for add_subdirectory and consolidates the
      .cpp and .py files needed for the cmake build tests:
      
      Before:
      tests
      |-- test_installed_module
      |   |-- CMakeLists.txt
      |   |-- main.cpp
      |   \-- test.py
      \-- test_installed_target
          |-- CMakeLists.txt
          |-- main.cpp
          \-- test.py
      
      After:
      tests
      \-- test_cmake_build
          |-- installed_module/CMakeLists.txt
          |-- installed_target/CMakeLists.txt
          |-- subdirectory_module/CMakeLists.txt
          |-- subdirectory_target/CMakeLists.txt
          |-- main.cpp
          \-- test.py
      b0f3885c
  14. 13 Dec, 2016 3 commits
  15. 15 Nov, 2016 1 commit
  16. 09 Oct, 2016 2 commits
  17. 29 Sep, 2016 1 commit
  18. 13 Sep, 2016 1 commit
  19. 26 Aug, 2016 1 commit
    • Dean Moldovan's avatar
      Add barebones build to Travis CI · b62a896f
      Dean Moldovan authored
      This build makes sure everything still works without optional
      dependencies (numpy/scipy/eigen) and also tests the automatic
      discovery functions in CMake (Python version, C++ standard).
      
      [skip appveyor]
      b62a896f
  20. 19 Aug, 2016 1 commit
    • Dean Moldovan's avatar
      Port tests to pytest · a0c1ccf0
      Dean Moldovan authored
      Use simple asserts and pytest's powerful introspection to make testing
      simpler. This merges the old .py/.ref file pairs into simple .py files
      where the expected values are right next to the code being tested.
      
      This commit does not touch the C++ part of the code and replicates the
      Python tests exactly like the old .ref-file-based approach.
      a0c1ccf0
  21. 15 Aug, 2016 1 commit
  22. 02 Aug, 2016 1 commit
  23. 01 Aug, 2016 1 commit
  24. 02 Jun, 2016 1 commit
  25. 29 May, 2016 2 commits
  26. 28 May, 2016 2 commits
  27. 27 May, 2016 1 commit
  28. 26 May, 2016 2 commits
  29. 25 May, 2016 1 commit
  30. 22 May, 2016 1 commit