2
0
Fork 0
mirror of https://github.com/bazel-contrib/rules_foreign_cc synced 2024-11-27 02:43:28 +00:00
Commit graph

298 commits

Author SHA1 Message Date
irengrig 0d5f5c2da7
Replace cc_common.create_symlink_library_to_link calls (#117)
... with cc_common.create_library_to_link
2018-10-02 12:39:58 +02:00
irengrig c7d13b34e5
Give libgd configure hints with directory paths (#111) 2018-09-21 11:56:24 +02:00
irengrig 97d6cfee0c
Print version information by the script (#110) 2018-09-21 11:48:39 +02:00
irengrig e1c3ce3ef5
Adjust configure-make: also replace absolute paths in -config files (#109)
+ assert libz, freetype, libpng to be found by configure for libgd
2018-09-21 10:57:02 +02:00
irengrig 29f66a98cd
Correct bugs and make configure-make work on MacOS (#108)
* correct shell utilities: params differ on mac, remove debug print,

+ correct a bug on windows

* Simplify the example, libz is also needed by libgd

* Framework function: simplify code gathering deps, collect_libs public

* Correct configure-make: get all lib files, also built with bazel

and pass them in LDFLAGS; correct the linking paths (add prefix)

* Make maximum line length for shell = 80

* Improve comments to the _InputFiles provider
2018-09-20 20:19:38 +02:00
irengrig aba303eb2a
Make configure-make examples into tests and include into the test list (#107) 2018-09-18 13:44:33 +02:00
irengrig 7d3bdc7e95
Add configure_make rule with zlib, freetype, libpng, libgd examples (#106)
+ fix replacement of the absolute paths in linked directories,
replace only in .pc files for speed
2018-09-18 13:20:58 +02:00
irengrig d4c55bb51e
Refactor framework function: configure_script to be a callback (#104)
reason: configure-make should reuse the linking and compilation structures created by framework function
2018-09-17 14:27:35 +02:00
irengrig 7f3663016d
Update README file with information about usage on Windows (#103) 2018-09-17 14:14:34 +02:00
irengrig 4c27a2bb9d
Exclude synthetic tests from Ubuntu 16 on CI (#102)
Their main target is Windows
2018-09-14 15:37:00 +02:00
irengrig ace688c521
Synthetic tests: generate CMake crosstool file only on windows (#101) 2018-09-14 12:45:42 +02:00
irengrig 94d95ec85b
Make deps directory be called differently for each library (#100)
otherwise during test execution too much is accumulated in that same directory,
and CMake gives up after searching in some amount of that subdirectories, and tests blink
2018-09-14 11:56:53 +02:00
irengrig af3f3e0618
Mac OS: Pass environment variables to run_shell, not in the script (#99)
for the DEVELOPER_DIRECTORY to be calculated
2018-09-14 11:20:02 +02:00
irengrig fc29335572
Do not convert depset to list for iteration (#98) 2018-09-14 10:40:38 +02:00
irengrig b69aec07b6
Allow synthetic test on Windows (#97) 2018-09-14 10:24:10 +02:00
irengrig 8dca26ac29
Pass the value of --compilation_mode dbg to the rule and to CMake (#96)
CMAKE_BUILD_TYPE=DEBUG (otherwise RELEASE)
Can be overriden by user passing CMAKE_BUILD_TYPE in cache_entries
2018-09-14 10:18:38 +02:00
irengrig 64de227420
Adapt tests for Windows: set .a library name, use crosstool file (#95)
- On Linux, lib is added to the name
- Use CMake crosstool file (needed for Windows)
2018-09-14 10:10:39 +02:00
irengrig bd65563ae0
Correct copying on Windows: recursive flag (#94) 2018-09-14 10:04:25 +02:00
irengrig 242e932c60
Add CMake synthetic test with two libraries and cc_test (#93) 2018-09-13 14:34:55 +02:00
irengrig bc43624fc4
Fix the order of libraries in out linking info: first the current (#92)
Otherwise linking error about undefined symbol
2018-09-13 14:25:47 +02:00
irengrig 9de19b91fe
Add Windows tests to the list (#91) 2018-09-12 15:41:19 +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 0aab4e65c5
Win changes (#85)
* Allow execution on Windows, use utils_win.sh, copy instead of symlink

* Prepare for execution on Windows: set up environment, convert path

also rename TMPDIR since it can clash with widely used variable
2018-09-11 11:43:13 +02:00
irengrig 3547a24075
Correct dependency on Ninja: do not depend on ninja if it is local (#84)
Also, provide a variable to put into dependencies, empty in case local ninja is installed, or containing the reference to ninja target
2018-09-10 11:54:59 +02:00
irengrig b467afc40f
Correct "use default shell environment" action argument (#83)
We should take the default PATH passed by Bazel, not that from cc_toolchain for Windows, because the PATH under msys2 is different and that is which we need for shell commands
2018-09-10 11:34:43 +02:00
irengrig 06970670ae
Correct checking the shared library to also filter out empty values (#82) 2018-09-10 11:22:39 +02:00
bbarnes52 9949b17fe2 implements pcl cmake_external build rule (#68)
* implements pcl cmake_external build rule

* Improve example with building PCL (Point Cloud Library):

- build boost library and use it as dependency
- add/correct some properties

* implements pcl cmake_external build rule

* Improve example with building PCL (Point Cloud Library):

- build boost library and use it as dependency
- add/correct some properties
2018-09-05 22:24:41 +02:00
irengrig 6f81b6e39e
fix #75 "trying to mutate a frozen object" (#79) 2018-08-31 20:11:12 +02:00
irengrig 3aecf1c664
update readme file and framework rule comments (#78) 2018-08-31 14:23:16 +02:00
irengrig f06338eafd
correct comment indent (#77) 2018-08-31 10:52:53 +02:00
irengrig bbb4bb8059
Merge CMAKE_PREFIX_PATH, passed by user, with $EXT_BUILD_DEPS (#76)
This allows using locally installed libraries to be found by CMake
+ test
2018-08-31 10:50:38 +02:00
irengrig 1b1de96220
Add comments (#74) 2018-08-30 18:32:03 +02:00
irengrig a34694a90a
do not use 'workspace' as top level package name (#73) 2018-08-30 18:08:44 +02:00
irengrig 8ef43c6f3c
make cmake and ninja build rules be available from util repository (#72) 2018-08-30 17:31:02 +02:00
irengrig 595c9b6d4b
correct CMake script test to use cmake path from workspace definition (#71) 2018-08-30 13:50:12 +02:00
irengrig 515c15a392
Add a feature of generating CMake toolchain file and writing tools and flags information there (#70)
* cmake toolchain files support

* extract cmake script consruction code into a separate file

for further testing

* simplify cmake script creation code

* first four tests for CMake script creation functions

* + move_dict_values_test for CMake script creation functions

* + reverse_descriptor_dict_test for CMake script creation functions

* + toolchain_and_user_values_test for CMake script creation functions

* add create_cmake_script_no_toolchain_file_test for CMake script creation

* do not insert executable linker rule option if it uses cxx compiler

since it would be the same as default
add one more test for command line

* add test for cmake script with toolchain file

* add test for cmake script with toolchain file with user values

* propagate information about target into CMake toolchain file
2018-08-30 13:12:51 +02:00
irengrig 86b28882a2
correct work in osx: take environment from cc_common (#67)
apparently, is it possible to just take the needed environment variables from cc_common, and not do any calls to rules_apple or platform-dependent initialization
2018-08-28 13:36:20 +02:00
irengrig 97b339b91e
escape quotes in toolchain flags and variables (#66) 2018-08-28 11:52:10 +02:00
irengrig 9e9a4eec93
cleanup workspace_definitions.bzl (#65) 2018-08-27 15:27:26 +02:00
irengrig 4e57ad01d0
try install cmake on ci (#64) 2018-08-27 14:59:16 +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 ccec08efd1
create repository rule for loading and initializing (#62) 2018-08-27 14:54:04 +02:00
irengrig af0871023c
updte example to show out_include_dir usage (#61) 2018-08-24 11:28:34 +02:00
irengrig ebfaafdc32
do not try to build cmake from sources for now (#60) 2018-08-22 22:58:29 +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 125432bffe
do not build cmake but default (if not CI) (#58) 2018-08-22 22:20:16 +02:00
irengrig d4880f8fac
build cmake if it is missing (should be configurable) (#57) 2018-08-22 22:06:37 +02:00