From 459739678443d2d2074d6e1475e4267c6c110e05 Mon Sep 17 00:00:00 2001 From: Gregor Jasny Date: Sun, 15 Apr 2018 21:47:10 +0200 Subject: [PATCH] Apple: Use include_guard() within compiler config --- Modules/Platform/Apple-Clang.cmake | 5 +---- Modules/Platform/Apple-GNU.cmake | 5 +---- Modules/Platform/Apple-Intel.cmake | 5 +---- Modules/Platform/Apple-PGI.cmake | 5 +---- 4 files changed, 4 insertions(+), 16 deletions(-) diff --git a/Modules/Platform/Apple-Clang.cmake b/Modules/Platform/Apple-Clang.cmake index 70fc75e9d5..0681bfb059 100644 --- a/Modules/Platform/Apple-Clang.cmake +++ b/Modules/Platform/Apple-Clang.cmake @@ -3,10 +3,7 @@ # This module is shared by multiple languages; use include blocker. -if(__APPLE_COMPILER_CLANG) - return() -endif() -set(__APPLE_COMPILER_CLANG 1) +include_guard() macro(__apple_compiler_clang lang) set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output diff --git a/Modules/Platform/Apple-GNU.cmake b/Modules/Platform/Apple-GNU.cmake index 9985dddd7d..0eb8168310 100644 --- a/Modules/Platform/Apple-GNU.cmake +++ b/Modules/Platform/Apple-GNU.cmake @@ -3,10 +3,7 @@ # This module is shared by multiple languages; use include blocker. -if(__APPLE_COMPILER_GNU) - return() -endif() -set(__APPLE_COMPILER_GNU 1) +include_guard() macro(__apple_compiler_gnu lang) set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output diff --git a/Modules/Platform/Apple-Intel.cmake b/Modules/Platform/Apple-Intel.cmake index 9f92d9592a..2d4f7e5917 100644 --- a/Modules/Platform/Apple-Intel.cmake +++ b/Modules/Platform/Apple-Intel.cmake @@ -3,10 +3,7 @@ # This module is shared by multiple languages; use include blocker. -if(__APPLE_COMPILER_INTEL) - return() -endif() -set(__APPLE_COMPILER_INTEL 1) +include_guard() macro(__apple_compiler_intel lang) set(CMAKE_${lang}_VERBOSE_FLAG "-v -Wl,-v") # also tell linker to print verbose output diff --git a/Modules/Platform/Apple-PGI.cmake b/Modules/Platform/Apple-PGI.cmake index a68c08dea7..8d343b7d16 100644 --- a/Modules/Platform/Apple-PGI.cmake +++ b/Modules/Platform/Apple-PGI.cmake @@ -2,10 +2,7 @@ # file Copyright.txt or https://cmake.org/licensing for details. # This module is shared by multiple languages; use include blocker. -if(__APPLE_COMPILER_PGI) - return() -endif() -set(__APPLE_COMPILER_PGI 1) +include_guard() macro(__apple_compiler_pgi lang) set(CMAKE_${lang}_OSX_COMPATIBILITY_VERSION_FLAG "-Wl,-compatibility_version,")