Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change dartpy install command to make install-dartpy #1503

Merged
merged 2 commits into from
Sep 21, 2020
Merged

Conversation

jslee02
Copy link
Member

@jslee02 jslee02 commented Sep 20, 2020

Previously, DART provided two build modes, which is controlled by DART_BUILD_DARTPY: (1) build for the C++ package (as either shared or static libraries) or (2) build for the Python package (i.e. dartpy) enforcing to build the C++ libraries as static libraries. When installing the package, (1) installs the C++ headers and shared/static libraries while (b) only the binding module (i.e., dartpy.so). So we had to configure and build the package to build for both the C++ package and Python package.

However, there is a use case that requires to build dartpy against the shared libraries or/and build both the C++ and Python libraries without reconfiguring the package. This PR (i) removes the enforcement of static library build for dartpy and (ii) allows us to build dartpy without reconfiguring. For (ii), we still need to set DART_BUILD_DARTPY as ON though.

In short, here is the old behavior:

cmake .. -DDART_BUILD_DARTPY=OFF -DBUILD_SHARED_LIBS=ON   # to build as C++ package
make && make install                                      # build the shared libraries (`libdart.so`) and install them with the C++ headers

cmake .. -DDART_BUILD_DARTPY=OFF -DBUILD_SHARED_LIBS=OFF  # to build as C++ package
make && make install                                      # build the shared libraries (`libdart.a`) and install them with the C++ headers

rm -rf *                          # clean up the build directory

cmake .. -DDART_BUILD_DARTPY=ON   # to build as Python package
make dartpy                       # build the static libraries (`libdart.a`) and Python binding (`dartpy.so`)
                                  # BUILD_SHARED_LIBS is ignored
make install                      # install only `dartpy.so`

and the following is the new behavior:

cmake .. -DDART_BUILD_DARTPY=ON -DBUILD_SHARED_LIBS=ON
make && make install                # build the shared libraries (`libdart.so`) and install them with the C++ headers
make dartpy && make install-dartpy  # build the Python binding (`dartpy.so`) against the shared libraries (the shared library should be installed)

cmake .. -DDART_BUILD_DARTPY=ON -DBUILD_SHARED_LIBS=OFF
make && make install                # build the shared libraries (`libdart.so`) and install them with the C++ headers
make dartpy && make install-dartpy  # build the Python binding (`dartpy.so`) against the static libraries

cmake .. -DDART_BUILD_DARTPY=OFF
make && make install                # build the shared libraries (`libdart.so`) and install them with the C++ headers
make dartpy && make install-dartpy  # no such targets

Before creating a pull request

  • Document new methods and classes

Before merging a pull request

  • Set version target by selecting a milestone on the right side
  • Summarize this change in CHANGELOG.md

@jslee02 jslee02 added this to the DART 6.10.0 milestone Sep 20, 2020
@jslee02 jslee02 changed the title Create a dedicated target to install dartpy Changed dartpy install command to make install-dartpy Sep 21, 2020
@jslee02 jslee02 changed the title Changed dartpy install command to make install-dartpy Change dartpy install command to make install-dartpy Sep 21, 2020
@jslee02 jslee02 marked this pull request as ready for review September 21, 2020 04:31
@codecov
Copy link

codecov bot commented Sep 21, 2020

Codecov Report

Merging #1503 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1503   +/-   ##
=======================================
  Coverage   58.17%   58.17%           
=======================================
  Files         414      414           
  Lines       30008    30008           
=======================================
  Hits        17456    17456           
  Misses      12552    12552           

@jslee02 jslee02 merged commit 185fbc2 into master Sep 21, 2020
@jslee02 jslee02 deleted the dartpy_install_v3 branch September 21, 2020 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant