Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
90c6156a
Commit
90c6156a
authored
Feb 05, 2019
by
Chuck Atkins
Committed by
Brad King
Feb 25, 2019
Browse files
XLClang: Add a new compiler ID for the clang-based XL compiler
parent
e0231fe4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Modules/CMakeCompilerIdDetection.cmake
View file @
90c6156a
...
...
@@ -57,6 +57,7 @@ function(compiler_id_detection outvar lang)
HP
Compaq
zOS
XLClang
XL
VisualAge
PGI
...
...
Modules/Compiler/XLClang-C-DetermineCompiler.cmake
0 → 100644
View file @
90c6156a
set
(
_compiler_id_pp_test
"defined(__ibmxl__) && defined(__clang__)"
)
set
(
_compiler_id_version_compute
"
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ibmxl_version__)
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ibmxl_release__)
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ibmxl_modification__)
# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__ibmxl_ptf_fix_level__)
"
)
Modules/Compiler/XLClang-C.cmake
0 → 100644
View file @
90c6156a
include
(
Compiler/XLClang
)
__compiler_xlclang
(
C
)
if
(
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1
)
set
(
CMAKE_C90_STANDARD_COMPILE_OPTION
"-std=c89"
)
set
(
CMAKE_C90_EXTENSION_COMPILE_OPTION
"-std=gnu89"
)
set
(
CMAKE_C99_STANDARD_COMPILE_OPTION
"-std=c99"
)
set
(
CMAKE_C99_EXTENSION_COMPILE_OPTION
"-std=gnu99"
)
set
(
CMAKE_C11_STANDARD_COMPILE_OPTION
"-qlanglvl=extc1x"
)
set
(
CMAKE_C11_EXTENSION_COMPILE_OPTION
"-qlanglvl=extc1x"
)
if
(
CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.2
)
set
(
CMAKE_C11_STANDARD_COMPILE_OPTION
"-std=c11"
)
set
(
CMAKE_C11_EXTENSION_COMPILE_OPTION
"-std=gnu11"
)
endif
()
endif
()
__compiler_check_default_language_standard
(
C 13.1.1 99
)
Modules/Compiler/XLClang-CXX-DetermineCompiler.cmake
0 → 100644
View file @
90c6156a
set
(
_compiler_id_pp_test
"defined(__ibmxl__) && defined(__clang__)"
)
set
(
_compiler_id_version_compute
"
# define @PREFIX@COMPILER_VERSION_MAJOR @MACRO_DEC@(__ibmxl_version__)
# define @PREFIX@COMPILER_VERSION_MINOR @MACRO_DEC@(__ibmxl_release__)
# define @PREFIX@COMPILER_VERSION_PATCH @MACRO_DEC@(__ibmxl_modification__)
# define @PREFIX@COMPILER_VERSION_TWEAK @MACRO_DEC@(__ibmxl_ptf_fix_level__)
"
)
Modules/Compiler/XLClang-CXX.cmake
0 → 100644
View file @
90c6156a
include
(
Compiler/XLClang
)
__compiler_xlclang
(
CXX
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1
)
set
(
CMAKE_CXX98_STANDARD_COMPILE_OPTION
""
)
set
(
CMAKE_CXX98_EXTENSION_COMPILE_OPTION
""
)
set
(
CMAKE_CXX11_STANDARD_COMPILE_OPTION
"-qlanglvl=extended0x"
)
set
(
CMAKE_CXX11_EXTENSION_COMPILE_OPTION
"-qlanglvl=extended0x"
)
if
(
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.2
)
set
(
CMAKE_CXX11_STANDARD_COMPILE_OPTION
"-std=c++11"
)
set
(
CMAKE_CXX11_EXTENSION_COMPILE_OPTION
"-std=gnu++11"
)
set
(
CMAKE_CXX14_STANDARD_COMPILE_OPTION
"-std=c++1y"
)
set
(
CMAKE_CXX14_EXTENSION_COMPILE_OPTION
"-std=gnu++1y"
)
endif
()
endif
()
__compiler_check_default_language_standard
(
CXX 13.1.1 98
)
set
(
CMAKE_CXX_COMPILE_OBJECT
"<CMAKE_CXX_COMPILER> -x c++ <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>"
)
Modules/Compiler/XLClang.cmake
0 → 100644
View file @
90c6156a
# 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
(
__COMPILER_XLCLANG
)
return
()
endif
()
set
(
__COMPILER_XLCLANG 1
)
include
(
Compiler/XL
)
macro
(
__compiler_xlclang lang
)
__compiler_xl
(
${
lang
}
)
# Feature flags.
set
(
CMAKE_
${
lang
}
_VERBOSE_FLAG
"-V"
)
set
(
CMAKE_
${
lang
}
_COMPILE_OPTIONS_PIC
"-fPIC"
)
set
(
CMAKE_
${
lang
}
_COMPILE_OPTIONS_PIE
"-fPIC"
)
set
(
CMAKE_
${
lang
}
_RESPONSE_FILE_FLAG
"@"
)
set
(
CMAKE_
${
lang
}
_RESPONSE_FILE_LINK_FLAG
"@"
)
endmacro
()
Modules/Platform/AIX-XLClang-C.cmake
0 → 100644
View file @
90c6156a
include
(
Platform/AIX-XLClang
)
__aix_compiler_xlclang
(
C
)
Modules/Platform/AIX-XLClang-CXX.cmake
0 → 100644
View file @
90c6156a
include
(
Platform/AIX-XLClang
)
__aix_compiler_xlclang
(
CXX
)
Modules/Platform/AIX-XLClang.cmake
0 → 100644
View file @
90c6156a
# 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
(
__AIX_COMPILER_XLCLANG
)
return
()
endif
()
set
(
__AIX_COMPILER_XLCLANG 1
)
include
(
Platform/AIX-XL
)
macro
(
__aix_compiler_xlclang lang
)
__aix_compiler_xl
(
${
lang
}
)
endmacro
()
Brad King
@brad.king
mentioned in commit
3c7662fd
·
Feb 26, 2019
mentioned in commit
3c7662fd
mentioned in commit 3c7662fd625079553d3edd004fcf2b3348d38415
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment