summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/SunPro-CXX.cmake
Commit message (Collapse)AuthorAgeFilesLines
* COMPILE_WARNING_AS_ERROR: Add options to treat warnings as errorsMartin Duffy2022-05-061-0/+1
| | | | | | | | | | | | Add `COMPILE_WARNING_AS_ERROR` target property and supporting `CMAKE_COMPILE_WARNING_AS_ERROR` variable. `COMPILE_WARNING_AS_ERROR` is initialized by `CMAKE_COMPILE_WARNING_AS_ERROR`. It is a boolean variable. If it is true, it expands to a different flag depending on the compiler such that any warnings at compile will be treated as errors. Supports compiler ids that I could find a relevant flag for.
* Refactoring: Introduce place-holder for dependency target.Marc Chevrier2020-11-281-1/+1
| | | | | | | | These changes are in preparation of compiler generated dependencies support for Makefiles generators * compiler output and dependency target can be different for Makefiles generators * resolve inconsistency naming for dependency file place-holder
* SunPro: Record support for C++14 features by SunPro 5.{14,15}Brad King2019-04-191-0/+5
| | | | | | | | | | | SunPro 5.15 supports `-std=c++14` and several C++14 features. SunPro 5.14 accepts `-std=c++14` but does not update its definition of `__cplusplus` or any other macro to distinguish it from `-std=c++11`, so we need to blacklist a couple features that do work but that we cannot report for that version. We can still support `cxx_std_14`. Co-Author: Robert Maynard <robert.maynard@kitware.com>
* CompileFeatures: Record when CXX compilers have gained full support for 98Robert Maynard2019-04-111-0/+1
| | | | | | | Use the infrastructure added by commit 646fb1a646 (CompileFeatures: memoize C++ compilers with full language level support, 2019-03-27) to avoid using a `try_compile` to check for C++98 feature support when the running compiler is known to have all features.
* PIE link options: Update strategy to fix performance regressionMarc Chevrier2018-12-191-0/+1
| | | | Fixes: #18700
* POSITION_INDEPENDENT_CODE: Manage link flags for executablesMarc Chevrier2018-11-111-0/+2
| | | | Fixes: #14983, #16561
* POSITION_INDEPENDENT_CODE: Fix erroneous '-fPIE' flag for Sun StudioMarc Chevrier2018-11-081-0/+1
| | | | Fixes: #16311
* LINK_OPTIONS: Add support of "LINKER:" prefixMarc Chevrier2018-06-061-0/+3
|
* SunPro,XL: Add depfile flags to support Ninja generatorEphi Sinowitz2018-04-171-0/+2
| | | | | Add CMAKE_DEPFILE_FLAGS_${lang} to SunPro and XL. These flags are used by the Ninja generator.
* SunPro: Make sure all known versions get CXX98 defaultsChuck Atkins2017-05-311-3/+3
|
* Compilers: Port to use default cmake_record_lang_compile_features macrosChuck Atkins2017-05-301-12/+0
|
* SunPro: set -library=stlport as standard compile option for C++98Daniel Pfeifer2017-05-261-0/+4
|
* SunPro: add standard compile option for C++03Daniel Pfeifer2017-05-261-2/+2
|
* SunPro: Use common compiler macros for language standard defaultChuck Atkins2017-05-021-11/+6
|
* Features: On SunPro link with language standard compiler flagBrad King2017-05-011-0/+1
| | | | | | When C++ feature requirements or `CXX_STANDARD` cause us to compile on SunPro with the `-std=c++11` option, link with the option too. This is needed to make the compiler use the matching standard library.
* Features: Make feature recording conditions more consistentBrad King2016-12-021-1/+3
| | | | | | | | | Condition all calls to `_record_compiler_features_{c,cxx}` on `_result EQUAL 0` so that adding new language standards later does not need to update them. Avoid some duplicate compiler version checks by conditioning C11 and CXX14 feature recording on the existence of `CMAKE_{C11,CXX14}_STANDARD_COMPILE_OPTION` (whose setting already used the version check).
* Features: Centralize per-compiler recording macrosBrad King2016-11-021-6/+4
| | | | | Simplify and de-duplicate per-compiler feature recording macros and convert to a centralized per-language macro.
* Honor CMAKE_<LANG>_FLAGS[_<CONFIG>]_INIT set in toolchain filesBrad King2016-07-061-5/+5
| | | | | | | | | | | | | | | | | | | | | | | Document these variables. Change our convention for setting these variables from: set(CMAKE_C_FLAGS_INIT "...") to string(APPEND CMAKE_C_FLAGS_INIT " ...") so that any value previously set by a toolchain file will be used. Automate the conversion with: sed -i 's/set *(\(CMAKE_\(C\|CXX\|Fortran\|RC\|ASM\|${[^}]\+}\)_FLAGS\(_[^_]\+\)\?_INIT \+"\)/string(APPEND \1 /' \ Modules/Compiler/*.cmake Modules/Platform/*.cmake and follow up with some manual fixes (e.g. to cases that already meant to append). Also revert the automated changes to contexts that are not protected from running multiple times.
* Project: Guess default standard dialect if compiler was forced (#15852)Brad King2015-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | Prior to commit v3.4.0-rc1~71^2 (Project: Determine default language dialect for the compiler, 2015-09-15) we always guessed the default language standard dialect based on the compiler version. This was not reliable so that commit switched to computing the default language standard dialect while detecting the compiler id. When a toolchain file uses CMakeForceCompiler to set the compiler id then the detection does not occur. Therefore commit v3.4.0-rc1~54^2 (Project: Don't require computed default dialect if compiler was forced, 2015-09-22) made the lack of detection an error only if the compiler was not forced. However, this means that projects using CMakeForceCompiler no longer even get the guess that we had before so <LANG>_COMPILER does not work. Due to the sophistication of CMake's compiler detection logic projects should be ported away from using CMakeForceCompiler. In the meantime, restore a guess of the default language standard dialect when the compiler is forced.
* Project: Don't require computed default dialect if compiler was forced.Stephen Kelly2015-09-221-3/+5
| | | | | | | | | | | | | | | | Commit 7235334a (Project: Determine default language dialect for the compiler., 2015-09-15) introduced a mechanism to determine the default dialect used for the running compiler. If conditions in the <CompilerId>-<Lang>.cmake file are such that compile features for that version of the compiler should be supported, the _DEFAULT_STANDARD is set to the computed value. However, the CMakeForceCompiler module allows users to bypass execution of the compiler by CMake. In that case, do not set the _DEFAULT_STANDARD variable at all, which effectively disables the compile-features where the module is used. No compile features have ever been recorded where the module is used so no functionality is lost.
* Project: Determine default language dialect for the compiler.Stephen Kelly2015-09-181-2/+5
| | | | | | Use the __cplusplus and __STDC_VERSION__ macros to automatically determine the default dialect for the compiler while determining its id and version.
* Factor an <INCLUDES> placeholder out of <FLAGS> in rule variablesBrad King2015-07-131-2/+2
| | | | | | | | | | | Teach the Makefile and Ninja generators to substitute for an <INCLUDES> placeholder instead of putting -I in <FLAGS>. Update our values for CMAKE_<LANG>_COMPILE_OBJECT, CMAKE_<LANG>_CREATE_ASSEMBLY_SOURCE, and CMAKE_<LANG>_CREATE_PREPROCESSED_SOURCE to place <INCLUDES> just before <FLAGS>.
* SunPro: Drop non-existent -KPIE flagSteven Vancoillie2015-03-231-1/+0
|
* Features: Populate CMAKE_<LANG>_STANDARD_DEFAULT only for supported compilers.Stephen Kelly2015-02-041-1/+3
| | | | | | If no compiler feature information is known for a given compiler version, do not set a language standard default either. The two settings must be recorded consistently.
* Features: Record for SolarisStudio 12.4.Stephen Kelly2015-01-171-0/+21
| | | | It has similar C++11 capabilities compared to GCC 4.8.
* Add -DNDEBUG to RelWithDebInfo flags where where Release flags had it.Clinton Stimpson2012-08-161-1/+1
| | | | | | Previously, it was inconsistent in that some platforms/compilers had this flag for the RelWithDebInfo configuration and some didn't. This fixes issue #11366.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-1/+1
| | | | | | | | | | | | | | | | | Ancient versions of CMake required else(), endif(), and similar block termination commands to have arguments matching the command starting the block. This is no longer the preferred style. Run the following shell code: for c in else endif endforeach endfunction endmacro endwhile; do echo 's/\b'"$c"'\(\s*\)(.\+)/'"$c"'\1()/' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | egrep -z -v 'Tests/CMakeTests/While-Endwhile-' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Convert CMake-language commands to lower caseKitware Robot2012-08-131-20/+20
| | | | | | | | | | | | | | | | | Ancient CMake versions required upper-case commands. Later command names became case-insensitive. Now the preferred style is lower-case. Run the following shell code: cmake --help-command-list | grep -v "cmake version" | while read c; do echo 's/\b'"$(echo $c | tr '[:lower:]' '[:upper:]')"'\(\s*\)(/'"$c"'\1(/g' done >convert.sed && git ls-files -z -- bootstrap '*.cmake' '*.cmake.in' '*CMakeLists.txt' | egrep -z -v '^(Utilities/cm|Source/kwsys/)' | xargs -0 sed -i -f convert.sed && rm convert.sed
* Add platform variables for position independent code flagsStephen Kelly2012-06-121-0/+2
| | | | | | | | | | | | | | | | | | | | Store in new platform variables CMAKE_${lang}_COMPILE_OPTIONS_PIC CMAKE_${lang}_COMPILE_OPTIONS_PIE flags for position independent code generation. In almost all cases, this means duplication of the CMAKE_SHARED_LIBRARY_${lang}_FLAGS for the _PIC case and using the assumed pie equivalent for the _PIE case. Note that the GNU compiler has supported -fPIE since 3.4 and that there is no -fPIC on GNU for Windows or Cygwin. There is a possibility that the _PIE variables are not correct. However, as there is no backwards compatibility to be concerned about (as the POSITION_INDEPENDENT_CODE property is not used anywhere yet), the current state suffices.
* Make VERBOSE_FLAG appear as first statement for consistencyKovarththanan Rajaratnam2010-04-171-2/+2
|
* Drop -rdynamic from Linux build rulesBrad King2009-12-011-1/+0
| | | | | | | | | | | | | | | This is a GNU-specific option that should not be specified for all compilers on Linux. It tells the GNU compiler to pass -export-dynamic to the linker to export symbols from executables for use by plugins. Since we provide the ENABLE_EXPORTS target property to do the same thing in a cross-platform way, there is no need to pass -rdynamic always. Since the option is not useful for GNU tools and breaks other tools on Linux we simply remove it from CMAKE_SHARED_LIBRARY_LINK_<lang>_FLAGS. This also allows us to stop setting the variable in other Linux compiler files just to erase the bad flag. See issue #9985.
* Split SunPro compiler information filesBrad King2009-08-211-0/+31
| | | | | | This moves platform-independent SunPro compiler flags into separate "Compiler/SunPro-<lang>.cmake" modules. Platform-specific flags are left untouched.
* ENH: Implicit link info for C, CXX, and FortranBrad King2009-07-231-0/+1
This teaches CMake to detect implicit link information for C, C++, and Fortran compilers. We detect the implicit linker search directories and implicit linker options for UNIX-like environments using verbose output from compiler front-ends. We store results in new variables called CMAKE_<LANG>_IMPLICIT_LINK_LIBRARIES CMAKE_<LANG>_IMPLICIT_LINK_DIRECTORIES The implicit libraries can contain linker flags as well as library names.