Skip to content
Snippets Groups Projects
Commit 0030588c authored by Jonathan Youett's avatar Jonathan Youett
Browse files

Only set ENABLE_IPOPT when add_dune_ipopt_flags is set.

parent 42adf36b
Branches
No related tags found
No related merge requests found
...@@ -29,9 +29,8 @@ find_package_handle_standard_args(Ipopt DEFAULT_MSG IPOPT_INCLUDE_DIR IPOPT_LIBR ...@@ -29,9 +29,8 @@ find_package_handle_standard_args(Ipopt DEFAULT_MSG IPOPT_INCLUDE_DIR IPOPT_LIBR
set(HAVE_IPOPT ENABLE_IPOPT) set(HAVE_IPOPT ENABLE_IPOPT)
if(IPOPT_FOUND) if(IPOPT_FOUND)
set(DUNE_IPOPT_CFLAGS -I${IPOPT_INCLUDE_DIR}) set(DUNE_IPOPT_CFLAGS "-I${IPOPT_INCLUDE_DIR} -DENABLE_IPOPT=1")
set_property(GLOBAL APPEND PROPERTY ALL_PKG_FLAGS "-DENABLE_IPOPT") set_property(GLOBAL APPEND PROPERTY ALL_PKG_FLAGS "-I${IPOPT_INCLUDE_DIR}")
set_property(GLOBAL APPEND PROPERTY ALL_PKG_FLAGS ${DUNE_IPOPT_CFLAGS})
set(IPOPT_LIBRARY ${IPOPT_LIBRARY}) set(IPOPT_LIBRARY ${IPOPT_LIBRARY})
if (HSL_FOUND) if (HSL_FOUND)
set (IPOPT_LIBRARY ${HSL_LIBRARY} ${IPOPT_LIBRARY}) set (IPOPT_LIBRARY ${HSL_LIBRARY} ${IPOPT_LIBRARY})
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment