Changeset 586383d


Ignore:
Timestamp:
Nov 29, 2018, 3:04:58 PM (6 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master
Children:
752ce6d
Parents:
3569326
Message:

[tests] [win] more windows workaround to pass strings via -D

Location:
tests
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tests/utils_tests.h

    r3569326 r586383d  
    2020#define PATH_MAX 1024
    2121#endif
     22
     23// This macro is used to pass a string to msvc compiler: since msvc's -D flag
     24// strips the quotes, we define the string without quotes and re-add them with
     25// this macro.
     26
     27#define REDEFINESTRING(x) #x
     28#define DEFINEDSTRING(x) REDEFINESTRING(x)
    2229
    2330#ifndef AUBIO_TESTS_SOURCE
     
    135142  char** argv = (char**)calloc(argc, sizeof(char*));
    136143  argv[0] = __FILE__;
    137   argv[1] = AUBIO_TESTS_SOURCE;
     144  argv[1] = DEFINEDSTRING(AUBIO_TESTS_SOURCE);
    138145  // check if the file can be read
    139146  if ( check_source(argv[1]) ) return 1;
  • tests/wscript_build

    r3569326 r586383d  
    2525            install_path = None,
    2626            defines = ['AUBIO_UNSTABLE_API=1',
    27                         'AUBIO_TESTS_SOURCE=\"{}\"'.format(test_sound_abspath)]
     27                        'AUBIO_TESTS_SOURCE={}'.format(test_sound_abspath)]
    2828       )
Note: See TracChangeset for help on using the changeset viewer.