Right now the check for the presence of hunspell.hxx in ConfigureChecks.cmake always fails for me (MacOS10.14, master build) with the result `HAVE_HUNSPELL_CXXABI = FALSE`, although hunspell.hxx is available. That's a minor issue since hunspell works anyway, but the check seems useless now.

To proceed the check should include a `LINK_LIBRARIES` entry in the try_compile() step. Also the `hunspell` in the `#include <hunspell/hunspell.hxx>` instruction in the test file should be removed. It should be included in the `HUNSPELL_INCLUDE_DIR` definition.

With these changes `HAVE_HUNSPELL_CXXABI = TRUE` (supposed hunspell.hxx is present).

I don't understand the
"-DCMAKE_CXX_LINK_EXECUTABLE='${CMAKE_COMMAND} echo not linking now...'"
entry which contained a typo anyway. It sounds like one wanted to avoid the linking in which case the LINK_LIBRARIES is indeed not needed.



Patrick
diff --git a/development/cmake/ConfigureChecks.cmake 
b/development/cmake/ConfigureChecks.cmake
index 4b126776ea..b78d8ef14e 100644
--- a/development/cmake/ConfigureChecks.cmake
+++ b/development/cmake/ConfigureChecks.cmake
@@ -77,7 +77,7 @@ if(HUNSPELL_FOUND)
   set(HunspellTestFile "${CMAKE_BINARY_DIR}/hunspelltest.cpp")
   file(WRITE "${HunspellTestFile}"
   "
-  #include <hunspell/hunspell.hxx>
+  #include <hunspell.hxx>
 
   int main()
   {
@@ -93,7 +93,9 @@ if(HUNSPELL_FOUND)
     "${HunspellTestFile}"
     CMAKE_FLAGS
       "-DINCLUDE_DIRECTORIES:STRING=${HUNSPELL_INCLUDE_DIR}"
-      "-DCMAKE_CXX_LINK_EXECUTABLE='${CMAKE_COMMAD} echo not linking now...'"
+      "-DCMAKE_CXX_LINK_EXECUTABLE='${CMAKE_COMMAND} echo not linking now...'"
+    LINK_LIBRARIES
+      "${HUNSPELL_LIBRARY}"
   OUTPUT_VARIABLE  LOG2)
 
   message(STATUS "HAVE_HUNSPELL_CXXABI = ${HAVE_HUNSPELL_CXXABI}")
-- 
lyx-devel mailing list
lyx-devel@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-devel

Reply via email to