"Fossies" - the Fresh Open Source Software Archive

Member "darktable-2.6.3/src/external/rawspeed/cmake/Modules/FindDemangler.cmake" (19 Oct 2019, 884 Bytes) of package /linux/misc/darktable-2.6.3.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) CMake source code syntax highlighting (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 set(_demangler "NOTFOUND")
    2 
    3 function(findDemangler package target)
    4   if(_demangler)
    5     return()
    6   endif()
    7 
    8   find_package(${package})
    9 
   10   if(NOT DEFINED ${package}_FOUND OR NOT ${package}_FOUND OR NOT TARGET ${target})
   11     return()
   12   endif()
   13 
   14   set_package_properties(Demangler PROPERTIES
   15                          DESCRIPTION "Just an alias for ${package}")
   16 
   17   get_property(_demangler TARGET ${target} PROPERTY IMPORTED_LOCATION)
   18   set_package_properties(${package} PROPERTIES
   19                          TYPE REQUIRED)
   20 
   21   set(_demangler "${_demangler}" PARENT_SCOPE)
   22 endfunction()
   23 
   24 findDemangler(LLVMCXXFilt llvm-cxxfilt)
   25 findDemangler(CppFilt     c++filt)
   26 
   27 include(FindPackageHandleStandardArgs)
   28 find_package_handle_standard_args(Demangler
   29   DEFAULT_MSG
   30   _demangler)
   31 
   32 add_executable(demangler IMPORTED GLOBAL)
   33 set_property(TARGET demangler PROPERTY IMPORTED_LOCATION "${_demangler}")