Skip to content

Commit c68ce0d

Browse files
committed
Add another platform detectable with get_platform_str
1 parent 75933ff commit c68ce0d

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

tests/testing_utils.h

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,19 @@ T adjust_tolerance(T tol, T factor = 4) {
138138
}
139139

140140
std::string get_platform_str() {
141-
/* This is going to get a string "<compiler>-<os>-<architecture>" using conditional
142-
* compilation, but for now we're just stubbing things out. */
141+
/* This should use Boost.Predef
142+
* https://www.boost.org/doc/libs/1_87_0/libs/predef/doc/index.html
143+
* (Boost isn't a dependency yet but this is planned)
144+
* and we should have tolerance files for a wider variety of
145+
* compiler/os/architecture combos, including for specific compiler
146+
* versions. For now, there are these two platforms with tolerance
147+
* files and we use the former with Clang on Mac and the later
148+
* otherwise. */
149+
#if defined(__clang__) && defined(__APPLE__)
150+
return "clang-darwin-aarch64";
151+
#else
143152
return "gcc-linux-x86_64";
153+
#endif
144154
}
145155

146156
} // namespace

0 commit comments

Comments
 (0)