diff options
author | Brad King <brad.king@kitware.com> | 2009-10-05 15:47:25 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-10-05 15:47:25 (GMT) |
commit | f98a4e63fd645411be939db05fb5857c395b3507 (patch) | |
tree | 481539a318260416f68305101115ab4212e08c78 /Modules/Platform | |
parent | 3dc80f8d8cc71a68de37fb22582e59705fdb2d59 (diff) | |
download | CMake-f98a4e63fd645411be939db05fb5857c395b3507.zip CMake-f98a4e63fd645411be939db05fb5857c395b3507.tar.gz CMake-f98a4e63fd645411be939db05fb5857c395b3507.tar.bz2 |
Avoid (Unix|Windows)Paths.cmake multiple include
Block multiple inclusion because "Modules/CMakeCInformation.cmake"
includes "Platform/${CMAKE_SYSTEM_NAME}" even though the generic
module "CMakeSystemSpecificInformation.cmake" already included it.
The extra inclusion is a work-around to address issue #4772 without
intrusive platform file changes. Once those changes are made the
work-around and these include blockers can be removed. See issue #9656.
Diffstat (limited to 'Modules/Platform')
-rw-r--r-- | Modules/Platform/UnixPaths.cmake | 10 | ||||
-rw-r--r-- | Modules/Platform/WindowsPaths.cmake | 10 |
2 files changed, 20 insertions, 0 deletions
diff --git a/Modules/Platform/UnixPaths.cmake b/Modules/Platform/UnixPaths.cmake index 7cc5181..ea64b78 100644 --- a/Modules/Platform/UnixPaths.cmake +++ b/Modules/Platform/UnixPaths.cmake @@ -12,6 +12,16 @@ # (To distributed this file outside of CMake, substitute the full # License text for the above reference.) +# Block multiple inclusion because "CMakeCInformation.cmake" includes +# "Platform/${CMAKE_SYSTEM_NAME}" even though the generic module +# "CMakeSystemSpecificInformation.cmake" already included it. +# The extra inclusion is a work-around documented next to the include() +# call, so this can be removed when the work-around is removed. +IF(__UNIX_PATHS_INCLUDED) + RETURN() +ENDIF() +SET(__UNIX_PATHS_INCLUDED 1) + SET(UNIX 1) # also add the install directory of the running cmake to the search directories diff --git a/Modules/Platform/WindowsPaths.cmake b/Modules/Platform/WindowsPaths.cmake index 009f56b..8c67175 100644 --- a/Modules/Platform/WindowsPaths.cmake +++ b/Modules/Platform/WindowsPaths.cmake @@ -12,6 +12,16 @@ # (To distributed this file outside of CMake, substitute the full # License text for the above reference.) +# Block multiple inclusion because "CMakeCInformation.cmake" includes +# "Platform/${CMAKE_SYSTEM_NAME}" even though the generic module +# "CMakeSystemSpecificInformation.cmake" already included it. +# The extra inclusion is a work-around documented next to the include() +# call, so this can be removed when the work-around is removed. +IF(__WINDOWS_PATHS_INCLUDED) + RETURN() +ENDIF() +SET(__WINDOWS_PATHS_INCLUDED 1) + # Add the program-files folder(s) to the list of installation # prefixes. # |