核数据处理程序njoy源码


核数据处理程序njoy源码
资源截图
代码片段和文件信息
“““
generate cmake files for a project from a serialized project description
“““
import os
import textwrap
from . import description
from .compiler_configuration import *

language_string = { ‘c‘ : ‘C‘ ‘c++‘ : ‘CXX‘ ‘fortran‘ : ‘Fortran‘ }
compiler_string = { ‘gcc‘ : ‘GNU‘
                    ‘g++‘ : ‘GNU‘
                    ‘gfortran‘ : ‘GNU‘
                    ‘clang‘ : ‘Clang‘
                    ‘clang++‘ : ‘Clang‘
                    ‘apple clang‘ : ‘AppleClang‘
                    ‘apple clang++‘ : ‘AppleClang‘ }

def fetch_subprojects( state ):
  contents = ““
  if state[‘subprojects‘]:
    contents += textwrap.dedent(
      “““
      if( NOT ROOT_DIRECTORY )
          set( ROOT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} )
          if ( NOT fetched_subprojects )
              if ( NOT PYTHON_EXECUTABLE )
                  find_package( PythonInterp )
                  if ( NOT PYTHONINTERP_FOUND )
                      message( FATAL_ERROR “Python interpeter installation was not found.“ )
                  endif()
              endif()
              execute_process( COMMAND ${PYTHON_EXECUTABLE} “./metaconfigure/fetch_subprojects.py“
                               WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} 
                               RESULT_VARIABLE fetch_failure )
              if ( NOT fetch_failure )
                  set( fetched_subprojects TRUE CACHE BOOL “fetch script ran“ )
              else()
                  message( FATAL_ERROR “Failed to fetch dependencies“ )
              endif()
          endif()
      endif()
      “““)
    
  return contents

def set_build_type( state ):
  contents = ‘‘
  if not state[‘is_external_project‘]:
      contents += textwrap.dedent(“““
         if( NOT DEFINED build_type )
             if( VERBOSE )
                 message( STATUS “build_type variable not specified“)
                 message( STATUS “build_type defaulted to debug“)
             endif()
             set ( build_type “debug“ )
         endif()
         if( NOT DEFINED {name}_build_type )
             if( VERBOSE )
                 message( STATUS “{name}_build_type not specified“)
                 message( STATUS “{name}_build_type defaulted to value of build_type variable“)
             endif()
             set( {name}_build_type “${{build_type}}“ )
          endif()
          “““).format(**state)
  return contents

def set_library_type( state ):
    contents = ‘‘
    if not state[‘is_external_project‘]:
        contents += textwrap.dedent( “““
            if( NOT DEFINED static_libraries )
                if( VERBOSE )
                    message( STATUS “static_libraries variable not specified“)
                    message( STATUS “static_libraries defaulted to FALSE“)
                endif()
                set( build_static_libraries FALSE )
            else()
                set( build_static_libraries ${static_libraries} )
            endif()
            “““)
        
    if  state[‘target‘] != ‘include‘:
     

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-03-02 15:58  NJOY2016-master
     文件           5  2017-03-02 15:58  NJOY2016-master.gitignore
     文件         769  2017-03-02 15:58  NJOY2016-master.travis.yml
     目录           0  2017-03-02 15:58  NJOY2016-master.travis
     文件        1277  2017-03-02 15:58  NJOY2016-master.travisuild.sh
     文件        7304  2017-03-02 15:58  NJOY2016-masterCMakeLists.txt
     文件        2289  2017-03-02 15:58  NJOY2016-masterLICENSE
     文件        3574  2017-03-02 15:58  NJOY2016-masterREADME.md
     目录           0  2017-03-02 15:58  NJOY2016-masterdocs
     文件          50  2017-03-02 15:58  NJOY2016-masterdocs.gitignore
     文件         837  2017-03-02 15:58  NJOY2016-masterdocsGemfile
     文件        2314  2017-03-02 15:58  NJOY2016-masterdocsLICENSE.md
     文件         568  2017-03-02 15:58  NJOY2016-masterdocsREADME-jekyll.md
     文件         831  2017-03-02 15:58  NJOY2016-masterdocs\_config.yml
     目录           0  2017-03-02 15:58  NJOY2016-masterdocs\_data
     文件         286  2017-03-02 15:58  NJOY2016-masterdocs\_data
avigation.yml
     目录           0  2017-03-02 15:58  NJOY2016-masterdocs\_includes
     文件         826  2017-03-02 15:58  NJOY2016-masterdocs\_includesfooter.html
     文件         771  2017-03-02 15:58  NJOY2016-masterdocs\_includeshead.html
     文件         182  2017-03-02 15:58  NJOY2016-masterdocs\_includesheader.html
     文件         177  2017-03-02 15:58  NJOY2016-masterdocs\_includesicon-github.html
     文件         926  2017-03-02 15:58  NJOY2016-masterdocs\_includesicon-github.svg
     文件         891  2017-03-02 15:58  NJOY2016-masterdocs\_includes
av.html
     目录           0  2017-03-02 15:58  NJOY2016-masterdocs\_layouts
     文件         331  2017-03-02 15:58  NJOY2016-masterdocs\_layoutsdefault.html
     文件          69  2017-03-02 15:58  NJOY2016-masterdocs\_layoutshome.html
     文件         218  2017-03-02 15:58  NJOY2016-masterdocs\_layoutspage.html
     文件         713  2017-03-02 15:58  NJOY2016-masterdocs\_layoutspost.html
     目录           0  2017-03-02 15:58  NJOY2016-masterdocs\_sass
     文件        2909  2017-03-02 15:58  NJOY2016-masterdocs\_sass\_base.scss
     文件        4299  2017-03-02 15:58  NJOY2016-masterdocs\_sass\_layout.scss
............此处省略226个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)