summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeDetermineCompilerId.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-06-25 19:15:17 (GMT)
committerBrad King <brad.king@kitware.com>2015-06-25 19:16:53 (GMT)
commit8306108fd6ed58833d5d33cf6425665457dcd902 (patch)
tree71b5b686730b962f9a58720199189f8fd6a34650 /Modules/CMakeDetermineCompilerId.cmake
parent2fd05f411b758e4060b537a6c9461634ad1362b2 (diff)
downloadCMake-8306108fd6ed58833d5d33cf6425665457dcd902.zip
CMake-8306108fd6ed58833d5d33cf6425665457dcd902.tar.gz
CMake-8306108fd6ed58833d5d33cf6425665457dcd902.tar.bz2
CMakeDetermineCompilerId: Simplify src reference in IDE projects
When constructing the "id_src" value for substitution into VS or Xcode compiler id projects, the input "src" variable already contains the file name with no path so we do not need get_filename_component. We know this because CMAKE_DETERMINE_COMPILER_ID_WRITE already references "${src}" with this assumption.
Diffstat (limited to 'Modules/CMakeDetermineCompilerId.cmake')
-rw-r--r--Modules/CMakeDetermineCompilerId.cmake4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 68f2194..487429b 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -217,7 +217,7 @@ Id flags: ${testflags}
set(id_subsystem 1)
endif()
set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
- get_filename_component(id_src "${src}" NAME)
+ set(id_src "${src}")
configure_file(${CMAKE_ROOT}/Modules/CompilerId/VS-${v}.${ext}.in
${id_dir}/CompilerId${lang}.${ext} @ONLY)
if(CMAKE_VS_MSBUILD_COMMAND AND NOT lang STREQUAL "Fortran")
@@ -256,7 +256,7 @@ Id flags: ${testflags}
set(id_lang "${lang}")
set(id_type ${CMAKE_${lang}_COMPILER_XCODE_TYPE})
set(id_dir ${CMAKE_${lang}_COMPILER_ID_DIR})
- get_filename_component(id_src "${src}" NAME)
+ set(id_src "${src}")
if(CMAKE_XCODE_PLATFORM_TOOLSET)
set(id_toolset "GCC_VERSION = ${CMAKE_XCODE_PLATFORM_TOOLSET};")
else()