summaryrefslogtreecommitdiff
path: root/Modules/SelectLibraryConfigurations.cmake
diff options
context:
space:
mode:
authorDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-07-08 14:37:23 +0200
committerDaniele E. Domenichelli <daniele.domenichelli@iit.it>2013-07-10 15:06:01 +0200
commit07b44e7a1f3facf3b4300fb98bfa0705ef728bce (patch)
tree8515e648934ff08a0e37ada3bc7f9aba09e170dd /Modules/SelectLibraryConfigurations.cmake
parenta18e9586dbd7172911fde22b6b6331676b817e4d (diff)
downloadcmake-07b44e7a1f3facf3b4300fb98bfa0705ef728bce.tar.gz
SelectLibraryConfigurations: Do not cache the _LIBRARY variable
SelectLibraryConfigurations module currently cache and mark as advanced the variable ${basename}_LIBRARY. ${basename}_LIBRARY_RELEASE and ${basename}_LIBRARY_DEBUG are usually cached, because they often come from find_library(). ${basename}_LIBRARY on the other hand is always of type "optimized;${${basename}_LIBRARY_RELEASE};debug;${${basename}_LIBRARY_DEBUG}" or just "${basename}_LIBRARY_RELEASE" or "${basename}_LIBRARY_DEBUG" if only one version of the library is not found, if both have the same value, or if configuration types are not supported. Caching and marking as advanced just ${basename}_LIBRARY_RELEASE and ${basename}_LIBRARY_DEBUG is enough, just by modifying these two variables, the user has enough control on finding the library, and having 3 variables is redundant and confusing.
Diffstat (limited to 'Modules/SelectLibraryConfigurations.cmake')
-rw-r--r--Modules/SelectLibraryConfigurations.cmake6
1 files changed, 1 insertions, 5 deletions
diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake
index 5bca064f5a..f475d876da 100644
--- a/Modules/SelectLibraryConfigurations.cmake
+++ b/Modules/SelectLibraryConfigurations.cmake
@@ -73,15 +73,11 @@ macro( select_library_configurations basename )
endif()
endif()
- set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH
- "The ${basename} library" )
-
if( ${basename}_LIBRARY )
set( ${basename}_FOUND TRUE )
endif()
- mark_as_advanced( ${basename}_LIBRARY
- ${basename}_LIBRARY_RELEASE
+ mark_as_advanced( ${basename}_LIBRARY_RELEASE
${basename}_LIBRARY_DEBUG
)
endmacro()