summaryrefslogtreecommitdiffstats
path: root/Modules/Platform
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2020-12-22 20:07:20 (GMT)
committerBrad King <brad.king@kitware.com>2021-03-30 14:32:53 (GMT)
commit3c867cff4a98bb198211e3d9f8494fbb478a29e4 (patch)
treee8fb2a3671d292ff21430df67e95000f20a63bce /Modules/Platform
parentd5ab6a53edef5f259f9b9446943dcc5113898b51 (diff)
downloadCMake-3c867cff4a98bb198211e3d9f8494fbb478a29e4.zip
CMake-3c867cff4a98bb198211e3d9f8494fbb478a29e4.tar.gz
CMake-3c867cff4a98bb198211e3d9f8494fbb478a29e4.tar.bz2
Fujitsu: Add support for the Fujitsu compiler in Trad mode
Co-Author: Yuichiro Utsumi <utsumi.yuichiro@jp.fujitsu.com>
Diffstat (limited to 'Modules/Platform')
-rw-r--r--Modules/Platform/Linux-Fujitsu-CXX.cmake8
-rw-r--r--Modules/Platform/Linux-Fujitsu.cmake17
2 files changed, 25 insertions, 0 deletions
diff --git a/Modules/Platform/Linux-Fujitsu-CXX.cmake b/Modules/Platform/Linux-Fujitsu-CXX.cmake
new file mode 100644
index 0000000..d72dd49
--- /dev/null
+++ b/Modules/Platform/Linux-Fujitsu-CXX.cmake
@@ -0,0 +1,8 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details
+
+include(Platform/Linux-Fujitsu)
+__linux_compiler_fujitsu(CXX)
+
+# Special sauce to propagate the -std=xxx flag when linking
+set(CMAKE_CXX_LINK_WITH_STANDARD_COMPILE_OPTION ON)
diff --git a/Modules/Platform/Linux-Fujitsu.cmake b/Modules/Platform/Linux-Fujitsu.cmake
new file mode 100644
index 0000000..be11b0a
--- /dev/null
+++ b/Modules/Platform/Linux-Fujitsu.cmake
@@ -0,0 +1,17 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+
+# This module is shared by multiple languages; use include blocker.
+if(__LINUX_COMPILER_FUJITSU)
+ return()
+endif()
+set(__LINUX_COMPILER_FUJITSU 1)
+
+macro(__linux_compiler_fujitsu lang)
+ set(CMAKE_${lang}_COMPILE_OPTIONS_PIC "-fPIC")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_PIE "-fPIE")
+ set(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY "-fvisibility=")
+ set(CMAKE_SHARED_LIBRARY_${lang}_FLAGS "-fPIC")
+ set(CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS "-shared")
+endmacro()