BUG: Comparison of build tool should be case-insensitive.

This commit is contained in:
Brad King 2003-09-26 11:15:28 -04:00
parent ab28d3ea6e
commit a1d61afcf6
1 changed files with 4 additions and 2 deletions

View File

@ -21,10 +21,12 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
SET(CMAKE_BUILD_TOOL1 "")
IF(CMAKE_BUILD_TOOL)
GET_FILENAME_COMPONENT (CMAKE_BUILD_TOOL1 ${CMAKE_BUILD_TOOL} NAME_WE)
STRING(TOLOWER ${CMAKE_BUILD_TOOL1} CMAKE_BUILD_TOOL1)
ENDIF(CMAKE_BUILD_TOOL)
SET(CMAKE_BUILD_TOOL2 "")
IF(CMAKE_BUILD_SETTING_BUILD_TOOL)
GET_FILENAME_COMPONENT (CMAKE_BUILD_TOOL2 ${CMAKE_BUILD_SETTING_BUILD_TOOL} NAME_WE)
STRING(TOLOWER ${CMAKE_BUILD_TOOL2} CMAKE_BUILD_TOOL2)
ENDIF(CMAKE_BUILD_SETTING_BUILD_TOOL)
STRING(COMPARE NOTEQUAL "x${CMAKE_BUILD_TOOL1}" "x${CMAKE_BUILD_TOOL2}"
CMAKE_BUILD_TOOL_MISMATCH)
@ -87,8 +89,8 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
IF(CMAKE_BUILD_TOOL_MISMATCH)
MESSAGE(SEND_ERROR
"${CMAKE_BUILD_SETTING_PROJECT_NAME} was built using "
"\"${CMAKE_BUILD_SETTING_BUILD_TOOL}\", but ${PROJECT_NAME} "
"is using \"${CMAKE_BUILD_TOOL}\". The build will fail. "
"\"${CMAKE_BUILD_TOOL2}\", but ${PROJECT_NAME} "
"is using \"${CMAKE_BUILD_TOOL1}\". The build will fail. "
"Try selecting a different CMake Generator.")
ENDIF(CMAKE_BUILD_TOOL_MISMATCH)
ENDIF(WIN32)