summaryrefslogtreecommitdiffstats
path: root/CompileFlags.cmake
Commit message (Collapse)AuthorAgeFilesLines
* Source: Adjust stack sizes and recursion limits to work togetherBrad King2023-03-131-7/+8
| | | | | | Adjust `CMake_DEFAULT_RECURSION_LIMIT` and/or the process stack size on each platform to pass the `RunCMake.MaxRecursionDepth` test's "default" cases.
* own CMakeLists: remove unreachable codeMichael Hirsch2022-11-071-5/+0
|
* Build: `add_definitions()` → `add_compile_definitions()`Alex Turbov2022-09-221-2/+2
|
* Build: Modernize some `foreach` calls to use `IN LISTS`/`IN ITEMS`Alex Turbov2022-09-221-3/+3
|
* Add linker prefix for "-stack" flag on MSVC buildsWilliam R. Dieter2022-08-011-1/+1
| | | | Signed-off-by: William R. Dieter <william.r.dieter@intel.com>
* LCC: get rid of excess -Wunused-but-set-variable on release buildsmakise-homura2022-07-061-0/+9
| | | | | | | | | LCC, as of 1.26, has a buggy EDG frontend that emits -Wunused-but-set-variable warning even if there's something like "(void)var" when frontend optimizations are enabled (>=-O1). To get rid of this warning, we disable it in CMake's root CMakeLists.txt for LCC >= 1.26. Later, when this bug will be fixed in LCC, this version check will have its top version limit.
* Suppress MSVC 14.28 C5105 warning triggered by Windows SDKBrad King2020-11-171-0/+6
| | | | Issue: #21446
* Linux: Compile with _FILE_OFFSET_BITS=64 on 32-bit LinuxMarc Chevrier2020-09-231-0/+6
| | | | | | | | To avoid problems accessing filesystem, use 64-bit file offsets when compilation model is 32-bit. This explicit definition is needed now that KWSys does not provide LFS settings in its headers anymore. Fixes: #20568
* Check for support before adding bigtoc linker flagAlexander Grund2019-12-091-2/+10
| | | | Fixes: #20076
* Fixing warnings generated by clang 8.0 on WindowsZsolt Parragi2019-05-291-4/+7
| | | | | | | | | | | | * Deprecation removals previously specific to MSVC/Intel now also used by clang * String literals were assigned to non const pointers. These are stored in mutable arrays now * An implicit function pointer to pointer conversion is a Microsoft extension warning is suppressed by an explicit reinterpret_cast * The MSVC specific deprecation macro for jsoncpp was moved after the clang macro to avoid redefinition warnings. This is consistent with how jsoncpp fixed the issue in 36d8cfd7
* cmake: use correct stack size with gnu mode clang on windowsZsolt Parragi2019-05-231-0/+6
|
* ppc64: Work around TOC overflow with platform specific linker flagsChuck Atkins2019-02-271-0/+9
|
* Remove now-unused code once used on IRIXBrad King2019-01-111-7/+0
| | | | | We dropped support for IRIX as a host platform long ago. Remove some leftover code.
* CMake: Enable /MP for MSVC toolchainRobert Dailey2018-02-151-0/+23
| | | | | | | | | | | | | A new cache option named `CMake_MSVC_PARALLEL` is now available that can be used to control the usage of [`/MP`][1] to the MSVC compiler. This enables parallelized builds on a per-translation unit basis. To enable `/MP`, specify value `ON` to the option. Using an integral non-zero value will control the specific number of threads used with the `/MP` option, as opposed to letting the toolchain decide for you. Fixes #17696 [1]: https://docs.microsoft.com/en-us/cpp/build/reference/mp-build-with-multiple-processes
* Windows: Increase stack size used by CMake binariesBrad King2018-01-301-0/+4
| | | | | | | | | Deep regex matching logic can exceed the default 1MB stack size. Until a better regex engine is used, simply push the problem over a farther horizon by increasing the stack size when built using a MSVC-compatible linker. Issue: #17659
* HP-UX: Drop support for building CMake on HP-UXBrad King2017-08-071-12/+0
| | | | | | | | CMake will soon require both C++11 and libuv to build. Neither of these works on HP-UX, so unfortunately we need to drop support for the platform until someone can get them working. Issue: #17137
* SunPro: update flags used for CMake itselfDaniel Pfeifer2017-05-261-1/+2
| | | | | Special flags should no longer be required when CMake is built with a recent version of CMake.
* Update SunPro flags used for CMake itself to support C++11Brad King2017-05-081-1/+8
|
* Drop Visual Studio 7 .NET 2003 generatorBrad King2017-04-191-4/+0
| | | | This generator has been deprecated since CMake 3.6. Remove it.
* CompileFlags: Tell PGI compiler not to issue warning diagnosticsBrad King2016-09-281-0/+7
| | | | | | | When hosting CMake's own build with the PGI compiler there are several warnings that cannot easily be fixed or suppressed. We have enough code quality tools and warnings from other compilers that it is unlikely a PGI-only warning is useful.
* Simplify CMake per-source license noticesBrad King2016-09-271-11/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | Per-source copyright/license notice headers that spell out copyright holder names and years are hard to maintain and often out-of-date or plain wrong. Precise contributor information is already maintained automatically by the version control tool. Ultimately it is the receiver of a file who is responsible for determining its licensing status, and per-source notices are merely a convenience. Therefore it is simpler and more accurate for each source to have a generic notice of the license name and references to more detailed information on copyright holders and full license terms. Our `Copyright.txt` file now contains a list of Contributors whose names appeared source-level copyright notices. It also references version control history for more precise information. Therefore we no longer need to spell out the list of Contributors in each source file notice. Replace CMake per-source copyright/license notice headers with a short description of the license and links to `Copyright.txt` and online information available from "https://cmake.org/licensing". The online URL also handles cases of modules being copied out of our source into other projects, so we can drop our notices about replacing links with full license text. Run the `Utilities/Scripts/filter-notices.bash` script to perform the majority of the replacements mechanically. Manually fix up shebang lines and trailing newlines in a few files. Manually update the notices in a few files that the script does not handle.
* Modules: Fix typos in name of `CMAKE_COMPILER_IS_GNUCC` variableBrad King2016-09-141-1/+1
| | | | | | It is not called `CMAKE_COMPILER_IS_GNUC` (without last `C`). Closes: #16297
* Merge topic 'drop-ancient-workarounds'Brad King2015-01-121-5/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0f7bdd61 Remove VS 6 special case. 5e92c826 Remove some obsolete stuff. 15e42bb2 cmStandardIncludes: Remove obsolete cmOStringStream. 931e055d Port all cmOStringStream to std::ostringstream. f194a009 Remove unused cmIStringStream class. 3ec1bb15 cmStandardIncludes: Remove std namespace hack. bb3bce70 cmStandardIncludes: Remove ANSI_FOR_SCOPE hack. 28fa4923 cmStandardIncludes: Remove iostreams workaround for obsolete Compaq compiler. 837a8a63 cmStandardIncludes: Drop Comeau-related workaround. 4030ddfd Remove Borland-related undef. 17d6a6fd cmStandardIncludes: Remove comment about Borland. 26fb5011 Drop SGI as a CMake host compiler.
| * Remove VS 6 special case.Stephen Kelly2015-01-111-3/+0
| |
| * Remove some obsolete stuff.Stephen Kelly2015-01-111-2/+0
| | | | | | | | | | We don't need to run compiler tests for ansi-for etc anymore. All supported compilers support the features tested here.
* | SolarisStudio: Use alternative standard library to build CMake.Stephen Kelly2015-01-111-0/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SolarisStudio ships a very old RogueWave standard library implementation (libCstd) and uses it by default for backward compatibility. The macros defined when building the system libCstd need to be the same as the macros defined when using it for binary compatibility reasons etc. The SolarisStudio compiler driver adds macros such as _RWSTD_NO_MEMBER_TEMPLATES and _RWSTD_NO_CLASS_PARTIAL_SPEC etc. These macros disable certain APIs in the standard library headers. Although the compiler supports the features 'member templates' and 'partial template specialization', the standard library does not provide APIs which rely on those features. This means that std::vector::insert in libCStd does not accept a pair of iterators from a different type of container, because that requires member templates, and reverse_iterator<const T> can not be constructed from a reverse_iterator<T> because that requires partial specialization (or at least the _RWSTD_NO_CLASS_PARTIAL_SPEC define) and member templates. This causes many problems while building CMake using SolarisStudio, which have not been well understood until now. The problems are usually attributed to compiler limitations, while actually the problem is in the standard library, as in commit v3.0.0-rc1~99^2~1 (Help: Document non-use of std::set::insert., 2014-01-24) and commit 107dcac3 (Fix compilation with the Oracle / Sun compiler (#15318), 2014-12-12). SolarisStudio 12.3 and earlier also ships a version of stlport which may be used instead of libCstd by specifying -library=stlport4 https://docs.oracle.com/cd/E18659_01/html/821-1383/bkakg.html SolarisStudio 12.4 ships a version of libstdc++ from GCC 4.8.2 which may be used by specifying -std=c++03 or -std=c++11 etc http://docs.oracle.com/cd/E37069_01/html/E37075/bkamw.html#OSSCPgnaof Use these more-capable standard library implementations when building cmake. This will allow more use of 'normal' C++ (such as std::vector::insert), and cause fewer surprises resulting from dashboards using SolarisStudio. Because cmake is not a library linked against by 3rd parties and does not have external dependencies, issues related to mixing code using libCStd and libstdc++ do not apply.
* Merge topic 'fix-gcc-hppa'Brad King2014-11-101-6/+10
|\ | | | | | | | | 04f442f7 Workaround for short jump tables on PA-RISC.
| * Workaround for short jump tables on PA-RISC.Chuck Atkins2014-11-101-6/+10
| | | | | | | | | | | | | | The PA-RISC architecture requires special options for GCC to prevent linker errors when libraries reach a certain size and / or complexity. See http://mraw.org/blog/2007/10/10/Linking_on_hppa and gcc documentation on -mlong-calls.
* | Avoid if() quoted auto-dereferenceBen Boeckel2014-10-201-1/+1
|/ | | | | | | When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly dereference or quote the variable. We want if() to auto-dereference the variable and not its value. Also replace MATCHES with STREQUAL where equivalent.
* Merge topic 'matches-cleanup'Brad King2014-04-151-3/+3
|\ | | | | | | | | | | | | | | | | | | f21ac16e Replace MATCHES test on numbers with EQUAL test 7eacbaed Replace MATCHES ".+" tests with NOT STREQUAL "" 3a71d34c Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficient b0b4b460 Remove .* expressions from beginning and end of MATCHES regexs 5bd48ac5 Replace string(REGEX REPLACE) with string(REPLACE) where possible 2622bc3f Clean up usage of if(... MATCHES regex) followed string(REGEX REPLACE regex)
| * Use CMAKE_SYSTEM_NAME instead of CMAKE_SYSTEM where sufficientRolf Eike Beer2014-04-141-2/+2
| |
| * Remove .* expressions from beginning and end of MATCHES regexsRolf Eike Beer2014-04-141-3/+3
| | | | | | | | | | | | | | | | | | All these expressions work the same: "foo" ".*foo.*" "^.*foo.*$" This assumes that the "Intel*" expressions were meant to be "Intel.*".
* | CompileFlags: add better selection which aCC version gets -AA +hpxstd98 flagsRolf Eike Beer2014-04-121-2/+6
|/
* CompileFlags: Add -AA +hpxstd98 on HP-UX 11.11 with aCCRolf Eike Beer2014-04-041-0/+8
| | | | | These flags are needed to enable support for C++98. Also teach the 'bootstrap' script to add them if necessary.
* CompileFlags: Test for C++ features after selecting flagsRolf Eike Beer2014-04-041-1/+2
| | | | Some flags we select may affect availability of C++ features.
* Improve ld flags for CMake itself on Linux/HPPAGuy Martin2014-01-171-1/+1
| | | | | | | | | Workaround binutils bug by only marking unique section starting by ".text._". This adds the HPPA workaround improved in commit b22a0f15 (bootstrap: improve ld flag for Linux/HPPA builds, 2014-01-14) not only to the bootstrap, but also to the normal build.
* Linux/PA-RISC: Link with --unique=.text.* to help binutilsRolf Eike Beer2012-10-311-0/+6
| | | | | | | | | | | There is a binutils bug that leads to errors like this: /usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: libCMakeLib.a(cmTarget.cxx.o)(.text+0x12084): cannot reach 00001d28__ZNSspLEPKc@@GLIBCXX_3.4+0, recompile with -ffunction-sections /usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: libCMakeLib.a(cmTarget.cxx.o)(.text+0x12084): cannot handle R_PARISC_PCREL17F for std::basic_string<char, std::char_traits<char>, std::allocator<char> >::operator+=(char const*)@@GLIBCXX_3.4 /usr/lib/gcc/hppa2.0-unknown-linux-gnu/4.6.3/../../../../hppa2.0-unknown-linux-gnu/bin/ld: final link failed: Bad value Until someone finds out what needs to be fixed in binutils this allows anyone to compile a working CMake even in debug mode.
* Remove CMake-language block-end command argumentsKitware Robot2012-08-131-10/+10
| | | | | | | | | | | | | | | | | 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-36/+36
| | | | | | | | | | | | | | | | | 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
* Remove trailing whitespace from most CMake and C/C++ codeKitware Robot2012-08-131-3/+3
| | | | | | | | | | | | | | | | | Our Git commit hooks disallow modification or addition of lines with trailing whitespace. Wipe out all remnants of trailing whitespace everywhere except third-party code. Run the following shell code: git ls-files -z -- \ bootstrap doxygen.config '*.readme' \ '*.c' '*.cmake' '*.cpp' '*.cxx' \ '*.el' '*.f' '*.f90' '*.h' '*.in' '*.in.l' '*.java' \ '*.mm' '*.pike' '*.py' '*.txt' '*.vim' | egrep -z -v '^(Utilities/cm|Source/(kwsys|CursesDialog/form)/)' | egrep -z -v '^(Modules/CPack\..*\.in)' | xargs -0 sed -i 's/ \+$//'
* Re-disable MSVC CRT deprecation warningsBrad King2009-10-281-1/+6
| | | | | | The commit "Disable Intel CRT deprecation warnings" broke the logic that disabled MS's CRT deprecation warnings. This fixes the logic to disable the warnings for both MSVC and Intel.
* Disable Intel CRT deprecation warningsBrad King2009-10-271-2/+2
| | | | | | The Intel Compiler for Windows uses the MS runtime library which deprecates many C functions. We define _CRT_SECURE_NO_DEPRECATE and _CRT_NONSTDC_NO_DEPRECATE to disable the deprecation warnings.
* Convert CMake to OSI-approved BSD LicenseBrad King2009-09-281-0/+12
| | | | | | | This converts the CMake license to a pure 3-clause OSI-approved BSD License. We drop the previous license clause requiring modified versions to be plainly marked. We also update the CMake copyright to cover the full development time range.
* ENH: first pass at VS 10, can bootstrap CMake, but many tests still failBill Hoffman2009-06-251-2/+5
|
* COMP: Fix warnings on VS9.Brad King2008-01-301-2/+2
|
* ENH: start trying to cleanup CMakeLists filesKen Martin2007-05-101-0/+44