diff options
| author | 2021-06-07 14:12:02 +0100 | |
|---|---|---|
| committer | 2021-06-08 20:07:23 +0100 | |
| commit | ee1d5878c24bd87913b72149fe949fe5d3ae6df3 (patch) | |
| tree | 62bc43bca055c31813e795b499ed0619539e6283 /make/test/compiler_info.cpp | |
| parent | Stop explicitly linking against libstdc++. (diff) | |
Link against libc++fs/libstdc++fs on older compilers.
Diffstat (limited to 'make/test/compiler_info.cpp')
| -rw-r--r-- | make/test/compiler_info.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/make/test/compiler_info.cpp b/make/test/compiler_info.cpp index 3563bddf0..3dfe4a596 100644 --- a/make/test/compiler_info.cpp +++ b/make/test/compiler_info.cpp @@ -27,15 +27,27 @@ # define INSPIRCD_COMPILER_NAME "AppleClang" # else # define INSPIRCD_COMPILER_NAME "Clang" +# if __clang_major__ < 9 +# define INSPIRCD_EXTRA_LDLIBS "-lc++fs" +# endif # endif # define INSPIRCD_COMPILER_VERSION __clang_major__ << '.' << __clang_minor__ #elif defined __GNUC__ # define INSPIRCD_COMPILER_NAME "GCC" # define INSPIRCD_COMPILER_VERSION __GNUC__ << '.' << __GNUC_MINOR__ +# if __GNUC__ < 9 +# define INSPIRCD_EXTRA_LDLIBS "-lstdc++fs" +# endif +#endif + +#ifndef INSPIRCD_EXTRA_LDLIBS +# define INSPIRCD_EXTRA_LDLIBS "" #endif int main() { - std::cout << "NAME " << INSPIRCD_COMPILER_NAME << std::endl - << "VERSION " << INSPIRCD_COMPILER_VERSION << std::endl; + std::cout + << "NAME " << INSPIRCD_COMPILER_NAME << std::endl + << "VERSION " << INSPIRCD_COMPILER_VERSION << std::endl + << "EXTRA_LDLIBS " << INSPIRCD_EXTRA_LDLIBS << std::endl; return 0; } |
