Checking for missing python packages
Reporting error in CMake if CppHeaderParser and argparse are not installed in the system
Change-Id: I7617f662bc061fde45ce9f72c08d80a5108766d9
[ROCm/roctracer commit: b88bbe155f]
This commit is contained in:
zatwierdzone przez
Ammar Elwazir
rodzic
9a799bc26f
commit
cf1336ba91
@@ -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" )
|
||||
|
||||
Reference in New Issue
Block a user