diff --git a/share/clair.modulefile.in b/share/clair.modulefile.in index e7d02c9..b5a800f 100644 --- a/share/clair.modulefile.in +++ b/share/clair.modulefile.in @@ -27,8 +27,8 @@ setenv CPP2PY_ROOT $root setenv CPP2PY_VERSION $version setenv CPP2PY_GIT_HASH $git_hash -prepend-path PATH $root/bin -prepend-path CPLUS_INCLUDE_PATH $root/include -prepend-path LIBRARY_PATH $root/lib +prepend-path PATH @CMAKE_INSTALL_FULL_BINDIR@ +prepend-path CPLUS_INCLUDE_PATH @CMAKE_INSTALL_FULL_INCLUDEDIR@ +prepend-path LIBRARY_PATH @CMAKE_INSTALL_FULL_LIBDIR@ prepend-path PYTHONPATH $root/@PYTHON_LIB_DEST_ROOT@ -prepend-path CMAKE_PREFIX_PATH $root/lib/cmake/cpp2py +prepend-path CMAKE_PREFIX_PATH @CMAKE_INSTALL_FULL_LIBDIR@/cmake/clair diff --git a/share/clairvars.sh.in b/share/clairvars.sh.in index 9af26a5..4c98821 100644 --- a/share/clairvars.sh.in +++ b/share/clairvars.sh.in @@ -1,9 +1,9 @@ # Source this in your environment. -export CPLUS_INCLUDE_PATH=@CMAKE_INSTALL_PREFIX@/include:$CPLUS_INCLUDE_PATH -export PATH=@CMAKE_INSTALL_PREFIX@/bin:$PATH +export CPLUS_INCLUDE_PATH=@CMAKE_INSTALL_FULL_INCLUDEDIR@:$CPLUS_INCLUDE_PATH +export PATH=@CMAKE_INSTALL_FULL_BINDIR@:$PATH export LIBRARY_PATH=@CMAKE_INSTALL_FULL_LIBDIR@:$LIBRARY_PATH export LD_LIBRARY_PATH=@CMAKE_INSTALL_FULL_LIBDIR@:$LD_LIBRARY_PATH export DYLD_LIBRARY_PATH=@CMAKE_INSTALL_FULL_LIBDIR@:$DYLD_LIBRARY_PATH export PYTHONPATH=@CMAKE_INSTALL_PREFIX@/@PYTHON_LIB_DEST_ROOT@:$PYTHONPATH -export CMAKE_PREFIX_PATH=@CMAKE_INSTALL_PREFIX@:$CMAKE_PREFIX_PATH +export CMAKE_PREFIX_PATH=@CMAKE_INSTALL_FULL_LIBDIR@/cmake/clair:$CMAKE_PREFIX_PATH diff --git a/share/cmake/CMakeLists.txt b/share/cmake/CMakeLists.txt index a3aeb95..dbde768 100644 --- a/share/cmake/CMakeLists.txt +++ b/share/cmake/CMakeLists.txt @@ -7,4 +7,4 @@ install( DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/clair ) -install(EXPORT clair-targets NAMESPACE c2py:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/clair) +install(EXPORT clair-targets NAMESPACE clair:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/clair) diff --git a/share/cmake/clair-config.cmake.in b/share/cmake/clair-config.cmake.in index 0d46108..0823b8f 100644 --- a/share/cmake/clair-config.cmake.in +++ b/share/cmake/clair-config.cmake.in @@ -12,7 +12,7 @@ set(CLAIR_LLVM_VERSION @CMAKE_CXX_COMPILER_VERSION@) set(@PROJECT_NAME@_ROOT @CMAKE_INSTALL_PREFIX@ CACHE STRING "@PROJECT_NAME@ root directory") # Include the exported targets of this project -include(@CMAKE_INSTALL_PREFIX@/lib/cmake/@PROJECT_NAME@/@PROJECT_NAME@-targets.cmake) +include(@CMAKE_INSTALL_FULL_LIBDIR@/cmake/@PROJECT_NAME@/@PROJECT_NAME@-targets.cmake) if (NOT ${CMAKE_CXX_COMPILER_ID} STREQUAL "@CMAKE_CXX_COMPILER_ID@") MESSAGE(FATAL_ERROR "Clair plugins are only usable with clang") @@ -26,11 +26,8 @@ message(STATUS "Found @PROJECT_NAME@-config.cmake with version @PROJECT_VERSION@ # Mac specific if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin") - set(CMAKE_INSTALL_NAME_DIR "@CMAKE_INSTALL_PREFIX@/lib") + set(CMAKE_INSTALL_NAME_DIR "@CMAKE_INSTALL_FULL_LIBDIR@") set(CMAKE_MACOSX_RPATH 1) # new for cmake 3.x endif() - # include the exported targets of this project - include(@CMAKE_INSTALL_PREFIX@/lib/cmake/clair/clair-targets.cmake) - endif() diff --git a/src/plugins/c2py/CMakeLists.txt b/src/plugins/c2py/CMakeLists.txt index b3a84a5..75914a9 100644 --- a/src/plugins/c2py/CMakeLists.txt +++ b/src/plugins/c2py/CMakeLists.txt @@ -33,7 +33,7 @@ add_dependencies(c2py_plugin clair_c2py) target_compile_options(c2py_plugin INTERFACE $ - $ + $ ) target_compile_definitions(c2py_plugin INTERFACE C2PY_INCLUDED) add_library(clair::c2py_plugin ALIAS c2py_plugin) diff --git a/src/plugins/c2py/matchers.cpp b/src/plugins/c2py/matchers.cpp index dfe4197..45ce0e0 100644 --- a/src/plugins/c2py/matchers.cpp +++ b/src/plugins/c2py/matchers.cpp @@ -176,7 +176,7 @@ namespace matchers { #endif if (auto *s = llvm::dyn_cast_or_null(cls)) { - if (!s->getTypeAsWritten()) return; + if (!s->isExplicitInstantiationOrSpecialization()) return; } // Reject the declaration of the template itself.