CMakeLists.txt: Do not require C++ (#3956)
By default, the project() CMake command defaults to C and C++. [1] Therefore, CMake might perform tests for both C and C++ compilers as part of the configuration phase. However, this has the consequence of the configuration phase to fail if the system does not have a C++ toolchain installed, even if C++ is not really used by the top-level project under the default settings. Some configurations might still require a C++ toolchain, so enable_language is selectively called under such circumstances. [1]: https://cmake.org/cmake/help/latest/command/project.html
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
set (IWASM_COMPL_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
|
||||
include_directories(${IWASM_COMPL_DIR})
|
||||
enable_language(CXX)
|
||||
|
||||
if (WAMR_BUILD_DEBUG_AOT EQUAL 1)
|
||||
file (GLOB_RECURSE source_all
|
||||
|
||||
@ -9,6 +9,7 @@ if (WAMR_BUILD_FAST_JIT_DUMP EQUAL 1)
|
||||
endif ()
|
||||
|
||||
include_directories (${IWASM_FAST_JIT_DIR})
|
||||
enable_language(CXX)
|
||||
|
||||
if (WAMR_BUILD_TARGET STREQUAL "X86_64" OR WAMR_BUILD_TARGET STREQUAL "AMD_64")
|
||||
include(FetchContent)
|
||||
|
||||
@ -22,6 +22,7 @@ add_compile_definitions(
|
||||
# - tflite
|
||||
if(WAMR_BUILD_WASI_NN_TFLITE EQUAL 1)
|
||||
find_package(tensorflow_lite REQUIRED)
|
||||
enable_language(CXX)
|
||||
|
||||
add_library(
|
||||
wasi_nn_tflite
|
||||
|
||||
Reference in New Issue
Block a user