diff --git a/cmake/lemon_CMakeLists.txt.in b/cmake/lemon_CMakeLists.txt.in index f77f48217f..08295adb26 100644 --- a/cmake/lemon_CMakeLists.txt.in +++ b/cmake/lemon_CMakeLists.txt.in @@ -1,10 +1,11 @@ # lemon - ExternalProject_Add( - lemon - URL https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release - CONFIGURE_COMMAND "" - BUILD_COMMAND ${CMAKE_C_COMPILER} -o ${TD_CONTRIB_DIR}/deps-download/lemon-prefix/src/lemon/tool/lemon ${TD_CONTRIB_DIR}/deps-download/lemon-prefix/src/lemon/tool/lemon.c - INSTALL_COMMAND "" - BUILD_IN_SOURCE 1 - BUILD_ALWAYS 1 - ) \ No newline at end of file + +ExternalProject_Add( + lemon + URL https://www.sqlite.org/src/tarball/sqlite.tar.gz?r=release + CONFIGURE_COMMAND "" + BUILD_COMMAND ${C_COMPILER_LEMON} -o ${TD_CONTRIB_DIR}/deps-download/lemon-prefix/src/lemon/tool/lemon ${TD_CONTRIB_DIR}/deps-download/lemon-prefix/src/lemon/tool/lemon.c + INSTALL_COMMAND "" + BUILD_IN_SOURCE 1 + BUILD_ALWAYS 1 +) \ No newline at end of file diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt index 4ac32ed825..0899e5d02f 100644 --- a/contrib/CMakeLists.txt +++ b/contrib/CMakeLists.txt @@ -184,6 +184,14 @@ if(${BUILD_PCRE2}) cat("${TD_SUPPORT_DIR}/pcre2_CMakeLists.txt.in" ${CONTRIB_TMP_FILE}) endif() +find_program(C_COMPILER_LEMON NAMES gcc) +if(C_COMPILER_LEMON) + message(STATUS "LEMON C compiler: ${C_COMPILER_LEMON}") +else() + set(C_COMPILER_LEMON CMAKE_C_COMPILER) + message(STATUS "LEMON C compiler: ${C_COMPILER_LEMON}") +endif() + # lemon cat("${TD_SUPPORT_DIR}/lemon_CMakeLists.txt.in" ${CONTRIB_TMP_FILE})