diff --git a/CMakeLists.txt b/CMakeLists.txt index be5bc76..8f853e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,12 @@ endif() #problems when calling QDLDL from C++ set(QDLDL_BOOL_TYPE "unsigned char") +# Generate header file with the global options +# --------------------------------------------- +configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/qdldl_configure.h.in + ${CMAKE_CURRENT_SOURCE_DIR}/include/qdldl_configure.h + NEWLINE_STYLE LF) + configure_file(${CMAKE_CURRENT_SOURCE_DIR}/configure/qdldl_types.h.in ${CMAKE_CURRENT_SOURCE_DIR}/include/qdldl_types.h NEWLINE_STYLE LF) diff --git a/configure/qdldl_configure.h.in b/configure/qdldl_configure.h.in new file mode 100644 index 0000000..b45f56b --- /dev/null +++ b/configure/qdldl_configure.h.in @@ -0,0 +1,21 @@ +#ifndef QDLDL_CONFIGURE_H +# define QDLDL_CONFIGURE_H + +# ifdef __cplusplus +extern "C" { +# endif /* ifdef __cplusplus */ + +/* DEBUG */ +#cmakedefine DEBUG + +/* DFLOAT */ +#cmakedefine DFLOAT + +/* DLONG */ +#cmakedefine DLONG + +# ifdef __cplusplus +} +# endif /* ifdef __cplusplus */ + +#endif /* ifndef QDLDL_CONFIGURE_H */ diff --git a/include/.gitignore b/include/.gitignore index 94736b0..70d4be3 100644 --- a/include/.gitignore +++ b/include/.gitignore @@ -1,2 +1,3 @@ +qdldl_configure.h qdldl_types.h qdldl_version.h