Commit Graph

14 Commits

Author SHA1 Message Date
irengrig 8ef43c6f3c
make cmake and ninja build rules be available from util repository (#72) 2018-08-30 17:31:02 +02:00
irengrig a46bef4945
make framework function work on apple: (#63)
- initialize apple tools on workspace level properly using universal install_ws_dependency() function
- pass proper environment variables to the shell script action
- pass proper hidden attributes to framework function rules in case of osx os
- also, clean up WORKSPACE file putting example repositories into a separate file
- correct: repositories needed by framework function itself should be defined in the same single function in workspace_definitions.bzl
- unfortunately, it is not possible to move android initialization anywhere from WORKSPACE file
2018-08-27 14:56:16 +02:00
irengrig b382ac435e
add pcl library targets - not ready yet (#59)
more dependencies need to be provided
2018-08-22 22:30:29 +02:00
irengrig d4880f8fac
build cmake if it is missing (should be configurable) (#57) 2018-08-22 22:06:37 +02:00
irengrig cefeeaf82d
add nghttp2 example with test (#51) 2018-08-22 10:22:56 +02:00
irengrig 7865d29bb4
use Skylark definition of http_archive (#50) 2018-08-22 10:16:44 +02:00
irengrig 04791568c5
Add cares build (#45) 2018-08-20 22:45:35 +02:00
irengrig eb8f2a461c
Add ninja tool as the separate rule + version test (#44) 2018-08-20 22:24:42 +02:00
irengrig 8590cb0da8
Add building example with pybind11 (#43)
- demonstrates loading CMake scripts from externally built library for use in the dependent external library CMake build
2018-08-20 21:41:16 +02:00
irengrig cfa5c56f23
Add build libgd example, add it to tests (#42)
Unfortunately, many additional variables needed to make CMake find libraries.
2018-08-20 21:22:45 +02:00
irengrig be719ee2fc
correct workspace_definitions.bzl, do not include self (#21)
* correct workspace_definitions.bzl, do not include self

* use workspace definitions from WORKSPACE
2018-08-13 15:02:25 +02:00
irengrig 067d4be22e
use tools paths and flags from the toolchain (#7)
* take tools paths and flags from the toolchain

* correct toolchain data extraction, correct cmake flags and environment

* framework script: export variables intended to be used in config script

config script can create child processes which could use this variables

* cmake: prepend relative [to the execroot] paths with "$EXT_BUILD_ROOT/"

unfortunately, CMake does not understand relative paths
(sometimes it runs tests for the passed compiler and for that
concatenates the passed relative path to some tmp directory created for test)

we replace only paths starting with external/ and <top-package-name>/,
so we are quite fine to not make a mistake with replacing some not related to paths text;
the targets for replacement take very different form (judging by examining
toolchain definitions), for instance "-Lexternal/something"

* test data for cross compilation for android and with --crosstool_top

data files taken from bazel examples and bazel test data;

NB one of the interesting things is that we need to specify tools dependency on android sdk and ndk, so that cmake_external shell script have access to these tools

* remove cross compilation example with CROSSTOOL for now

* add very simple CMake library (test data)

* rename target to indicate it is not a test, but example

* adjust android example:

rename the target to indicate it is not a test but example,
add android ndk sources as additional tool for cmake target,
(otherwise it is not available in sandbox)
use more simple cmake-built library

* corrections to the framework & cmake:

- correct search for the root directory of the filegroup (when it is not under external)
- it was a mistake to specify shared library linker, specify CMAKE_AR instead
- unfortunately, I have not discovered how to modify CMake behaviour to pass the custom static flags (rcsD) before "-qc <target>" to the ar linker; option from documentation does not work. To be investigated. For now, do not pass the static cxx linker options, taken from Bazel toolchain.
2018-08-06 15:23:18 +02:00
irengrig 0fd3a22fbc
external build framework function and cmake_external rule (#4)
* external build framework macro and cmake_external rule

* declare deps headers as inputs as well; correct sed expression

* use symlinking instead of copying, filter duplicates

* correct detect root

* corrections for copying tools and include directories

* correct review comments

* provide a way to pass modified attributes to the framework function

create a function that creates a dict from ctx.attr,
replaces/adds values and creates a resulting struct;
have mandatory attributes as mandatory parameters to this function

* correct review comments

* correct detect_root

* introduce parameter for passing user defined link options

* add documentation, define default static library to be built

* correct/improve documentation

* more correct gathering headers and include directories from dependencies

* correct review comments

* correct passing transitive link options
2018-07-30 12:56:09 +02:00
Carmi Grushko 5fda9e82bd
Add code and examples (#1) 2018-04-26 13:52:06 -04:00