Commit f3eca1ef authored by Brad King's avatar Brad King
Browse files

BUG: Fix for string comparison when one string is empty.

parent ee72d574
...@@ -19,7 +19,7 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE) ...@@ -19,7 +19,7 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
# Check the build tool. # Check the build tool.
STRING(COMPARE NOTEQUAL 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) CMAKE_BUILD_TOOL_MISMATCH)
IF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^msdev$") IF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^msdev$")
...@@ -33,36 +33,36 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE) ...@@ -33,36 +33,36 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
# project is not a C++ project, and doesn't need a matching compiler. # project is not a C++ project, and doesn't need a matching compiler.
IF(CMAKE_BUILD_SETTING_CXX_COMPILER) IF(CMAKE_BUILD_SETTING_CXX_COMPILER)
STRING(COMPARE NOTEQUAL 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) CMAKE_CXX_COMPILER_MISMATCH)
ENDIF(CMAKE_BUILD_SETTING_CXX_COMPILER) ENDIF(CMAKE_BUILD_SETTING_CXX_COMPILER)
# Check the C build variation flags. # Check the C build variation flags.
STRING(COMPARE NOTEQUAL 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) CMAKE_C_FLAGS_DEBUG_MISMATCH)
STRING(COMPARE NOTEQUAL 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) CMAKE_C_FLAGS_RELEASE_MISMATCH)
STRING(COMPARE NOTEQUAL 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) CMAKE_C_FLAGS_MINSIZEREL_MISMATCH)
STRING(COMPARE NOTEQUAL 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) CMAKE_C_FLAGS_RELWITHDEBINFO_MISMATCH)
# Check the C++ build variation flags. # Check the C++ build variation flags.
STRING(COMPARE NOTEQUAL 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) CMAKE_CXX_FLAGS_DEBUG_MISMATCH)
STRING(COMPARE NOTEQUAL 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) CMAKE_CXX_FLAGS_RELEASE_MISMATCH)
STRING(COMPARE NOTEQUAL 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) CMAKE_CXX_FLAGS_MINSIZEREL_MISMATCH)
STRING(COMPARE NOTEQUAL 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) CMAKE_CXX_FLAGS_RELWITHDEBINFO_MISMATCH)
# Check the build type. # Check the build type.
...@@ -70,7 +70,7 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE) ...@@ -70,7 +70,7 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
IF(WIN32) IF(WIN32)
IF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO) IF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO)
STRING(COMPARE NOTEQUAL 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) CMAKE_BUILD_TYPE_MISMATCH)
ENDIF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO) ENDIF(NOT CMAKE_IMPORT_BUILD_SETTINGS_IMPORTING_FROM_MS_STUDIO)
ENDIF(WIN32) ENDIF(WIN32)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment