Check for hunspell.hxx always fails

pdv pdvisschere at
Thu Nov 28 12:38:26 UTC 2019

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.

-------------- next part --------------
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)
-      "-DCMAKE_CXX_LINK_EXECUTABLE='${CMAKE_COMMAD} echo not linking now...'"
+      "-DCMAKE_CXX_LINK_EXECUTABLE='${CMAKE_COMMAND} echo not linking now...'"

More information about the lyx-devel mailing list