openssl-cmake icon indicating copy to clipboard operation
openssl-cmake copied to clipboard

CMake fails with "configure_file attempted to configure a file"

Open Stokestack opened this issue 3 years ago • 3 comments

I cloned the repo on a Raspberry Pi running Bullseye 64-bit. Running CMake in the root directory results in:

CMake Error at /usr/share/cmake-3.18/Modules/CheckIncludeFile.cmake:55 (configure_file):
  configure_file attempted to configure a file:
  /home/pi/dev/openssl-cmake/CMakeFiles/CMakeTmp/CheckIncludeFile.c into a
  source directory.
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/CheckTypeSize.cmake:230 (check_include_file)
  CMakeLists.txt:144 (check_type_size)

Anybody have an idea?

Stokestack avatar Aug 31 '22 00:08 Stokestack

Maybe you could try add_subdirectory(${your openssl path}) first, then call target_linklibrary(${your project} PRIVATE ssl crypto) in your CMakeLists

SakurayYuzuru avatar Oct 21 '25 07:10 SakurayYuzuru

You aren't authorized to launch the build in the source tree. So create a folder "build" , then type "cmake -B build/ -S ."

janbar avatar Oct 23 '25 16:10 janbar

Thanks guys! I now do not even know what I was working on when I filed this...

Stokestack avatar Nov 15 '25 05:11 Stokestack