C++ 目标平台无法创建共享库

C++ 目标平台无法创建共享库,c++,gcc,compilation,cmake,C++,Gcc,Compilation,Cmake,我正在使用cmake编译代码。在中,我使用了“共享”选项创建共享库。但是,在使用cmake编译时,我遇到了以下错误: ADD_LIBRARY for library GenericUSMModules is used with the SHARED option, but the target platform supports only STATIC libraries. Building it STATIC instead. This may lead to problems. AD

我正在使用cmake编译代码。在中,我使用了“共享”选项创建共享库。但是,在使用cmake编译时,我遇到了以下错误:

 ADD_LIBRARY for library GenericUSMModules is used with the SHARED option, but the target platform supports only STATIC libraries. Building
 it STATIC instead. This may lead to problems.

 ADD_LIBRARY for library XXXaUSMModules is used with the SHARED option, but the target platform supports only STATIC libraries. Building
 it STATIC instead. This may lead to problems.
它正在创建libGenericUSMModules.a(静态库)和libXXXUSMModules.a,而不是so文件。我想知道是否可以为每个存档文件(如libGenericUSMModules.so和libXXXUSMModules.a)创建共享库,同时将其与静态库libGCVCore.a链接在同一位置。
谢谢

问题出在我使用的cmake上。它是一个旧版本。我安装了最新版本的cmake,编译的代码没有任何问题