gm_whichcompiler.cpp

来自「算断裂的」· C++ 代码 · 共 61 行

CPP
61
字号
// ------------------------------------------------------------------// gm_whichcompiler.cpp//// This file defines a function that tells us which compiler// is being used.// ------------------------------------------------------------------// Author: Stephen A. Vavasis// Copyright (c) 1999 by Cornell University.  All rights reserved.// // See the accompanying file 'Copyright' for authorship information,// the terms of the license governing this software, and disclaimers// concerning this software.// ------------------------------------------------------------------// This file is part of the QMG software.  // Version 2.0 of QMG, release date September 3, 1999.// ------------------------------------------------------------------#include "qfrontend.h"#define GM_ROUTINE_NAME gm_whichcompiler#define GM_ROUTINE_NAME_Q "gm_whichcompiler"namespace {  using namespace QMG;    // standard driver routine.  void worker(const QMG::FrontEnd::ArgValType& argvalhandle,    QMG::FrontEnd::ReturnValType& returnvalhandle,    QMG::FrontEnd::Interpreter& interp) {    using namespace QMG;    using namespace QMG::FrontEnd;    argvalhandle.verify_nargin(0,0, GM_ROUTINE_NAME_Q);    returnvalhandle.verify_nargout(1, 1, GM_ROUTINE_NAME_Q);    const char* whichcompiler =#ifdef __GNUC__      "gcc"#else#  ifdef _MSC_VER      "msvc"#  else#    ifdef __KCC      "kcc"#    else      "unknown"#    endif#  endif#endif;     returnvalhandle.put_string(0, whichcompiler);  }}#include "gm_entrypoint.cpp"

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?