I have a tiny library with its own cmake file. I am trying to add this library to the platformio ploject.
I create a “CMakeLists.txt” and add this line “add_subdirectory(GLibc)” here and when I reload the cmake project I get an infinite loop
CMakeListsUser.txt
add_subdirectory(GCLib)
Library cmake file:
cmake_minimum_required(VERSION 3.24)
project("GCLib" VERSION 1.0.0 LANGUAGES C CXX DESCRIPTION "Library for C++")
set(PROJECT_PREFIX GCLib-${GCLib_VERSION})
include(CMakeListsOptions.txt)
include(CMakeListsFiles.txt)
add_library(GCLib
${HEADER_FILES}
${SOURCE_FILES})
add_library(GCLib::GCLib ALIAS GCLib)
target_include_directories(GCLib
PUBLIC
$<BUILD_INTERFACE:${GCLib_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include/${PROJECT_PREFIX}>
PRIVATE
src)
export(PACKAGE GCLib)
Terminal:
-- The C compiler identification is GNU 11.2.0
-- The CXX compiler identification is GNU 11.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Tiny mode is enable
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= C:/Program Files/JetBrains/CLion 2022.3.2/bin/mingw/bin/gcc.exe
CMAKE_CXX_COMPILER= C:/Program Files/JetBrains/CLion 2022.3.2/bin/mingw/bin/g++.exe
How can I fix this? Sorry, but I’m new to cmake