CMake cannot resolve runtime directory path

前端 未结 2 1005
悲哀的现实
悲哀的现实 2020-12-18 22:10

After running cmake CMakeLists.txt

I get the following warning

CMake Warning at src/CMakeLists.txt:32 (add_executable):
  Cannot generate a safe runt         


        
2条回答
  •  借酒劲吻你
    2020-12-18 22:50

    Your system libraries are conflicting with your local custom build Qt libraries. Its a warning but you might not get expected results in your application because of this. You need to tell CMake that it should exclude system path while searching for libraries in your CMakeModule. From this documentation

    If NO_DEFAULT_PATH is specified, then no additional paths are added to the search.

    Also in same documentation one more flag is mentioned NO_CMAKE_SYSTEM_PATH which only include platform specific default paths.

提交回复
热议问题