summaryrefslogtreecommitdiff
path: root/cmake/modules/HandleLLVMOptions.cmake
Commit message (Collapse)AuthorAge
* Revert "Cmake: add compiler option in a more idiomatic way"Rafael Espindola2013-06-14
| | | | | | | | | This reverts commit 183995. It broke the bots: http://bb.pgr.jp/builders/cmake-clang-x86_64-linux/builds/9730/steps/build_clang/logs/stdio git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183997 91177308-0d34-0410-b5e6-96231b3b80d8
* Cmake: add compiler option in a more idiomatic wayArnaud A. de Grandmaison2013-06-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183995 91177308-0d34-0410-b5e6-96231b3b80d8
* Add colored diagnostics when building LLVM with cmake + ninja + clangArnaud A. de Grandmaison2013-05-29
| | | | | | When invoked from Ninja, clang does not detect that it can use colors : see https://github.com/martine/ninja/issues/174 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@182878 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't explicitly provide -pie in MSan bootstrap of LLVM, as it's now implied ↵Alexey Samsonov2013-04-12
| | | | | | by the driver git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179367 91177308-0d34-0410-b5e6-96231b3b80d8
* [cmake] Avoid rel+asserts warnings when passing -UNDEBUGReid Kleckner2013-04-07
| | | | | | | MSVC 2012 gives warning D9025, "overriding /D NDEBUG with -UNDEBUG". Removing the original definition of NDEBUG silences this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178967 91177308-0d34-0410-b5e6-96231b3b80d8
* Add CMake option LLVM_USE_SANITIZER={Address,Memory,MemoryWithOrigins} to ↵Alexey Samsonov2013-03-26
| | | | | | simplify bootstrap of LLVM/Clang under ASan/MSan git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177992 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use add_llvm_definitions for adding warning flags. It makes it too hardDuncan Sands2013-03-25
| | | | | | | | | | to have them appear in the right order. Instead append all warnings explicitly to the language flags. This was already the case for many warnings. Fixes the issue of -Wno-maybe-uninitialized not being effective because -Wall was being placed after it rather than before. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177866 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable -Wnon-virtual-dtor build warningAlexey Samsonov2013-03-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177385 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn anonymous type in anonymous union warning back on after cleaning upEric Christopher2013-03-15
| | | | | | issues. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177136 91177308-0d34-0410-b5e6-96231b3b80d8
* Simplify CMake rules in HandleLLVMOptions module.Alexey Samsonov2013-03-13
| | | | | | | | | | | | | | Summary: No functionality change. Reviewers: Bigcheese Reviewed By: Bigcheese CC: llvm-commits Differential Revision: http://llvm-reviews.chandlerc.com/D535 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176973 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Always include the CheckCXXCompilerFlag in HandleLLVMOptions.cmake.Jordan Rose2013-03-02
| | | | | | Previously we relied on it being included by config-ix.cmake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@176396 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off uninitialized-use warnings for gcc in cmake buildEdwin Vane2013-02-04
| | | | | | | | | | | | | | Added support to the cmake build to turn off uninitialized use warnings for gcc. This cleans the build up somewhat. Used logic simpler than found in autoconf by making use of the fact that although gcc won't complain about unsupported -Wno-* flags it *will* complain about unsupported -W flags. Reviewers: gribozavr, doug.gregor, chandlerc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174299 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -Wno-nested-anon-types to -pedantic builds of LLVM. This Clang warningRichard Smith2013-01-31
| | | | | | | | | | | | | | | | | | | | catches uses of an extremely minor and widely-available C++ extension (which every C++ compiler I could find supports, but EDG and Clang reject in strict mode). The diagnosed code pattern looks like this: struct X { union { struct { int a; int b; } S; }; }; git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174103 91177308-0d34-0410-b5e6-96231b3b80d8
* Turn off missing field initializer warnings for gccEdwin Vane2013-01-31
| | | | | | | | | | gcc produces false positives for empty braces so turning the warning off. Instead, turning the warning on for clang so proper warnings aren't missed. Reviewers: dblaikie, chandlerc git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174073 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake][Lit][unittests] Deprecate CMAKE_BUILD_TYPE in each build directory ↵NAKAMURA Takumi2013-01-27
| | | | | | | | | | | | | | | | | | | | | | | | for unittests. For example, cur) unittests/ADT/Release/ADTTests new) unittests/ADT/ADTTests RUNTIME_BUILD_MODE can be substituted to CMAKE_CFG_INTDIR. With Make and Ninja, the tree is not built with multiple configurations. Then, including the build type in target directory doesn't make sense. See also "How can I build multiple modes without switching?" http://www.cmake.org/Wiki/CMake_FAQ CMAKE_CFG_INTDIR is set to "." With multiple-configuration-aware build system, like Visual Studio, each unittest is built on appropriate directory, for example, unittests/ADT/Release/ADTTests.exe CMAKE_CFG_INTDIR is set to build system's variable, like "$(Configuration)" or "$(OutDir)". Thus, "--param build_config" is also deprecated. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173616 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable MSVC's warning about noreturn destructorsReid Kleckner2013-01-25
| | | | | | | | | | | | This warning fires on: Operator::~Operator() { llvm_unreachable("should never destroy an Operator"); } That seems like a false positive. I don't see any good way to silence the warning here, so I'm disabling it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173455 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] MSVC is incorrectly emitting C4239 in some cases. Disable it.Michael J. Spencer2013-01-03
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171430 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo introduced in r168577: FlAGS -> FLAGS (note the lowercase ell)Dmitri Gribenko2012-12-24
| | | | | | | Now we really pass -Wcovered-switch-default if the compiler supports it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@171040 91177308-0d34-0410-b5e6-96231b3b80d8
* Removing SUPPORTS_COVERED_SWITCH_DEFAULT_FLAGJoe Abbey2012-11-26
| | | | | | | | | | | | | | Adding CXX_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG C_SUPPORTS_COVERED_SWITCH_DEFAULT_FLAG This is to handle the wackiness on a Mac host where cmake detects: CMAKE_CXX_COMPILER == "/usr/bin/c++" CMAKE_C_COMPILER == "/usr/bin/gcc" git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168577 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: Pass the -m32 flag to modules if LLVM_BUILD_32_BITS is enabledTobias Grosser2012-06-08
| | | | | | | | | | | This was previously only done for executables and shared libraries, but not for modules. As modules are essentially shared libraries (that need to be dlopened explicitly), threating them the same as shared libraries seems reasonable. This fixes the LLVM_BUILD_32_BITS build of Polly. Contributed by: Ondra Hosek <ondra.hosek@gmail.com> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158195 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Promote extension warnings to errors.Michael J. Spencer2012-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158176 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Order MSVC warnings numerically.Michael J. Spencer2012-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158171 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Adjust MSVC warnings.Michael J. Spencer2012-06-07
| | | | | | | Remove /Wall from LLVM_ENABLE_WARNINGS (it's useless) and promote 4239 to a level 1 warning. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158170 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix how CMake appends -m32 to linker command-linesTim Northover2012-05-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157337 91177308-0d34-0410-b5e6-96231b3b80d8
* Adding -fcolor-diagnostics is causing problem to users that parse the buildRafael Espindola2012-05-08
| | | | | | | | | | | output. Peter Collingbourne also reports that it is showing up in $(llvm-config --cflags). Revert this for now since I don't know enough cmake to fix it properly. This reverts commit 18efed7adc79c1970f307bb5b015d199012ba872. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156392 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass -fcolor-diagnostics when it is supported. This makes a difference whenRafael Espindola2012-05-04
| | | | | | using cmake+ninja, since ninja buffers the compiler output. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156150 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Enable LLVM_COMPILER_JOBS on all MS IDEs. We don't support older ↵NAKAMURA Takumi2012-04-21
| | | | | | environments than VS9. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155285 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Prune redundant LLVM_COMPILER_JOBS from llvm/CMakeLists.txt. ↵NAKAMURA Takumi2012-04-21
| | | | | | HandleLLVMOptions.cmake has it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@155284 91177308-0d34-0410-b5e6-96231b3b80d8
* Minimal changes for LLVM to compile under VS11.Michael J. Spencer2012-03-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151849 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable -Wcovered-switch-default again, but add -Werror to the checks to makeRafael Espindola2012-02-28
| | | | | | sure we don't use it with compilers that don't support it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151665 91177308-0d34-0410-b5e6-96231b3b80d8
* Temporarily revert r151609, which enabled a new warning for LLVM andChandler Carruth2012-02-28
| | | | | | | | Clang builds. The detection logic for compilers that support the warning isn't working. Rafael is going to investigate it, but didn't want people to have to wade through build spam until then. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151649 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable -Wcovered-switch-default as it matches the switch style used in llvm.Rafael Espindola2012-02-28
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151609 91177308-0d34-0410-b5e6-96231b3b80d8
* -fvisibility-inlines-hidden is a c++ only option.Rafael Espindola2012-01-25
| | | | | | Thanks to Peter Collingbourne for noticing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148913 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use -fvisibility-inlines-hidden on mingw to try to avoid a lot ofRafael Espindola2012-01-20
| | | | | | warnings from gcc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148539 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: pass -fvisibility-inlines-hidden if it is supported. In aRafael Espindola2012-01-20
| | | | | | | Release+Asserts build with -DBUILD_SHARED_LIBS=ON, the install directory goes from 72MB to 70MB. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148530 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak CMake build on Cygwin.NAKAMURA Takumi2011-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146725 91177308-0d34-0410-b5e6-96231b3b80d8
* build/cmake: Move all the user controllable options into top-level CMakeListsDaniel Dunbar2011-11-04
| | | | | | for consistency. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143728 91177308-0d34-0410-b5e6-96231b3b80d8
* Add -D__STDC_FORMAT_MACROS to use PRIx64.NAKAMURA Takumi2011-10-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141663 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake/modules/HandleLLVMOptions.cmake: Reorder __STDC_CONSTANT_MACROS and ↵NAKAMURA Takumi2011-10-11
| | | | | | __STDC_LIMIT_MACROS. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141662 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: [MSVC] Suppress C4551 'function call missing argument list'.NAKAMURA Takumi2011-08-17
| | | | | | (void)static_func; it is used as idiom in llvm source tree to suppress "Unused static function" warnings. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137800 91177308-0d34-0410-b5e6-96231b3b80d8
* lit support for REQUIRES: asserts.Andrew Trick2011-06-22
| | | | | | | | | | | Take #2. Don't piggyback on the existing config.build_mode. Instead, define a new lit feature for each build feature we need (currently just "asserts"). Teach both autoconf'd and cmake'd Makefiles to define this feature within test/lit.site.cfg. This doesn't require any lit harness changes and should be more robust across build systems. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133664 91177308-0d34-0410-b5e6-96231b3b80d8
* Added LLVM_BUILD_MODE to cmake so that lit supports tests with REQUIRES: ↵Andrew Trick2011-06-16
| | | | | | {buildmode}. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@133205 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle gcc-compatible compilers (such as clang) the same way we handleOscar Fuentes2011-05-11
| | | | | | | | gcc. Fixes PR9886. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131181 91177308-0d34-0410-b5e6-96231b3b80d8
* Disable warning C4181: "qualifier applied to reference type; ignored"Francois Pichet2011-04-19
| | | | | | This was causing a flooding of warnings with MSVC 2008. This warning was removed in MSVC 2010. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129737 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix assignment of -fPIC to CMAKE_C_FLAGS. Configure llvm-config.in.inOscar Fuentes2011-04-01
| | | | | | | | | with the contents of CMAKE_C(XX)_FLAGS too, else `llvm-config --c(xx)flags' doesn't tell the absolute truth. This comes from PR9603 and is based on a patch by Ryuta Suzuki! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@128727 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove remnant of my experimentation with CMake.Oscar Fuentes2011-03-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127244 91177308-0d34-0410-b5e6-96231b3b80d8
* Support for parallel compilation (/MP) when using the VS IDE.Oscar Fuentes2011-03-02
| | | | | | Patch by Erik Olofsson! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126847 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Define LLVM_INCLUDE_TESTS in cmake/modules/HandleLLVMOptions.cmake. ↵NAKAMURA Takumi2011-02-21
| | | | | | It affects testing stuff on clang-standalone build. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126107 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: LLVM_LIT_TOOLS_DIR is needed only on Win32 hosts to use GnuWin32 tools.NAKAMURA Takumi2011-02-10
| | | | | | Unixen and Cygwin do not need it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125277 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Add the new option LLVM_LIT_TOOLS_DIR. It can specify "Path to ↵NAKAMURA Takumi2011-02-09
| | | | | | GnuWin32 tools". git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125173 91177308-0d34-0410-b5e6-96231b3b80d8