2024-05-28 20:01:32 -04:00
|
|
|
#!/usr/bin/python3
|
|
|
|
|
|
|
|
# This script is used for initializing a CLion C++ Project
|
|
|
|
|
|
|
|
import requests
|
|
|
|
import json
|
|
|
|
import argparse
|
|
|
|
import os
|
2024-05-28 20:18:50 -04:00
|
|
|
import subprocess
|
2024-05-28 20:01:32 -04:00
|
|
|
import create_git_repo as repo
|
|
|
|
|
2024-05-28 20:18:50 -04:00
|
|
|
def open_process(command):
|
|
|
|
process = subprocess.Popen(command, stderr=subprocess.PIPE, stdout=subprocess.PIPE)
|
|
|
|
stdout, stderr = process.communicate()
|
|
|
|
exit_code = process.wait()
|
|
|
|
#print(stdout, stderr, exit_code)
|
|
|
|
return (stdout, stderr, exit_code)
|
|
|
|
|
|
|
|
cmake_output, cmake_err, _ = open_process(["cmake", "--version"])
|
|
|
|
|
|
|
|
cmake_lines = cmake_output.splitlines()
|
|
|
|
print(str(cmake_lines[0]).split("version ")[1][0:-1])
|