1
0
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:
Pablo de Oliveira Castro 2021-07-23 09:02:25 +02:00 committed by GitHub
parent c8cad59922
commit e5806e676b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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