如何使用 cmake 删除 --enable-auto-import 警告
我收到此链接器警告。我如何使用 cmake 修复它?这是我的根 CMakeLists.txt:
# CMakeLists.txt /
cmake_minimum_required(VERSION 2.8)
project(FactoryPattern)
include_directories(stores/include)
add_subdirectory(factories)
add_subdirectory(ingredients)
add_subdirectory(stores)
add_executable(factory MyPizzaStore.cpp)
target_link_libraries(factory pizzaStore)
im getting this linker warning. how do i fix it using cmake? here's my root CMakeLists.txt:
# CMakeLists.txt /
cmake_minimum_required(VERSION 2.8)
project(FactoryPattern)
include_directories(stores/include)
add_subdirectory(factories)
add_subdirectory(ingredients)
add_subdirectory(stores)
add_executable(factory MyPizzaStore.cpp)
target_link_libraries(factory pizzaStore)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
经过大量搜索后终于找到了答案:
学习 cmake 并不容易,因为它的文档很糟糕。 《掌握cmake》一书应该是免费的。摘录一章是不行的。
finally found the answer after a lot of searching:
learning cmake isn't easy bcoz of its bad documentation. "mastering cmake" book should be made free. excerpt of a chapter wont do.
对于共享库,我还必须设置:
For shared libraries, I also had to set this: