diff --git a/src/harmonicmaps.cc b/src/harmonicmaps.cc
index 4aa4b97d1266c86ec0738c298d6c828cea43af4e..fa4b1f8a80da9b8962df0cdd5192f18c101f62d5 100644
--- a/src/harmonicmaps.cc
+++ b/src/harmonicmaps.cc
@@ -2,6 +2,9 @@
 
 #include <fenv.h>
 
+// TODO: With cmake I need this hack to make IPOpt happy
+#define HAVE_CSTDDEF
+
 // Includes for the ADOL-C automatic differentiation library
 // Need to come before (almost) all others.
 #include <adolc/adouble.h>