• 大小: 20.45MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-02
  • 语言: 其他
  • 标签: 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\.travis\build.sh
     文件        7304  2017-03-02 15:58  NJOY2016-master\CMakeLists.txt
     文件        2289  2017-03-02 15:58  NJOY2016-master\LICENSE
     文件        3574  2017-03-02 15:58  NJOY2016-master\README.md
     目录           0  2017-03-02 15:58  NJOY2016-master\docs\
     文件          50  2017-03-02 15:58  NJOY2016-master\docs\.gitignore
     文件         837  2017-03-02 15:58  NJOY2016-master\docs\Gemfile
     文件        2314  2017-03-02 15:58  NJOY2016-master\docs\LICENSE.md
     文件         568  2017-03-02 15:58  NJOY2016-master\docs\README-jekyll.md
     文件         831  2017-03-02 15:58  NJOY2016-master\docs\_config.yml
     目录           0  2017-03-02 15:58  NJOY2016-master\docs\_data\
     文件         286  2017-03-02 15:58  NJOY2016-master\docs\_data\navigation.yml
     目录           0  2017-03-02 15:58  NJOY2016-master\docs\_includes\
     文件         826  2017-03-02 15:58  NJOY2016-master\docs\_includes\footer.html
     文件         771  2017-03-02 15:58  NJOY2016-master\docs\_includes\head.html
     文件         182  2017-03-02 15:58  NJOY2016-master\docs\_includes\header.html
     文件         177  2017-03-02 15:58  NJOY2016-master\docs\_includes\icon-github.html
     文件         926  2017-03-02 15:58  NJOY2016-master\docs\_includes\icon-github.svg
     文件         891  2017-03-02 15:58  NJOY2016-master\docs\_includes\nav.html
     目录           0  2017-03-02 15:58  NJOY2016-master\docs\_layouts\
     文件         331  2017-03-02 15:58  NJOY2016-master\docs\_layouts\default.html
     文件          69  2017-03-02 15:58  NJOY2016-master\docs\_layouts\home.html
     文件         218  2017-03-02 15:58  NJOY2016-master\docs\_layouts\page.html
     文件         713  2017-03-02 15:58  NJOY2016-master\docs\_layouts\post.html
     目录           0  2017-03-02 15:58  NJOY2016-master\docs\_sass\
     文件        2909  2017-03-02 15:58  NJOY2016-master\docs\_sass\_base.scss
     文件        4299  2017-03-02 15:58  NJOY2016-master\docs\_sass\_layout.scss
............此处省略226个文件信息

评论

共有 条评论