It's not the nicest way, but I use constants to force compiler errors, so only the targets for this OS build when I hit "Build All".
For example, put something like this in your code:
Code:
CompilerSelect (#PB_Compiler_OS)
CompilerCase (#PB_OS_Windows)
#WindowsBuild = 1
#MacBuild = 0
CompilerCase (#PB_OS_MacOS)
#WindowsBuild = 0
#MacBuild = 1
CompilerEndSelect
Then for each target, go to Compiler Options > Constants > Custom Constants and add
Code:
#WindowsBuild = 1
or similar for each OS.
Then when you Build All, the targets for other OS'es will error out.
EDIT: Simpler yet, just use this, then you can define your own messages instead of messages about constant errors.
Code:
CompilerIf (Defined(WindowsBuild, #PB_Constant) And (#PB_Compiler_OS <> #PB_OS_Windows))
CompilerError "Windows build disabled on this OS"
CompilerElseIf (Defined(MacBuild, #PB_Constant) And (#PB_Compiler_OS <> #PB_OS_MacOS))
CompilerError "Mac build disabled on this OS"
CompilerEndIf