Repository navigation
Open
Description
- When compiling the nmos cpp source code using cmake on Ubuntu 22.04 system, the following error occurs:
CMake Error: CMAKE_PROJECT_TOP_LEVEL_INCLUDES file does not exist: third_party/cmake/conan_provider.cmake
CMake Error at CMakeLists.txt:16 (enable_language):
Language 'CXX' is currently being enabled. Recursive call not allowed.
-- Configuring incomplete, errors occurred!
See also "/home/gule/nmos-cpp/Development/CMakeFiles/CMakeOutput.log".
2 The configuration of the cmake configuration file CMakeLists.txt is as follows:
# the injection point may be used to configure conan, but that requires CMake 3.24 or higher
# so avoid confusion and reject invocations which attempt to use it on lower versions
# see https://cmake.org/cmake/help/v3.24/variable/CMAKE_PROJECT_TOP_LEVEL_INCLUDES.html
# the alternative is to run conan install first instead
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/Development/cmake")
if(CMAKE_PROJECT_TOP_LEVEL_INCLUDES)
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
else()
cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
endif()
#cmake_minimum_required(VERSION 3.17 FATAL_ERROR)
# project name
project(nmos-cpp)
enable_language(CXX)
# enable or disable the example applications
set(NMOS_CPP_BUILD_EXAMPLES ON CACHE BOOL "Build example applications")
# enable or disable the unit test suite
set(NMOS_CPP_BUILD_TESTS ON CACHE BOOL "Build test suite application")
# enable or disable the LLDP support library (lldp)
# and its additional dependencies
set(NMOS_CPP_BUILD_LLDP OFF CACHE BOOL "Build LLDP support library")
mark_as_advanced(FORCE NMOS_CPP_BUILD_LLDP)
# common config
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppCommon.cmake)
# nmos-cpp dependencies
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppDependencies.cmake)
# nmos-cpp libraries
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppLibraries.cmake)
if(NMOS_CPP_BUILD_EXAMPLES)
# nmos-cpp-node executable
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppNode.cmake)
# nmos-cpp-registry executable
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppRegistry.cmake)
endif()
if(NMOS_CPP_BUILD_TESTS)
# nmos-cpp-test executable
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppTest.cmake)
endif()
# export the config-file package
include(${CMAKE_SOURCE_DIR}/Development/cmake/NmosCppExports.cmake)
Can you give me some advice?
Metadata
Metadata
Assignees
Labels
No labels
Activity
jonathan-r-thorpe commentedon Feb 13, 2025
It seems that CMake is not finding the
conan_provider.cmakefile.You could verify that it is in the file system; it should be found in the
Development\third_party\cmakedirectory.Then make sure that CMake is being run from the correct directory as per the Getting Started instructions:
gl0522 commentedon Feb 21, 2025
Use the following instructions to perform compilation, but the result is as follows
But there is indeed conad_vider.cmake in the Development/cmake foldergule@gule-VirtualBox:
/nmos-cpp/Development/cmake$ ls/nmos-cpp/Development/cmake$ pwdCMakeRegexEscape.cmake NmosCppCompileSettings.cmake NmosCppExports.cmake NmosCppRegistry.cmake
conan_provider.cmake nmos-cpp-config.cmake.in NmosCppLibraries.cmake NmosCppTest.cmake
NmosCppCommon.cmake NmosCppDependencies.cmake NmosCppNode.cmake
gule@gule-VirtualBox:
/home/gule/nmos-cpp/Development/cmake
What a headache inducing problem
jonathan-r-thorpe commentedon Feb 21, 2025
The location of your
conan_provider.cmakefile is incorrect for some reason.CMake expects it to be in the relative location
third_party/cmake/conan_provider.cmakewhich you'll see from the error message you're getting.The absolute location for you would therefore be
~/nmos-cpp/Development/third_party/cmake/conan_provider.cmakeand not in~/nmos-cpp/Development/cmake/conan_provider.cmakewhere you seem to have it.