search for: add_definit

Displaying 20 results from an estimated 54 matches for "add_definit".

2008 Nov 25
0
[LLVMdev] Removal of Visual Studio project files.
On Mon, Nov 24, 2008 at 8:18 PM, Óscar Fuentes <ofv at wanadoo.es> wrote: > OvermindDL1 <overminddl1 at gmail.com> writes: > >>> Chris proposed on IRC to remove the Visual Studio project files and turn >>> CMake into the "standard" for building LLVM with VC++. >>> >>> If you have strong arguments against this, please voice them.
2008 Nov 25
2
[LLVMdev] Removal of Visual Studio project files.
OvermindDL1 <overminddl1 at gmail.com> writes: >> Chris proposed on IRC to remove the Visual Studio project files and turn >> CMake into the "standard" for building LLVM with VC++. >> >> If you have strong arguments against this, please voice them. > > As long as instructions are supplied on how to pass in user defined > macros to the build system.
2016 Oct 14
2
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
...-ffp-contract=off > -O0 -ffp-contract=on > > They are not passing at: > -Ofast -ffp-contract=on > -Ofast -ffp-contract=off Let's separate completely FP-contract and fast-math. They're different things and need different solutions. > if(TEST_SUITE_USES_FAST_MATH) > add_definitions(-DFP_ABSTOLERANCE=1e0) > else() > add_definitions(-DFP_ABSTOLERANCE=1e-5) > endif() This doesn't make sense. If my program decreased precision by 5 orders of magnitude with -ffast-math, I'd be *very* worried. I hope that fast-math in Clang isn't that broken, so that'...
2010 Oct 14
2
[LLVMdev] LLVM use of C++ exceptions and RTTI
On Thu, Oct 14, 2010 at 4:09 PM, Duncan Sands <baldrick at free.fr> wrote: > Hi Francois, > >> In that case, RTTI and exception should also be disabled from CMake >> generated projects right? >> Currently they are enabled all over my MSVC projects. > > I'm not sure what you are asking.  The goal is for LLVM to not require > RTTI or exception handling.
2008 Nov 25
2
[LLVMdev] Removal of Visual Studio project files.
...; functions (like strcpy, sprintf, std::copy, etc.) that a dumb > developer could get exploited with. Turn them off with these: > > _CRT_SECURE_NO_WARNINGS // C deprecation > _SCL_SECURE_NO_WARNINGS // C++ deprecation > Those and others already are defined by default: if( MSVC ) add_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS ) add_definitions( -D_SCL_SECURE_NO_WARNINGS -DCRT_NONSTDC_NO_WARNINGS ) add_definitions( -D_SCL_SECURE_NO_DEPRECATE ) add_definitions( -wd4146 -wd4503 -wd4996 -wd4800 -wd4244 -wd4624 ) add_definitions( -wd4355 -wd4715 ) endif( MSVC...
2012 Nov 27
0
[LLVMdev] Building llvm and clang with mixed assertion modes
...nno about the configure&make build, but with the cmake build you can do that by building clang standalone (build and install LLVM without clang, then build clang using LLVM as an external library, enabling/disabling assertions as you like). You can also modify clang/CMakeLists.txt by changing add_definitions( -D_GNU_SOURCE ) to add_definitions( -D_GNU_SOURCE -U_DEBUG -DNDEBUG ) which disables assertions for clang. Then build LLVM+Clang using the option for enabling assertions: mkdir mybuilddir && cd mybuilddir cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON path/to/llvm/src...
2012 Nov 27
2
[LLVMdev] Building llvm and clang with mixed assertion modes
Hi, I'd like to build llvm with assertions enabled, but build clang with assertions disabled. In other words, I'd like lvm in Release+Asserts mode, but clang in Release mode. Is it possible to do this with one top level configure/make command? If not, any idea how much work would it be to add this feature to llvm? I'm not very familiar with llvm's build system. Thanks!
2017 Oct 04
3
Question: Should we consider valid a variable defined #ifndef NDEBUG scope and used in assert?
...e Poisoned line 494 This works because when we build LLVM with assert we explicitly disable NDEBUG: if( LLVM_ENABLE_ASSERTIONS ) […] # On non-Debug builds cmake automatically defines NDEBUG, so we # explicitly undefine it: if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) add_definitions( -UNDEBUG ) If we use this header in a different project and thus, with potentially different rules for macro definitions, the compiler complains with error: use of undeclared identifier ‘Poisoned' I think the right thing to do is to fix the code to work without the special way of setti...
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...ust setting LLVM_DIR will make find_package work, you need to # add it to CMAKE_MODULE_PATH if you want to include AddLLVM, e.g., if # you want to use add_llvm_loadable_module. set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{LLVM_DIR}") find_package(LLVM REQUIRED CONFIG) include(AddLLVM) add_definitions(${LLVM_DEFINITIONS}) include_directories(${LLVM_INCLUDE_DIRS}) link_directories(${LLVM_LIBRARY_DIRS}) On Sun, Oct 9, 2016 at 2:03 PM, Timo Janssen via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi, > > > I am sorry but I really am not good with cmake yet. > > I...
2016 Oct 12
4
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
On Wed, Oct 12, 2016 at 10:53 AM, Hal Finkel <hfinkel at anl.gov> wrote: > I don't think that Clang/LLVM uses it by default on x86_64. If you're using -Ofast, however, that would explain it. I recommend looking at -O3 vs -O0 and make sure those are the same. -Ofast enables -ffast-math, which can legitimately cause differences. > The following tests pass at "-O3" and
2010 Nov 03
6
[LLVMdev] LLVM Cmake module?
...s_wrap.c.o] Error 1 >> make[1]: *** [CMakeFiles/jllvm.dir/all] Error 2 >> make: *** [all] Error 2 Yes, you must define __STDC_LIMIT_MACROS and __STDC_CONSTANT_MACROS on your CMakeLists.txt. Put this before any add_executable/add_library that contains source files that uses LLVM stuff: add_definitions( -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS )
2010 Sep 09
2
[LLVMdev] [PATCH][CMake] Removing LLVMLibDeps.cmake and exporting libraries for CMake clients.
...you already specify in the CMakeLists.txt file for the component. The attached patches remove this requirement, and add real CMake package export capabilities. A CMake user wishing to use LLVM can now use something similar to this: cmake_minimum_required(VERSION 2.8) find_package(LLVM REQUIRED) add_definitions(${LLVM_CXXFLAGS}) add_executable(llvm-external-test llvm-external-test.cpp) target_link_libraries(llvm-external-test ${LLVM_SYSTEM_LIBS} ${LLVM_JIT_LIBS} ${LLVM_NATIVECODEGEN_LIBS}) llvm+clang compile with these changes on both Linux and MSVS. Currently both patches must be applied at the same...
2016 Oct 14
3
[test-suite] making polybench/symm succeed with "-Ofast" and "-ffp-contract=on"
...; > -Ofast -ffp-contract=on >> > -Ofast -ffp-contract=off >> >> Let's separate completely FP-contract and fast-math. They're >> different >> things and need different solutions. >> >> >> > if(TEST_SUITE_USES_FAST_MATH) >> > add_definitions(-DFP_ABSTOLERANCE=1e0) >> > else() >> > add_definitions(-DFP_ABSTOLERANCE=1e-5) >> > endif() >> >> This doesn't make sense. If my program decreased precision by 5 >> orders >> of magnitude with -ffast-math, I'd be *very* worried. >...
2012 Oct 05
4
[LLVMdev] problem with my LLVM pass
...l updated? http://www.llvm.org/docs/CMake.html#developing-llvm-pass-out-of-source i follow the instruction from the link, and create in my ~/test/ directory the CMakeLists.txt with following content: $cat test/CMakeLists.txt find_package(LLVM) # Define add_llvm_* macro's. include(AddLLVM) add_definitions(${LLVM_DEFINITIONS}) include_directories(${LLVM_INCLUDE_DIRS}) link_directories(${LLVM_LIBRARY_DIRS}) add_subdirectory(Hello) ====== inside test/, i put Hello/ directory, copied from llvm-3.1.src/lib/Transforms/Hello. then inside test/, i tried to compile: test$ cmake . -- The C compiler id...
2013 Dec 29
2
[LLVMdev] [PATCH] Prevent CMake from installing libgtest*.
...nittest/CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/unittest/CMakeLists.txt b/utils/unittest/CMakeLists.txt index fd1a048..c11c110 100644 --- a/utils/unittest/CMakeLists.txt +++ b/utils/unittest/CMakeLists.txt @@ -38,6 +38,9 @@ if(MSVC AND MSVC_VERSION EQUAL 1700) add_definitions(-D_VARIADIC_MAX=10) endif () +# Delay building until the tests pull it in, and avoid installing it. +set(EXCLUDE_FROM_ALL ON) + add_llvm_library(gtest googletest/src/gtest-all.cc ) -- 1.8.5.2
2016 Oct 10
2
Embedding llvm as a git submodule in Project
...find_package work, you need to > # add it to CMAKE_MODULE_PATH if you want to include AddLLVM, e.g., if > # you want to use add_llvm_loadable_module. > set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{LLVM_DIR}") > find_package(LLVM REQUIRED CONFIG) > include(AddLLVM) > add_definitions(${LLVM_DEFINITIONS}) > include_directories(${LLVM_INCLUDE_DIRS}) > link_directories(${LLVM_LIBRARY_DIRS}) > > > > On Sun, Oct 9, 2016 at 2:03 PM, Timo Janssen via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hi, >> >> >> I am sorry b...
2010 Sep 09
0
[LLVMdev] [PATCH][CMake] Removing LLVMLibDeps.cmake and exporting libraries for CMake clients.
...le for the component. > > The attached patches remove this requirement, and add real CMake > package export capabilities. A CMake user wishing to use LLVM can now > use something similar to this: > > cmake_minimum_required(VERSION 2.8) > > find_package(LLVM REQUIRED) > add_definitions(${LLVM_CXXFLAGS}) > add_executable(llvm-external-test llvm-external-test.cpp) > target_link_libraries(llvm-external-test ${LLVM_SYSTEM_LIBS} > ${LLVM_JIT_LIBS} ${LLVM_NATIVECODEGEN_LIBS}) > > llvm+clang compile with these changes on both Linux and MSVS. > Currently both patch...
2016 Oct 09
3
Embedding llvm as a git submodule in Project
Hi all. I want to use llvm in my project and I want to make llvm a git submodule in my project. http://llvm.org/docs/CMake.html#embedding-llvm-in-your-project At this in the documentation it claims to describe how to embed llvm into a project. I tried it that way but it doesn't work, because there isn't any findLLVM.cmake in the llvm/cmake/modules directory anymore (i don't
2012 Oct 18
0
[LLVMdev] problem with my LLVM pass
...ake or a configuration file for > package LLVM. This error occurs when llvm-config is not in the path. I tried the same thing by copying the CMake snippets from the above page into a new file: $ cd test $ cat CMakeLists.txt find_package(LLVM) # Define add_llvm_* macro's. include(AddLLVM) add_definitions(${LLVM_DEFINITIONS}) include_directories(${LLVM_INCLUDE_DIRS}) link_directories(${LLVM_LIBRARY_DIRS}) add_subdirectory(<pass name>) add_llvm_loadable_module(LLVMPassname Pass.cpp ) $ cmake . Everything worked at this stage. But if I removed llvm-config from my PATH, I get the fol...
2017 Oct 04
2
Question: Should we consider valid a variable defined #ifndef NDEBUG scope and used in assert?
...s because when we build LLVM with assert we explicitly disable NDEBUG: > if( LLVM_ENABLE_ASSERTIONS ) > […] > # On non-Debug builds cmake automatically defines NDEBUG, so we > # explicitly undefine it: > if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" ) > add_definitions( -UNDEBUG ) > > If we use this header in a different project and thus, with potentially different rules for macro definitions, the compiler complains with > error: use of undeclared identifier ‘Poisoned' > > I think the right thing to do is to fix the code to work without...