Reputation: 37121
I would like to build a cross-platform cxx_library
with buck. I have different cpp
files for the different platforms. According to the docs, I can handle this using platform_srcs
, which is:
...a list of pairs where the first element is an un-anchored regex (in java.util.regex.Pattern syntax) against which the platform name is matched".
Upvotes: 2
Views: 348
Reputation: 37121
I am using the following:
android.*
iphoneos.*
iphonesimulator*
linux.*
macos.*
windows.*
Don't forget to turn on should_remap_host_platform
in order to avoid 'default'
platform weirdness. In your .buckconfig
:
[cxx]
should_remap_host_platform = true
See: https://github.com/facebook/buck/issues/2073
Upvotes: 1
Reputation: 4682
Android: android
iPhone: iphoneos
iPhone Simulator: iphonesimulator
Linux: Unsure
OSX: Unsure
Windows: ^windows.*
Upvotes: 1