- Fix adding -Wshadow in the compiler flags twice.
- Detect the new Clang-based Intel compiler as well as the old one.
- Silence some deprecation warnings using Intel syntax.
#pragma once
-#ifdef __GNUC__
+#if defined __INTEL_COMPILER
+# pragma warning(disable:1478)
+#elif defined __GNUC__
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
}
};
-#ifdef __GNUC__
+#if defined __INTEL_COMPILER
+# pragma warning(enable:1478)
+#elif defined __GNUC__
# pragma GCC diagnostic pop
#endif
<|BOLD CXX=<NAME>|> Sets the C++ compiler to use when building the
server. If not specified then the build system
- will search for c++, g++, clang++ or icpc.
+ will search for c++, g++, clang++, icpx, or icpc.
<|BOLD INSPIRCD_VERBOSE=<0|1>|> Shows additional information for debugging.
If you have any problems with configuring InspIRCd then visit our IRC channel
}
sub find_compiler {
- my @compilers = qw(c++ g++ clang++ icpc);
+ my @compilers = qw(c++ g++ clang++ icpx icpc);
for my $compiler (shift // @compilers) {
return $compiler if __test_compiler $compiler;
return "xcrun $compiler" if $^O eq 'darwin' && __test_compiler "xcrun $compiler";
SOURCEPATH = @SOURCE_DIR@
BUILDPATH ?= $(SOURCEPATH)/build/@COMPILER_NAME@-@COMPILER_VERSION@
SOCKETENGINE = @SOCKETENGINE@
-CORECXXFLAGS = -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter -Wshadow
+CORECXXFLAGS = -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -pipe -Iinclude -Wall -Wextra -Wfatal-errors -Wno-unused-parameter
LDLIBS = -lstdc++
CORELDFLAGS = -rdynamic -L.
PICLDFLAGS = -fPIC -shared -rdynamic
#include <iostream>
-#if defined __INTEL_COMPILER // Also defines __clang__ and __GNUC__
+#if defined __INTEL_COMPILER // Also defines __GNUC__
# define INSPIRCD_COMPILER_NAME "Intel"
# define INSPIRCD_COMPILER_VERSION (__INTEL_COMPILER / 100) << '.' << (__INTEL_COMPILER % 100)
+#elif defined __INTEL_CLANG_COMPILER // Also defines __clang__
+# define INSPIRCD_COMPILER_NAME "IntelClang"
+# define INSPIRCD_COMPILER_VERSION (__INTEL_CLANG_COMPILER / 10000) << '.' << ((__INTEL_CLANG_COMPILER % 10000) / 100)
#elif defined __clang__ // Also defines __GNUC__
# if defined __apple_build_version__
# define INSPIRCD_COMPILER_NAME "AppleClang"
execute 'git', 'clean', '-dfx';
my $root = dirname $RealDir;
-my @compilers = $#ARGV >= 0 ? @ARGV : qw(g++ clang++ icpc);
+my @compilers = $#ARGV >= 0 ? @ARGV : qw(g++ clang++ icpx icpc);
for my $compiler (@compilers) {
if (system "$compiler -v > /dev/null 2>&1") {
say STDERR "Skipping $compiler as it is not installed on this system!";