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".
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