def handle_cmake_error(output): """ Improves the cmake output messages """ print_error("\n\n\n") print_error("-" * 60) print_error("\nCMake Error:") if "Re-run cmake with a different source directory." in output: print_error( "You moved the project folder, please add ' --clean' to the command line." ) elif "No CMAKE_CXX_COMPILER could be found." in output or "No CMAKE_C_COMPILER could be found." in output: print_error("Could not find the required compiler!") if is_windows(): print_error( "\nPlease make sure you installed the following compiler:") bitness = "64 bit" if is_64_bit() else "" print_error(get_panda_mscv_version().cmake_str, bitness) else: print_error("The required compiler is:", PandaSystem.get_compiler()) print_error("\n") print_error("-" * 60) print_error("\n\n\n") exit(-1)
def get_panda_msvc_version(): """ Returns the MSVC version panda was built with """ compiler = PandaSystem.get_compiler() for msvc_version in MSVC_VERSIONS: if msvc_version.compiler_search_string in compiler: return msvc_version print("FATAL ERROR: Unable to detect visual studio version of your Panda3D Build!", file=sys.stderr) print("Unknown compiler string was: '" + compiler + "'", file=sys.stderr) print("", file=sys.stderr) print("Known visual studio versions are:", file=sys.stderr) for msvc_version in MSVC_VERSIONS: print("-", msvc_version.cmake_str, "(" + msvc_version.compiler_search_string + ")", file=sys.stderr) print("", file=sys.stderr) fatal_error("Unable to determine compiler")
def get_compiler_name(): """ Returns the name of the used compiler, either 'MSC', 'GCC' or 'CLANG' """ full_name = PandaSystem.get_compiler() compiler_name = full_name.split()[0] return compiler_name.upper()
def get_compiler_name(): """ Returns the name of the used compiler, either 'MSC', 'GCC' or 'CLANG' """ full_name = PandaSystem.get_compiler() compiler_name = full_name.split()[0] return compiler_name.upper()