Skip to content
This repository has been archived by the owner on Dec 21, 2023. It is now read-only.

[WIP] New build system. #2877

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

[WIP] New build system. #2877

wants to merge 4 commits into from

Conversation

hoytak
Copy link
Collaborator

@hoytak hoytak commented Dec 24, 2019

Rearchitecture of the the build system. A vast simplification.

Changes

  • ./configure can produce an XCode project of the Turi source code.
  • deps/ can be compiled and installed out of the regular build process. Helpful for the XCode project.
  • All packages in src/external/ and src/visualization compile into static libraries.
  • The rest of the code base compiles into a single shared library. This means that most everything occurs in one single CMakeLists.txt file using standard cmake commands.
  • All headers are installed into targets/include when make install is called. The main library is installed into targets/lib.
  • The code definitions that reflect compiler oddities (e.g. is std::hash<int128_t> defined) are dumped into a single header file, src/turi_common.h, at configure time. All source files and headers now include this file first. This allows other programs to link against this library / headers reliably.
  • The python part of TuriCreate now builds through the standard setup.py method. Cython / pybind11 extensions are compiled and packaged using the standard extensions mechanisms and linking against the installed Turi headers.

WIP TODO: The python installation, deployment building.

To review: Essentially it's all in the root CMakeLists.txt file, with some changes to ./configure. Just focus on those two.

echo " --target-dir, -t The target directory to install artifact to."
echo " default: `pwd`/targets."
echo
echo " --release Build in release mode."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It doesn't look like debug or release is actually getting used any where.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default is release. Just add --debug should be fine.

deps/src/libxml2-2.9.1/doc/xmllint.html Outdated Show resolved Hide resolved
deps/src/libxml2-2.9.1/doc/html/libxml-xlink.html Outdated Show resolved Hide resolved
deps/src/libxml2-2.9.1/doc/html/libxml-valid.html Outdated Show resolved Hide resolved
deps/src/libxml2-2.9.1/doc/xmllint.xml Outdated Show resolved Hide resolved
Rearchitecture of the the build system.  A vast simplification.

Changes
- ./configure can produce an XCode project of the Turi source code.
- deps/ can be compiled and installed out of the regular build process.
  Helpful for the XCode project.
- All packages in src/external/ and src/visualization compile into static
  libraries.
- The rest of the code base compiles into a single shared library.  This
  means that most everything occurs in one single CMakeLists.txt file
  using standard cmake commands.
- All headers are installed into targets/include when `make install` is
  called.  The main library is installed into targets/lib.
- The code definitions that reflect compiler oddities (e.g.
  is std::hash<int128_t> defined) are dumped into a single header file,
  src/turi_common.h.  All source files and headers include this file
  first.  This allows other programs to link against this library /
  headers reliably.
- The python part of TuriCreate now builds through the standard
  setup.py method. Cython / pybind11 extensions are compiled and
  packaged using the standard extensions mechanisms and linking against
  the installed Turi headers.

WIP TODO: the python installation, deployment.
cmake/CompilerOddities.cmake Show resolved Hide resolved
src/external/google/protobuf/CMakeLists.txt Show resolved Hide resolved
configure Show resolved Hide resolved
echo " --target-dir, -t The target directory to install artifact to."
echo " default: `pwd`/targets."
echo
echo " --release Build in release mode."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by default is release. Just add --debug should be fine.

@@ -0,0 +1,112 @@
#!/bin/bash -e
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this file intended to be used interactively? like, configure?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eh, this one seem deprecated. scripts/make_wheel.sh is better I think? Not sure.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one uses make_wheel.sh. I don't know if this is just for the manual interactive build.

@guihao-liang
Copy link
Collaborator

forked in #3065.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants