How to fix 'Unknown CMake command "check_symbol_exists"'
If you have CMake code using check_symbol_exists(...) like
CMakeLists.txt
list(APPEND CMAKE_REQUIRED_LIBRARIES m)
check_symbol_exists(atan2 math.h HAVE_ATAN2)but you get an error message like
error_message.txt
CMake Error at CMakeLists.txt:8 (check_symbol_exists):
Unknown CMake command "check_symbol_exists".
-- Configuring incomplete, errors occurred!you need to add
CMakeLists_fixed.txt
include(CheckSymbolExists)near the top of your CMakeLists.txt (before your first call to check_symbol_exists()).
Check out similar posts by category:
CMake
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow