From a2099a8e8d2b97d2a2f91cbc06a4078f7c5b7139 Mon Sep 17 00:00:00 2001 From: Bjoern Thiel Date: Tue, 28 May 2013 05:25:00 -0400 Subject: [PATCH] SelectLibraryConfigurations: Fix for cached _LIBRARY The line set( ${basename}_LIBRARY ) removes the normal variable, but if the corresponding cached variable is present then line list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) uses that and fails. Replace the original line with set( ${basename}_LIBRARY "" ) to set the normal variable to empty instead of unsetting it. --- Modules/SelectLibraryConfigurations.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake index 62137bb28..5bca064f5 100644 --- a/Modules/SelectLibraryConfigurations.cmake +++ b/Modules/SelectLibraryConfigurations.cmake @@ -62,7 +62,7 @@ macro( select_library_configurations basename ) # if the generator supports configuration types or CMAKE_BUILD_TYPE # is set, then set optimized and debug options. if( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - set( ${basename}_LIBRARY ) + set( ${basename}_LIBRARY "" ) foreach( _libname IN LISTS ${basename}_LIBRARY_RELEASE ) list( APPEND ${basename}_LIBRARY optimized "${_libname}" ) endforeach()