reason: some target call python3 to generate some headers,
if PYTHON_EXECUTABLE changed, headers will be invalid, which
will lead to rebuild most of obj, because this headers will
be include in most cpp/c, what`s more, this target do not depends
python3 version(python API) the output is same when use python3.5
or python3.x so change use PYTHON_EXECUTABLE to
PYTHON3_EXECUTABLE_WITHOUT_VERSION, when
PYTHON_EXECUTABLE/PYTHON_LIBRARY/PYTHON_INCLUDE_DIR changed,
can reuse the build obj
GitOrigin-RevId: c2ffe3ead3
Also, upgrade to CMake 3.13.
The commit also contains significant refactors, as otherwise it is not
possible to properly export target `megengine` to
MegEngine-targets.cmake:
1. Optionally use system provided Flatbuffers.
2. Optionally use system provided MKL-DNN (Tested with Debian).
3. Refactor megbrain and megdnn targets into object libraries.
4. Set different path in BUILD_INTERFACE and INSTALL_INTERFACE of
various target_include_directories.
5. Specify PUBLIC/PRIVATE on various target_link_libraries.
GitOrigin-RevId: df118a879e
host build and cross build
now cmake status:
a: host build
1: windows build -- ok
2: linux build -- ok
3: macos build -- ok
b: cross build
1: windows cross build arm-android -- ok
2: windows cross build arm-linux -- ok
3: linux cross build arm-android -- ok
4: linux cross build arm-linux -- ok
5: macos cross build arm-android -- ok
6: macos cross build arm-linux -- ok
7: macos cross build ios -- ok
GitOrigin-RevId: f7f376fe8c