time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

include.gypi (3102B)


      1 # @license Apache-2.0
      2 #
      3 # Copyright (c) 2018 The Stdlib Authors.
      4 #
      5 # Licensed under the Apache License, Version 2.0 (the "License");
      6 # you may not use this file except in compliance with the License.
      7 # You may obtain a copy of the License at
      8 #
      9 #    http://www.apache.org/licenses/LICENSE-2.0
     10 #
     11 # Unless required by applicable law or agreed to in writing, software
     12 # distributed under the License is distributed on an "AS IS" BASIS,
     13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     14 # See the License for the specific language governing permissions and
     15 # limitations under the License.
     16 
     17 # A GYP include file for building a Node.js native add-on.
     18 #
     19 # Note that nesting variables is required due to how GYP processes a configuration. Any variables defined within a nested 'variables' section is defined in the outer scope. Thus, conditions in the outer variable scope are free to use these variables without running into "variable undefined" errors.
     20 #
     21 # Main documentation:
     22 #
     23 # [1]: https://gyp.gsrc.io/docs/InputFormatReference.md
     24 # [2]: https://gyp.gsrc.io/docs/UserDocumentation.md
     25 #
     26 # Variable nesting hacks:
     27 #
     28 # [3]: https://chromium.googlesource.com/external/skia/gyp/+/master/common_variables.gypi
     29 # [4]: https://src.chromium.org/viewvc/chrome/trunk/src/build/common.gypi?revision=127004
     30 {
     31   # Define variables to be used throughout the configuration for all targets:
     32   'variables': {
     33     'variables': {
     34       # Host BLAS library (to override -Dblas=<blas>):
     35       'blas%': '',
     36 
     37       # Path to BLAS library (to override -Dblas_dir=<path>):
     38       'blas_dir%': '',
     39     }, # end variables
     40 
     41     # Source directory:
     42     'src_dir': './src',
     43 
     44     # Include directories:
     45     'include_dirs': [
     46       '<@(blas_dir)',
     47       '<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'os\':\'<(OS)\',\'blas\':\'<(blas)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).include; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
     48     ],
     49 
     50     # Add-on destination directory:
     51     'addon_output_dir': './src',
     52 
     53     # Source files:
     54     'src_files': [
     55       '<(src_dir)/addon.cpp',
     56       '<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'os\':\'<(OS)\',\'blas\':\'<(blas)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).src; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
     57     ],
     58 
     59     # Library dependencies:
     60     'libraries': [
     61       '<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'os\':\'<(OS)\',\'blas\':\'<(blas)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libraries; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
     62     ],
     63 
     64     # Library directories:
     65     'library_dirs': [
     66       '<@(blas_dir)',
     67       '<!@(node -e "var arr = require(\'@stdlib/utils/library-manifest\')(\'./manifest.json\',{\'os\':\'<(OS)\',\'blas\':\'<(blas)\'},{\'basedir\':process.cwd(),\'paths\':\'posix\'}).libpath; for ( var i = 0; i < arr.length; i++ ) { console.log( arr[ i ] ); }")',
     68     ],
     69   }, # end variables
     70 }