ENH: Using only filename without path or extension for comparing build tools.

This commit is contained in:
Brad King 2002-12-09 14:33:48 -05:00
parent fdd4cf7cf4
commit f9eb32fc6e
1 changed files with 9 additions and 2 deletions

View File

@ -18,8 +18,15 @@ MACRO(CMAKE_IMPORT_BUILD_SETTINGS SETTINGS_FILE)
GREATER ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION})
# Check the build tool.
STRING(COMPARE NOTEQUAL
"x${CMAKE_BUILD_TOOL}" "x${CMAKE_BUILD_SETTING_BUILD_TOOL}"
SET(CMAKE_BUILD_TOOL1 "")
IF(CMAKE_BUILD_TOOL)
GET_FILENAME_COMPONENT (CMAKE_BUILD_TOOL1 ${CMAKE_BUILD_TOOL} NAME_WE)
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)
ENDIF(CMAKE_BUILD_SETTING_BUILD_TOOL)
STRING(COMPARE NOTEQUAL "x${CMAKE_BUILD_TOOL1}" "x${CMAKE_BUILD_TOOL2}"
CMAKE_BUILD_TOOL_MISMATCH)
IF(CMAKE_BUILD_SETTING_BUILD_TOOL MATCHES "^msdev$")