File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -640,7 +640,8 @@ endif()
640
640
string (REPLACE " " ";" LLVM_BINDINGS_LIST "${LLVM_BINDINGS} " )
641
641
642
642
function (find_python_module module)
643
- string (TOUPPER ${module} module_upper)
643
+ string (REPLACE "." "_" module_name ${module} )
644
+ string (TOUPPER ${module_name} module_upper)
644
645
set (FOUND_VAR PY_${module_upper} _FOUND)
645
646
646
647
execute_process (COMMAND "${PYTHON_EXECUTABLE} " "-c" "import ${module} "
@@ -658,13 +659,16 @@ endfunction()
658
659
659
660
set (PYTHON_MODULES
660
661
pygments
662
+ # Some systems still don't have pygments.lexers.c_cpp which was introduced in
663
+ # version 2.0 in 2014...
664
+ pygments.lexers.c_cpp
661
665
yaml
662
666
)
663
667
foreach (module ${PYTHON_MODULES} )
664
668
find_python_module(${module} )
665
669
endforeach ()
666
670
667
- if (PY_PYGMENTS_FOUND AND PY_YAML_FOUND)
671
+ if (PY_PYGMENTS_FOUND AND PY_PYGMENTS_LEXERS_C_CPP_FOUND AND PY_YAML_FOUND)
668
672
set (LLVM_HAVE_OPT_VIEWER_MODULES 1)
669
673
else ()
670
674
set (LLVM_HAVE_OPT_VIEWER_MODULES 0)
You can’t perform that action at this time.
0 commit comments