Abort on compilation error.
the build was successful Details

This commit is contained in:
tastytea 2019-01-01 09:29:16 +01:00
부모 6a67553d61
커밋 6cd9ff8083
로그인 계정: tastytea
GPG 키 ID: CFC39497F1B26E07
2개의 변경된 파일8개의 추가작업 그리고 3개의 파일을 삭제

파일 보기

@ -1,6 +1,6 @@
cmake_minimum_required (VERSION 3.2)
project(compilescript
VERSION 0.3.1
VERSION 0.3.2
LANGUAGES CXX
)

파일 보기

@ -200,8 +200,13 @@ int main(int argc, char *argv[])
return 1;
}
std::system((compiler + " " + source.string() + " " + compiler_arguments
+ " -o " + binary.string()).c_str());
int ret = std::system((compiler + " " + source.string() + " "
+ compiler_arguments + " -o " + binary.string()).c_str());
if (ret != 0)
{
cerr << "ERROR: Compilation failed.\n";
return 1;
}
}
execv(binary.c_str(), &argv[1]);