mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix general linking issue for tests linking to multiple libs, and explicitly link mpfr_real test to GMP.
This commit is contained in:
@@ -35,13 +35,16 @@ macro(ei_add_test_internal testname testname_with_suffix)
|
||||
if(EXTERNAL_LIBS)
|
||||
target_link_libraries(${targetname} ${EXTERNAL_LIBS})
|
||||
endif()
|
||||
|
||||
if(${ARGC} GREATER 3)
|
||||
string(STRIP "${ARGV3}" ARGV3_stripped)
|
||||
string(LENGTH "${ARGV3_stripped}" ARGV3_stripped_length)
|
||||
if(${ARGV3_stripped_length} GREATER 0)
|
||||
target_link_libraries(${targetname} ${ARGV3})
|
||||
endif(${ARGV3_stripped_length} GREATER 0)
|
||||
endif(${ARGC} GREATER 3)
|
||||
foreach(lib_to_link ${ARGV3})
|
||||
string(STRIP lib_to_link lib_to_link_stripped)
|
||||
string(LENGTH "${lib_to_link_stripped}" lib_to_link_stripped_length)
|
||||
if(${lib_to_link_stripped_length} GREATER 0)
|
||||
target_link_libraries(${targetname} "${lib_to_link}")
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
if(CYGWIN)
|
||||
|
||||
Reference in New Issue
Block a user