mirror of
https://github.com/TREX-CoE/qmckl.git
synced 2024-12-22 12:23:56 +01:00
Make sure qmckl.h can be imported from C++ (#26)
When qmckl.h is included in a C++ file wrap the definitions in an extern "C" block to avoid mangling.
This commit is contained in:
parent
c8cad59922
commit
e5806e676b
@ -85,6 +85,10 @@ cat << EOF > ${OUTPUT}
|
||||
#ifndef __QMCKL_H__
|
||||
#define __QMCKL_H__
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
@ -100,6 +104,9 @@ do
|
||||
done
|
||||
|
||||
cat << EOF >> ${OUTPUT}
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user