]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Update CMake configuration of SymEngine libraries.
authorJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 19 Mar 2019 09:48:18 +0000 (10:48 +0100)
committerJean-Paul Pelteret <jppelteret@gmail.com>
Tue, 19 Mar 2019 14:01:32 +0000 (15:01 +0100)
cmake/modules/FindSYMENGINE.cmake

index ad0624507365982da332b403b93ecfe0e88b3a85..9c9dbbba071f608ba1bca3081b2821bd6fe0d3ad 100644 (file)
@@ -118,15 +118,15 @@ STRING(REGEX REPLACE
 REMOVE_DUPLICATES(_symengine_include_dirs)
 
 #
-# The SYMENGINE_LIBRARIES variable configured by SymEngine only lists the
-# libraries, but does not set their paths. So we configure this outselves.
+# Get the full path for the SYMENGINE_LIBRARIES. Some of these libraries are 
+# CMake targets, so we can query them directly for this information.
 # 
 FOREACH(SYMENGINE_LIBRARY_NAME ${SYMENGINE_LIBRARIES})
-  DEAL_II_FIND_LIBRARY(SYMENGINE_LIBRARY
-    NAMES ${SYMENGINE_LIBRARY_NAME}
-    HINTS ${SYMENGINE_DIR}
-    PATH_SUFFIXES lib${LIB_SUFFIX} lib64 lib
-  )
+   IF (TARGET ${SYMENGINE_LIBRARY_NAME})
+       GET_PROPERTY(SYMENGINE_LIBRARY TARGET ${SYMENGINE_LIBRARY_NAME} PROPERTY LOCATION)
+   ELSE ()
+       SET(SYMENGINE_LIBRARY ${SYMENGINE_LIBRARY_NAME})
+   ENDIF()
 
   SET(_symengine_libraries ${_symengine_libraries} ${SYMENGINE_LIBRARY})
 ENDFOREACH()

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.