mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-04-22 09:39:34 +08:00
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:
parent
2f0b4e1abc
commit
ef582933c1
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user