summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeCompilerIdDetection.cmake12
-rw-r--r--Modules/GNUInstallDirs.cmake1
2 files changed, 7 insertions, 6 deletions
diff --git a/Modules/CMakeCompilerIdDetection.cmake b/Modules/CMakeCompilerIdDetection.cmake
index 2197790..dd70d82 100644
--- a/Modules/CMakeCompilerIdDetection.cmake
+++ b/Modules/CMakeCompilerIdDetection.cmake
@@ -13,8 +13,8 @@ endfunction()
function(compiler_id_detection outvar lang)
- if (NOT lang STREQUAL Fortran AND NOT lang STREQUAL CSharp
- AND NOT lang STREQUAL ISPC)
+ if (NOT "x${lang}" STREQUAL "xFortran" AND NOT "x${lang}" STREQUAL "xCSharp"
+ AND NOT "x${lang}" STREQUAL "xISPC")
file(GLOB lang_files
"${CMAKE_ROOT}/Modules/Compiler/*-DetermineCompiler.cmake")
set(nonlang CXX)
@@ -42,7 +42,7 @@ function(compiler_id_detection outvar lang)
# Order is relevant here. For example, compilers which pretend to be
# GCC must appear before the actual GCC.
- if (lang STREQUAL CXX)
+ if ("x${lang}" STREQUAL "xCXX")
list(APPEND ordered_compilers
Comeau
)
@@ -70,7 +70,7 @@ function(compiler_id_detection outvar lang)
Fujitsu
GHS
)
- if (lang STREQUAL C)
+ if ("x${lang}" STREQUAL "xC")
list(APPEND ordered_compilers
TinyCC
Bruce
@@ -92,13 +92,13 @@ function(compiler_id_detection outvar lang)
ADSP
IAR
)
- if (lang STREQUAL C)
+ if ("x${lang}" STREQUAL "xC")
list(APPEND ordered_compilers
SDCC
)
endif()
- if(lang STREQUAL CUDA)
+ if("x${lang}" STREQUAL "xCUDA")
set(ordered_compilers NVIDIA Clang)
endif()
diff --git a/Modules/GNUInstallDirs.cmake b/Modules/GNUInstallDirs.cmake
index f7d8c36..d81033c 100644
--- a/Modules/GNUInstallDirs.cmake
+++ b/Modules/GNUInstallDirs.cmake
@@ -239,6 +239,7 @@ if(NOT DEFINED CMAKE_INSTALL_LIBDIR OR (_libdir_set
endif()
if(CMAKE_SYSTEM_NAME MATCHES "^(Linux|kFreeBSD|GNU)$"
AND NOT CMAKE_CROSSCOMPILING
+ AND NOT EXISTS "/etc/alpine-release"
AND NOT EXISTS "/etc/arch-release")
if (EXISTS "/etc/debian_version") # is this a debian system ?
if(CMAKE_LIBRARY_ARCHITECTURE)