Commit Graph

6 Commits

Author SHA1 Message Date
UebelAndre 175b29c6f7
Renamed BUILD files to BUILD.bazel (#540)
* Renamed BUILD files to BUILD.bazel

* Ran Buildifier
2021-03-03 10:08:03 -08:00
UebelAndre 14520d220f
Made buildifier checks more aggressive (#485)
* Made buildifier checks more aggressive

* Ran buildifier to fix all warnings

* Added sorting to cmake script generation and updated tests
2021-02-02 20:09:33 +00:00
UebelAndre 08e8c6c93d
Moved example dependencies into loadable bzl files (#467)
* Sorted dependencies

* Added rules_android repository to satisfy buildifier defects

* Added rules_cc repository to satisfy buildifier defects

* Ran Buildifier
2021-01-25 08:04:52 -08:00
Laurent Le Brun c292369597
Fix Buildifier warnings (#395)
* Run buildifier formatter

* Fix buildifier warnings

Ran: `buildifier --lint=fix -r .`
2020-05-04 19:50:45 +02:00
Michal Rostecki 8ccd83504b Minor fixes in example files (#264)
* examples: cmake_crosstool: Remove executable bit from BUILD

There is no reason for BUILD file to be an executable.

Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>

* examples: Add shebang to the bash script

print_bazel_version.sh is a bash script, but it did not contain a
shebang.

Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
2019-06-25 18:38:25 +02:00
irengrig 9a261f7993
Crosstool example + fixes (#174)
* Add crosstool example; does not work with cmake rule yet

the code is taken from Bazel test data (bazel_toolchain_test_data)

* Make crosstool compilation of cmake_external + cc_binary work

To build example, cd examples/cmake_crosstool bazel build //:libhello_test

Changes:
1) Initially suggested in #124: put $EXT_BUILD_ROOT on path, so that relative paths can be resolved by CMake
2) Toolchain tools are references as relative paths, and they themselves refer to external repository with external/ prefix.
This will not work with CMake, as CMake also perform compiler tests and the build is performed in some temp directory.
We need to convert to absolute paths.
I did a trick with checking of $EXT_BUILD_ROOT is defined and then using it as a prefix.
3) I had to change the visibility of the cc-compiler-k8 toolchain to public
4) For CMake crosstool file, CMAKE_C_COMPILER, CMAKE_CXX_COMPILER, CMAKE_AR need to be absolute, so in cases when they are relative and not under external directory, force paths conversion
2018-12-06 18:14:00 +01:00