From f3eca1ef6b6d7ff43b63d0f9f49c96e781fa9c37 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 5 Dec 2002 10:34:50 -0500 Subject: [PATCH] BUG: Fix for string comparison when one string is empty. --- Modules/CMakeImportBuildSettings.cmake | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Modules/CMakeImportBuildSettings.cmake b/Modules/CMakeImportBuildSettings.cmake index 7632b137e..a2525ec4c 100644 --- a/Modules/CMakeImportBuildSettings.cmake +++ b/Modules/CMakeImportBuildSettings.cmake @@ -19,7 +19,7 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE) # Check the build tool. STRING(COMPARE NOTEQUAL - "${CMAKE_BUILD_TOOL}" "${CMAKE_BUILD_SETTING_BUILD_TOOL}" + "x${CMAKE_BUILD_TOOL}" "x${CMAKE_BUILD_SETTING_BUILD_TOOL}" CMAKE_BUILD_TOOL_MISMATCH) IF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^msdev$") @@ -33,36 +33,36 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE) # project is not a C++ project, and doesn't need a matching compiler. IF(CMAKE_BUILD_SETTING_CXX_COMPILER) STRING(COMPARE NOTEQUAL - "${CMAKE_CXX_COMPILER}" "${CMAKE_BUILD_SETTING_CXX_COMPILER}" + "x${CMAKE_CXX_COMPILER}" "x${CMAKE_BUILD_SETTING_CXX_COMPILER}" CMAKE_CXX_COMPILER_MISMATCH) ENDIF(CMAKE_BUILD_SETTING_CXX_COMPILER) # Check the C build variation flags. STRING(COMPARE NOTEQUAL - "${CMAKE_C_FLAGS_DEBUG}" "${CMAKE_BUILD_SETTING_C_FLAGS_DEBUG}" + "x${CMAKE_C_FLAGS_DEBUG}" "x${CMAKE_BUILD_SETTING_C_FLAGS_DEBUG}" CMAKE_C_FLAGS_DEBUG_MISMATCH) STRING(COMPARE NOTEQUAL - "${CMAKE_C_FLAGS_RELEASE}" "${CMAKE_BUILD_SETTING_C_FLAGS_RELEASE}" + "x${CMAKE_C_FLAGS_RELEASE}" "x${CMAKE_BUILD_SETTING_C_FLAGS_RELEASE}" CMAKE_C_FLAGS_RELEASE_MISMATCH) STRING(COMPARE NOTEQUAL - "${CMAKE_C_FLAGS_MINSIZEREL}" "${CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL}" + "x${CMAKE_C_FLAGS_MINSIZEREL}" "x${CMAKE_BUILD_SETTING_C_FLAGS_MINSIZEREL}" CMAKE_C_FLAGS_MINSIZEREL_MISMATCH) STRING(COMPARE NOTEQUAL - "${CMAKE_C_FLAGS_RELWITHDEBINFO}" "${CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO}" + "x${CMAKE_C_FLAGS_RELWITHDEBINFO}" "x${CMAKE_BUILD_SETTING_C_FLAGS_RELWITHDEBINFO}" CMAKE_C_FLAGS_RELWITHDEBINFO_MISMATCH) # Check the C++ build variation flags. STRING(COMPARE NOTEQUAL - "${CMAKE_CXX_FLAGS_DEBUG}" "${CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG}" + "x${CMAKE_CXX_FLAGS_DEBUG}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_DEBUG}" CMAKE_CXX_FLAGS_DEBUG_MISMATCH) STRING(COMPARE NOTEQUAL - "${CMAKE_CXX_FLAGS_RELEASE}" "${CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE}" + "x${CMAKE_CXX_FLAGS_RELEASE}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_RELEASE}" CMAKE_CXX_FLAGS_RELEASE_MISMATCH) STRING(COMPARE NOTEQUAL - "${CMAKE_CXX_FLAGS_MINSIZEREL}" "${CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL}" + "x${CMAKE_CXX_FLAGS_MINSIZEREL}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_MINSIZEREL}" CMAKE_CXX_FLAGS_MINSIZEREL_MISMATCH) STRING(COMPARE NOTEQUAL - "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" "${CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO}" + "x${CMAKE_CXX_FLAGS_RELWITHDEBINFO}" "x${CMAKE_BUILD_SETTING_CXX_FLAGS_RELWITHDEBINFO}" CMAKE_CXX_FLAGS_RELWITHDEBINFO_MISMATCH) # Check the build type. @@ -70,7 +70,7 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE) IF(WIN32) IF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO) STRING(COMPARE NOTEQUAL - "${CMAKE_BUILD_TYPE}" "${CMAKE_BUILD_SETTING_BUILD_TYPE}" + "x${CMAKE_BUILD_TYPE}" "x${CMAKE_BUILD_SETTING_BUILD_TYPE}" CMAKE_BUILD_TYPE_MISMATCH) ENDIF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO) ENDIF(WIN32)