Proper fix for linking to the Qt libraries (and others)

My initial fix was incorrect, the libraries must be quoted when being
passed to the add test macro, but must be unquoted when passed to the
target_link_libraries function.
This commit is contained in:
Marcus D. Hanwell 2009-08-21 14:04:17 -04:00
parent 2f0b4e1abc
commit ef582933c1
2 changed files with 1 additions and 7 deletions

View File

@ -74,7 +74,7 @@ macro(ei_add_test testname)
string(STRIP "${ARGV2}" ARGV2_stripped)
string(LENGTH "${ARGV2_stripped}" ARGV2_stripped_length)
if(${ARGV2_stripped_length} GREATER 0)
target_link_libraries(${targetname} "${ARGV2}")
target_link_libraries(${targetname} ${ARGV2})
endif(${ARGV2_stripped_length} GREATER 0)
endif(${ARGC} GREATER 2)

View File

@ -78,7 +78,6 @@ else(QT4_FOUND)
ei_add_property(EIGEN_MISSING_BACKENDS "Qt4 support, ")
endif(QT4_FOUND)
if(TEST_LIB)
add_definitions("-DEIGEN_EXTERN_INSTANTIATIONS=1")
endif(TEST_LIB)
@ -137,11 +136,6 @@ ei_add_test(regression)
ei_add_test(stdvector)
ei_add_test(resize)
if(QT4_FOUND)
if(QT_QTCORE_LIBRARY_DEBUG)
set(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY_DEBUG})
else(QT_QTCORE_LIBRARY_DEBUG)
set(QT_QTCORE_LIBRARY ${QT_QTCORE_LIBRARY_RELEASE})
endif(QT_QTCORE_LIBRARY_DEBUG)
ei_add_test(qtvector " " "${QT_QTCORE_LIBRARY}")
endif(QT4_FOUND)
ei_add_test(sparse_vector)