It's cool we have a fortran test, but we should have a C/C++ test, especially for C++ extern "C".pull/6838/head
parent
7d4af2ab7c
commit
90883fa35d
4 changed files with 32 additions and 0 deletions
@ -0,0 +1,5 @@ |
||||
extern "C" { |
||||
int makeInt(void) { |
||||
return 0; |
||||
} |
||||
} |
@ -0,0 +1,10 @@ |
||||
|
||||
#ifdef __cplusplus |
||||
extern "C" { |
||||
#endif |
||||
|
||||
int makeInt(void); |
||||
|
||||
#ifdef __cplusplus |
||||
} |
||||
#endif |
@ -0,0 +1,5 @@ |
||||
#include "c_linkage.h" |
||||
|
||||
int main(void) { |
||||
return makeInt(); |
||||
} |
@ -0,0 +1,12 @@ |
||||
project( |
||||
'link_language', |
||||
['c', 'cpp'], |
||||
) |
||||
|
||||
exe = executable( |
||||
'main', |
||||
['main.c', 'c_linkage.cpp'], |
||||
link_language : 'c', |
||||
) |
||||
|
||||
test('main', exe) |
Loading…
Reference in new issue