diff --git a/include/clad/Differentiator/Differentiator.h b/include/clad/Differentiator/Differentiator.h index fd917b365..29e5c49da 100644 --- a/include/clad/Differentiator/Differentiator.h +++ b/include/clad/Differentiator/Differentiator.h @@ -211,7 +211,7 @@ CUDA_HOST_DEVICE T push(tape& to, ArgsT... val) { bool CUDAkernel = false) requires(!ImmediateMode) : m_Function(f), m_Functor(functor), m_CUDAkernel(CUDAkernel) { -#ifndef __CLAD_SO_LOADED +#ifndef __CLAD__ static_assert(false, "clad doesn't appear to be loaded; make sure that " "you pass clad.so to clang."); #endif @@ -229,7 +229,7 @@ CUDA_HOST_DEVICE T push(tape& to, ArgsT... val) { : m_Function(f), m_Code(""), m_Functor(functor), m_CUDAkernel(CUDAkernel) { -#ifndef __CLAD_SO_LOADED +#ifndef __CLAD__ static_assert(false, "clad doesn't appear to be loaded; make sure that " "you pass clad.so to clang."); #endif @@ -239,7 +239,7 @@ CUDA_HOST_DEVICE T push(tape& to, ArgsT... val) { FunctorType* functor = nullptr, bool CUDAkernel = false) : m_Function(f), m_Functor(functor), m_CUDAkernel(CUDAkernel) { -#ifndef __CLAD_SO_LOADED +#ifndef __CLAD__ static_assert(false, "clad doesn't appear to be loaded; make sure that " "you pass clad.so to clang."); #endif diff --git a/tools/ClangPlugin.cpp b/tools/ClangPlugin.cpp index 315f2506b..bf28de164 100644 --- a/tools/ClangPlugin.cpp +++ b/tools/ClangPlugin.cpp @@ -91,10 +91,10 @@ namespace clad { } #endif // CLANG_VERSION_MAJOR > 8 - // Add define for __CLAD_SO_LOADED, so that CladFunction::CladFunction() + // Add define for __CLAD__, so that CladFunction::CladFunction() // doesn't throw an error. auto predefines = m_CI.getPreprocessor().getPredefines(); - predefines.append("#define __CLAD_SO_LOADED 1\n"); + predefines.append("#define __CLAD__ 1\n"); m_CI.getPreprocessor().setPredefines(predefines); }