Platform: Windows 7, cmake 3.7.2 installed in PATH. Cloned clucene from git master. Then
mkdir build cd buld cmake --debug-output .. <...> -- Looking for printf - not found Called from: [4] C:/Program Files (x86)/CMake/share/cmake-3.7/Modules/CheckFunctionExists.cma ke [3] F:/projects/clucene/src/shared/cmake/MacroMustDefine.cmake [2] F:/projects/clucene/src/shared/cmake/MacroMustDefine.cmake [1] F:/projects/clucene/src/shared/CMakeLists.txt CMake Error at src/shared/cmake/MacroMustDefine.cmake:45 (MESSAGE): printf could not be found Call Stack (most recent call first): src/shared/CMakeLists.txt:98 (CHECK_REQUIRED_FUNCTIONS) Called from: [2] F:/projects/clucene/src/shared/cmake/MacroMustDefine.cmake [1] F:/projects/clucene/src/shared/CMakeLists.txt Returning to F:/projects/clucene Called from: [1] F:/projects/clucene/CMakeLists.txt -- Configuring incomplete, errors occurred! See also "F:/projects/clucene/build/CMakeFiles/CMakeOutput.log". See also "F:/projects/clucene/build/CMakeFiles/CMakeError.log".
Files are attached
Just got the same error and fixed it by adding the following line to CMakelists.txt:
SET(CMAKE_REQUIRED_LIBRARIES legacy_stdio_definitions.lib). It is cmake bug https://cmake.org/Bug/view.php?id=15659