매개변수를 c++.bin에 전달

매개변수를 c++.bin에 전달

HSAIL을 만드는 동안 다음과 같은 문제가 발생합니다.

[  3%] Built target libhsail-includes
[  6%] Building CXX object libHSAIL/CMakeFiles/hsail.dir/HSAILScannerRules.cpp.o
In file included from /home/Computador/hsail/HSAIL-Tools-master/libHSAIL/HSAILScannerRules.cpp:46:0:
/home/Computador/hsail/build/libHSAIL/generated/HSAILScannerRules_gen_re2c.hpp: In member function ‘HSAIL_ASM::ETokens HSAIL_ASM::Scanner::scanModifier(HSAIL_ASM::EScanContext, HSAIL_ASM::Scanner::Token&)’:
/home/Computador/hsail/build/libHSAIL/generated/HSAILScannerRules_gen_re2c.hpp:271:17: error: unused variable ‘ctxMarker’ [-Werror=unused-variable]
 const char *ctxMarker = NULL;
             ^~~~~~~~~
/home/Computador/hsail/build/libHSAIL/generated/HSAILScannerRules_gen_re2c.hpp: In member function ‘HSAIL_ASM::ETokens HSAIL_ASM::Scanner::scanDefault(HSAIL_ASM::EScanContext, HSAIL_ASM::Scanner::Token&)’:
/home/Computador/hsail/build/libHSAIL/generated/HSAILScannerRules_gen_re2c.hpp:14065:17: error: unused variable ‘ctxMarker’ [-Werror=unused-variable]
 const char *ctxMarker = NULL;
             ^~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [libHSAIL/CMakeFiles/hsail.dir/build.make:248: libHSAIL/CMakeFiles/hsail.dir/HSAILScannerRules.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:95: libHSAIL/CMakeFiles/hsail.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

make를 사용하여 다음 명령을 실행합니다(make --just-print).

make CXXFLAGS+=-Wno-error=unused-variable -f HSAILAsm/CMakeFiles/HSAILasm.dir/build.make HSAILAsm/CMakeFiles/HSAILasm.dir/depend
cd /home/Computador/hsail/build && /usr/bin/cmake.exe -E cmake_depends "Unix Makefiles" /home/Computador/hsail/HSAIL-Tools-master /home/Computador/hsail/HSAIL-Tools-master/HSAILAsm /home/Computador/hsail/build /home/Computador/hsail/build/HSAILAsm /home/Computador/hsail/build/HSAILAsm/CMakeFiles/HSAILasm.dir/DependInfo.cmake --color=
make CXXFLAGS+=-Wno-error=unused-variable -f HSAILAsm/CMakeFiles/HSAILasm.dir/build.make HSAILAsm/CMakeFiles/HSAILasm.dir/build
/usr/bin/cmake.exe -E cmake_echo_color --switch= --green --progress-dir=/home/Computador/hsail/build/CMakeFiles --progress-num=1 "Building CXX object HSAILAsm/CMakeFiles/HSAILasm.dir/HSAILAsm.cpp.o"
cd /home/Computador/hsail/build/HSAILAsm && /usr/bin/c++.exe  -DAMD_EXTENSIONS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -I/home/Computador/hsail/HSAIL-Tools-master/libHSAIL -I/home/Computador/hsail/build/libHSAIL/generated -I/home/Computador/hsail/HSAIL-Tools-master/libHSAIL-AMD -I/home/Computador/hsail/build/libHSAIL-AMD/generated  -fpic -Wall -Werror -std=c++11 -pthread -fno-rtti -fvisibility-inlines-hidden -o CMakeFiles/HSAILasm.dir/HSAILAsm.cpp.o -c /home/Computador/hsail/HSAIL-Tools-master/HSAILAsm/HSAILAsm.cpp

나는 이미 -Wno-error=unused-variable 명령을 전달하여 오류를 비활성화할 수 있다는 것을 알고 있습니다. 아마도 주로 개발자와 사용자를 위한 것이지만 makefile에서 CXXFLAGS를 사용하여 전달하면 모든 make 명령에 포함되고 가능하다면 가능합니다. GCC에 - 그건 그렇고, makefile에서는 build.make에 주어진 오류(오류가 다른 makefile로 진행됨) 이전의 마지막 make 명령 바로 앞에 그것을 포함했지만 프로그램 C++를 실행할 때. exe를 실행해 보면 내가 전달하려고 하는 -Wno-error가 표시되지 않는 것을 볼 수 있습니다. 어떻게 c++.exe 프로그램에 성공적으로 전달해야 합니까? 나는 cygwin에 있기 때문에 c++.exe입니다.

관련 정보