--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_HTKNhi%2Bz4XMJ7FOPt5eny8jXxSmFw_b6w4aV6OsaFLmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Currently, there's nothing you can do in the WORKSPACE, but you could define freeimage_linux and freeimage_windows, and use config_setting and select to choose between them in your BUILD files.In the near future, I'm working on implementing https://github.com/bazelbuild/bazel/issues/2219, which will get us closer to what you want (but not all the way there).
On Thu, May 4, 2017 at 11:00 AM Diego <jose....@gmail.com> wrote:
To fit some of my use cases for multiplatform, I wanted to do something like this in my WORKSPACE:if linux thenbind(name = "freeimage",actual = "@linux_freeimage//:freeimage",)else if win32 thenbind(name = "freeimage",actual = "@win32_freeimage//:freeimage",)end ifIs there a way to detect the current OS/platform and to do such conditional binding?Thanks!--https://github.com/thinlizzy/ - C++11 and C++14 open source wrappers and libraries for various purposes (XML, image, webserver... and even a MTG implementation)
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_HTKNhi%2Bz4XMJ7FOPt5eny8jXxSmFw_b6w4aV6OsaFLmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_Gb-7_KmysDcEDCeT2rDrYA%3D1XdV31C%2BQfRWG0NXbVYYw%40mail.gmail.com.
hello? :)
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_HTKNhi%2Bz4XMJ7FOPt5eny8jXxSmFw_b6w4aV6OsaFLmA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
--https://github.com/thinlizzy/ - C++11 and C++14 open source wrappers and libraries for various purposes (XML, image, webserver... and even a MTG implementation)
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_Gb-7_KmysDcEDCeT2rDrYA%3D1XdV31C%2BQfRWG0NXbVYYw%40mail.gmail.com.
--https://github.com/thinlizzy/ - C++11 and C++14 open source wrappers and libraries for various purposes (XML, image, webserver... and even a MTG implementation)
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_GRxtcH6UPegtik8_GN%3DKUmg1fqq7%2BWfOW39SJ_GMXUdA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
ressuscitating this thread, I tried to do something in Bazel for Windows, but the config_setting did not detect the windows crosstool:config_setting(name = "windows",values = {"crosstool_top": "//crosstools/windows",},)cc_library(name = "die-tk",deps = select({":windows": [":die-tk-base",":die-tk-win32"],"//conditions:default": [":die-tk-base",":die-tk-linux"],}),)I've pasted the config_setting example from https://docs.bazel.build/versions/master/be/functions.html#select_example . Is that example accurate and/or did I miss something?
Thanks!
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_FzbtDHn%3Ded0XeQwPHKeqf_rdomi8jeGZP4GKNrF-2Hbg%40mail.gmail.com.
On Sun, Sep 3, 2017 at 9:52 PM, Diego <jose....@gmail.com> wrote:ressuscitating this thread, I tried to do something in Bazel for Windows, but the config_setting did not detect the windows crosstool:config_setting(name = "windows",values = {"crosstool_top": "//crosstools/windows",},)cc_library(name = "die-tk",deps = select({":windows": [":die-tk-base",":die-tk-win32"],"//conditions:default": [":die-tk-base",":die-tk-linux"],}),)I've pasted the config_setting example from https://docs.bazel.build/versions/master/be/functions.html#select_example . Is that example accurate and/or did I miss something?This is not a good example - sorry! Here is how you detect Windows:config_setting(name = "windows_msvc",values = {"cpu": "x64_windows_msvc"},}
Thanks!
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_FCgOFF5H2C%2B-E94U5Bx4z0V5TecFBi6RvSR1QZuV4m_Q%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/CAA5%3Di_HDiSC1mxLkgaRYmHY8PQ1X3UWo1JwBZguuDto1H%2B9%3DDQ%40mail.gmail.com.