diff options
author | David Cole <david.cole@kitware.com> | 2012-02-01 19:46:54 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-02-01 19:46:54 (GMT) |
commit | c8d102eb40f9a4d435538bde2254f79fb6d76354 (patch) | |
tree | 4f3a23693cd7226985b27c961cfe3bb0034641d2 | |
parent | a7c5a6896e440528bc4eafc4fc619539cb6323ce (diff) | |
parent | 1eaf1c9b0fae2142f8dca60f6b898afb74045058 (diff) | |
download | CMake-c8d102eb40f9a4d435538bde2254f79fb6d76354.zip CMake-c8d102eb40f9a4d435538bde2254f79fb6d76354.tar.gz CMake-c8d102eb40f9a4d435538bde2254f79fb6d76354.tar.bz2 |
Merge topic 'improve-selectlibraryconfigurations'
1eaf1c9 SelectLibraryConfigurations: do not output identical configurations
-rw-r--r-- | Modules/SelectLibraryConfigurations.cmake | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/SelectLibraryConfigurations.cmake b/Modules/SelectLibraryConfigurations.cmake index 51b4dda..2e8ade0 100644 --- a/Modules/SelectLibraryConfigurations.cmake +++ b/Modules/SelectLibraryConfigurations.cmake @@ -15,7 +15,6 @@ # basename_LIBRARY and basename_LIBRARIES will take only the release values. #============================================================================= -# Copyright 2009 Kitware, Inc. # Copyright 2009 Will Dicharry <wdicharry@stellarscience.com> # Copyright 2005-2009 Kitware, Inc. # @@ -49,7 +48,8 @@ macro( select_library_configurations basename ) # if only the debug version was found, set the release value to be the # debug value. _set_library_name( ${basename} DEBUG RELEASE ) - if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE ) + if (${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE AND + NOT ${basename}_LIBRARY_DEBUG STREQUAL ${basename}_LIBRARY_RELEASE) # 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 ) @@ -65,7 +65,7 @@ macro( select_library_configurations basename ) set( ${basename}_LIBRARY ${${basename}_LIBRARY_RELEASE} ) set( ${basename}_LIBRARIES ${${basename}_LIBRARY_RELEASE} ) endif( CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE ) - endif( ${basename}_LIBRARY_DEBUG AND ${basename}_LIBRARY_RELEASE ) + endif() set( ${basename}_LIBRARY ${${basename}_LIBRARY} CACHE FILEPATH "The ${basename} library" ) @@ -79,4 +79,3 @@ macro( select_library_configurations basename ) ${basename}_LIBRARY_DEBUG ) endmacro( select_library_configurations ) - |