Abort on compilation error.
the build was successful
Details
the build was successful
Details
This commit is contained in:
parent
6a67553d61
commit
6cd9ff8083
|
@ -1,6 +1,6 @@
|
||||||
cmake_minimum_required (VERSION 3.2)
|
cmake_minimum_required (VERSION 3.2)
|
||||||
project(compilescript
|
project(compilescript
|
||||||
VERSION 0.3.1
|
VERSION 0.3.2
|
||||||
LANGUAGES CXX
|
LANGUAGES CXX
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -200,8 +200,13 @@ int main(int argc, char *argv[])
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::system((compiler + " " + source.string() + " " + compiler_arguments
|
int ret = std::system((compiler + " " + source.string() + " "
|
||||||
+ " -o " + binary.string()).c_str());
|
+ compiler_arguments + " -o " + binary.string()).c_str());
|
||||||
|
if (ret != 0)
|
||||||
|
{
|
||||||
|
cerr << "ERROR: Compilation failed.\n";
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
execv(binary.c_str(), &argv[1]);
|
execv(binary.c_str(), &argv[1]);
|
||||||
|
|
Reference in New Issue