Don't patch CMakeDetermineCompilerId.cmake in CMake 3.0 or newer
This commit is contained in:
parent
8f6d6ee929
commit
5e49d9ae36
1 changed files with 2 additions and 2 deletions
|
@ -120,7 +120,7 @@ if(NOT CMAKE_D_COMPILER_ID_RUN)
|
|||
# Workaround for bug http://public.kitware.com/Bug/view.php?id=14481
|
||||
# if CMAKE_MODULE_PATH is used, then patch ${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake
|
||||
get_filename_component(CMAKE_D_COMPILER_ID_FILE_IN_PATH ${CMAKE_D_COMPILER_ID_FILE_IN} PATH)
|
||||
if(CMAKE_D_COMPILER_ID_FILE_IN_PATH STREQUAL ${CMAKE_ROOT}/Modules)
|
||||
if(CMAKE_MAJOR_VERSION GREATER 2 OR CMAKE_D_COMPILER_ID_FILE_IN_PATH STREQUAL ${CMAKE_ROOT}/Modules)
|
||||
include(${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake)
|
||||
else(CMAKE_D_COMPILER_ID_FILE_IN_PATH STREQUAL ${CMAKE_ROOT}/Modules)
|
||||
file(READ ${CMAKE_ROOT}/Modules/CMakeDetermineCompilerId.cmake CMAKE_DETERMINE_COMPILER_ID_CMAKE_CONTENT)
|
||||
|
@ -132,7 +132,7 @@ if(NOT CMAKE_D_COMPILER_ID_RUN)
|
|||
file(WRITE ${CMAKE_PLATFORM_INFO_DIR}/CMakeDetermineCompilerId.cmake
|
||||
${CMAKE_DETERMINE_COMPILER_ID_CMAKE_CONTENT_PATCHED})
|
||||
include(${CMAKE_PLATFORM_INFO_DIR}/CMakeDetermineCompilerId.cmake)
|
||||
endif(CMAKE_D_COMPILER_ID_FILE_IN_PATH STREQUAL ${CMAKE_ROOT}/Modules)
|
||||
endif(CMAKE_MAJOR_VERSION GREATER 2 OR CMAKE_D_COMPILER_ID_FILE_IN_PATH STREQUAL ${CMAKE_ROOT}/Modules)
|
||||
CMAKE_DETERMINE_COMPILER_ID(D DFLAGS CMakeDCompilerId.d)
|
||||
unset(CMAKE_D_COMPILER_ID_FILE_IN CACHE)
|
||||
unset(CMAKE_PLATFORM_ID_CONTENT_FILE CACHE)
|
||||
|
|
Loading…
Reference in a new issue