Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/sql-server/22.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Visual studio 奇怪的cmake目标链接库行为_Visual Studio_Cmake - Fatal编程技术网

Visual studio 奇怪的cmake目标链接库行为

Visual studio 奇怪的cmake目标链接库行为,visual-studio,cmake,Visual Studio,Cmake,我使用target_link_库链接到一些外部库,如下所示: target_link_libraries( MyApp ${OTHERLIB_LIBRARIES} ) 其中OTHERLIB_库设置为 set( OTHERLIB_LIBRARIES debug mathd networkd optimized math network ) 现在有趣的是,VisualStudio链接器行包括调试和优化的libs:mathd networkd math network 我知道这种用法是有效的,但我

我使用target_link_库链接到一些外部库,如下所示:

target_link_libraries( MyApp ${OTHERLIB_LIBRARIES} )
其中OTHERLIB_库设置为

set( OTHERLIB_LIBRARIES debug mathd networkd optimized math network )
现在有趣的是,VisualStudio链接器行包括调试和优化的libs:mathd networkd math network

我知道这种用法是有效的,但我找不到什么会导致这种用法失效

Cmake 2.8.3和Visual Studio 2005

有什么想法吗?

你能试试:

set( OTHERLIB_LIBRARIES debug mathd debug networkd optimized math optimized network )