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

target_compile_options is not avaiable in cmake 2.8

parent c25f9b9e
No related branches found
No related tags found
No related merge requests found
......@@ -2,7 +2,10 @@ function(add_dune_ipopt_flags _targets)
if(IPOPT_FOUND)
cmake_parse_arguments(ADD_DUNE_IPOPT_FLAGS "OBJECT" "" "" ${ARGN})
foreach(_target ${_targets})
target_compile_options(${_target} PRIVATE ${DUNE_IPOPT_CFLAGS})
get_target_property(_props ${_target} COMPILE_FLAGS)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
set_target_properties(${_target} PROPERTIES COMPILE_FLAGS
"${_props} ${DUNE_IPOPT_CFLAGS}")
if(NOT ADD_DUNE_IPOPT_FLAGS_OBJECT)
target_link_libraries(${_target} ${IPOPT_LIBRARY})
endif()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment