Checking for missing python packages
Reporting error in CMake if CppHeaderParser and argparse are not installed in the system Change-Id: I7617f662bc061fde45ce9f72c08d80a5108766d9
Этот коммит содержится в:
коммит произвёл
Ammar Elwazir
родитель
c74b1fa8ff
Коммит
b88bbe155f
@@ -37,6 +37,20 @@ add_compile_options ( -Wall -Werror )
|
||||
|
||||
add_link_options("-Bdynamic -z,noexecstck")
|
||||
|
||||
find_package(Python3 COMPONENTS Interpreter REQUIRED)
|
||||
|
||||
execute_process(
|
||||
COMMAND ${Python3_EXECUTABLE} -c "import CppHeaderParser"
|
||||
RESULT_VARIABLE CPPHEADERPARSER
|
||||
OUTPUT_QUIET
|
||||
)
|
||||
|
||||
if(NOT ${CPPHEADERPARSER} EQUAL 0)
|
||||
message(FATAL_ERROR
|
||||
"The \"CppHeaderParser\" Python3 package is not installed. Please install it using the following command: \"pip3 install CppHeaderParser\"."
|
||||
)
|
||||
endif()
|
||||
|
||||
## CLANG options
|
||||
if ( "$ENV{CXX}" STREQUAL "/usr/bin/clang++" )
|
||||
set ( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ferror-limit=1000000" )
|
||||
|
||||
Ссылка в новой задаче
Block a user