Commit Graph

27 Commits

Author SHA1 Message Date
jheaff1 cfe19aae68
Add ability to specify DLL dir (#939) 2022-07-27 16:46:15 +00:00
UebelAndre 32e222aeff
Enable more examples tests on windows (#718)
* Enable examples tests on windows

* Fixed windows absolute paths being treated as relative.

* Escape windows backslashes for sed replacement

* Improve `//cmake_hello_world_lib/static:libhello` example
2021-07-14 09:37:35 -07:00
UebelAndre e4399415b8
Added "targets" API (#556)
* Added `targets` API to all existing build rules

* Updated examples

* Restore making the make toolchain always available.

* Add support for generator cmake parsing and setting CMAKE_MAKE_PROGRAM

* Cleaned up duplicate generator arguments

* Fixed cmake tests

* Updated docs

* Addressed PR feedback

* Fixed missing and incorrect generators

* Fixed `generate_args` name
2021-03-17 13:42:44 +00:00
UebelAndre edbfa3bfa9
Restructured rules to match architecture (#555)
* Restructured rules to match architecture

* Added exports of all symbols in the deprecated location for legacy support

* Updated examples
2021-03-12 16:54:14 +00:00
UebelAndre 0e0d9a26f2
Prefixed all output attributes with `out_` to make their use clearer (#538)
* Prefixed all output attributes with `out_` to make their use clearer

* Updated examples
2021-03-11 17:14:00 +00:00
UebelAndre f307e857f6
Renamed `cmake_external` to `cmake` (#539)
* Renamed `cmake_external` rule to `cmake`

* Updated examples
2021-03-09 10:55:01 -08:00
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 e285764b78
Restructed examples and enabled more testing (#515)
* Reorganized examples

* Documentation

* Third party
2021-02-26 20:21:13 +00:00
James Sharpe 4520018bc2
Make generate_crosstool=True the default for cmake. (#523)
This was previously setting `CMAKE_SYSTEM_NAME` in the generated
toolchain file but setting this explicitly enables `CMAKE_CROSSCOMPILING`
(see https://cmake.org/cmake/help/v3.19/variable/CMAKE_CROSSCOMPILING.html#variable:CMAKE_CROSSCOMPILING)
which breaks projects that use `TRY_RUN`
2021-02-24 14:45:36 -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 9b6a8f675c
Add tests for checking the minimum supported version to CI (#469) 2021-01-25 19:07:05 +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
UebelAndre 76870e532d
Updated uses of `@bazel_tools//src/conditions` to `@platforms//` (#465)
Co-authored-by: James Sharpe <james.sharpe@zenotech.com>
2021-01-25 08:01:46 -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
irengrig 8b477ca9cb
Fix Visual Studio version used in examples for #368 (#370) 2020-02-13 10:26:42 +01:00
László Csomor 9cfeff53b5 Windows: tests now work with native test wrapper (#263)
Windows: tests now work with native test wrapper

See https://github.com/bazelbuild/bazel/issues/6622
2019-05-17 11:52:28 +02:00
irengrig 5511d9e1fe
Launch at least some Windows tests on CI (#201)
All custom tools (MS Visual Studio) information goes into
windows_commands.bzl
2019-01-18 18:43:37 +01:00
irengrig 006d5f6f8b
Reorganize examples to be in a separate workspace (#188)
* Reorganize examples to be in a separate workspace

This will help to define native tools toolchains for examples

* Remove examples-related part from main WORKSPACE file

* Copy .bazelrc to the examples workspace.

* correction for Bazel HEAD compatibility

* Changes to run nested workspace tests from main workspace
2019-01-07 10:31:27 +01:00
irengrig 13419882d6
Put each of binary files into OutputGroupInfo under its name. (#148)
Add CMake test for building a binary and using that binary in a test.
2018-10-25 16:28:43 +02:00
irengrig c28320b89d
rename hello world examples (#146) 2018-10-25 12:56:42 +02:00
irengrig b3552bfef8
Fix dynamic libraries (#141)
* move cmake_hello example with static library into a subdirectory

* Fix #139; correct arguments to create_library_to_link

However, the test (which should link the externally built shared library to the calling .c file) fails with assertion that the .so file is in a "wrong" directory, so I am providing it here for additional work [possibly] on Bazel side; and I do not include it into the tests list

* As cc_common.create_library_to_link is now broken for shared libraries,
use the "old" variant cc_common.create_symlink_library_to_link.

As it will later be removed (and create_library_to_link fixed),
it is safe to check for the existence of create_symlink_library_to_link and call it.

Now the test with shared library built by CMake runs, so add it ot the [non-Windows, for now] suite.

* Adapt building shared library with cmake test for mac

* increment version

* Add comment on CMAKE_MACOSX_RPATH
2018-10-23 16:49:20 +02:00
irengrig 913f437994
Windows tests: each library should be in a separate directory (#90) 2018-09-12 15:37:12 +02:00
irengrig 169cdca87b
More corrections for building on Windows (#89)
* Get cc_toolchain environment variables also for linking

* Correct environment setup

* Add Windows tests for Ninja and NMake generators
2018-09-12 15:20:31 +02:00
irengrig 86ea154cd9
More windows tests corrections (#87)
* Use rlocation for artifact paths in the test shell scripts

* CMake text tests: split into lines to be good with line separators
2018-09-11 13:55:25 +02:00
irengrig 10ab431c38
Modify hello world example with CMake to build on Windows (#86)
- with MSBuild generator (the path to it should be on the PATH)
- use CMake crosstool file
2018-09-11 13:07:11 +02:00
irengrig af0871023c
updte example to show out_include_dir usage (#61) 2018-08-24 11:28:34 +02:00
irengrig 6c11ff4482
move examples into examples directory (#14) 2018-08-13 11:55:05 +02:00