[LLVMdev] CMake does not propagate flags to build (original) (raw)
Martin J. O'Riordan Martin.ORiordan at movidius.com
Mon Jul 20 13:39:45 PDT 2015
- Previous message: [LLVMdev] CMake does not propagate flags to build
- Next message: [LLVMdev] CMake does not propagate flags to build
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
I regularly use '-DCMAKE_CXX_FLAGS' when configuring CLang/LLVM to distinguish my builds (Alpha/Beta/Final) or to build custom versions, usually by adding additional '-D' flags, but I discovered I had to add the ':STRING' qualifier to it when invoking 'cmake'. With 'gmake' this is equivalent to '--with-extra-options="whatever flags":
-DCMAKE_CXX_FLAGS:STRING="whatever flags"
This works regardless of whether it is a Debug or Release build.
All the best,
MartinO
-----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Chris Bieneman Sent: 20 July 2015 19:23 To: adek at adek.io Cc: llvmdev at cs.uiuc.edu Subject: Re: [LLVMdev] CMake does not propagate flags to build
Adrian,
What makes you think CMAKE_CXX_FLAGS isn’t being respected?
The tests will always occur regardless of whether or not you set the CXX_FLAGS explicitly.
-Chris
On Jul 20, 2015, at 9:36 AM, adek at adek.io wrote:
Hey Pete, I also tried CMAKECXXFLAGSRELEASE with the same effect. On Mon, Jul 20, 2015, at 09:34 AM, Pete Cooper wrote: Hi Adrian
I’m not sure if the CMAKECXXFLAGS is used in LLVM. We have our own flags for different configurations. I don’t remember if our ones inherit from CMAKECXXFLAGS or override it completely. Anyway, they are: - CMAKECXXFLAGSDEBUG - CMAKECXXFLAGSMINSIZEREL - CMAKECXXFLAGSRELEASE - CMAKECXXFLAGSRELWITHDEBINFO The one of those you get depends on what you set CMAKEBUILDTYPE to. Options are ‘Debug, Release, RelWithDebInfo, MinSizeRel’ Cheers, Pete On Jul 17, 2015, at 8:41 PM, adek at adek.io wrote:
'-DCMAKECXXFLAGS=-fno-omit-frame-pointer -Wno-maybe-uninitialized -fPIC -fPIE' -- The C compiler identification is GNU 4.8.1 -- The CXX compiler identification is GNU 4.8.1 -- Check for working C compiler: /home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/bin/gcc -- Check for working C compiler: /home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/bin/gcc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/bin/g++ -- Check for working CXX compiler: /home/engshare/third-party2/gcc/4.8.1/centos6-native/cc6c9dc/bin/g++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Found PythonInterp: /home/engshare/third-party2/python/2.7.5/centos6-native/da39a3e/bin/ python2.7 (found version "2.7.5") -- Looking for unwind.h -- Looking for unwind.h - found -- Performing Test COMPILERRTHASFPICFLAG -- Performing Test COMPILERRTHASFPICFLAG - Success -- Performing Test COMPILERRTHASFPIEFLAG -- Performing Test COMPILERRTHASFPIEFLAG - Success -- Performing Test COMPILERRTHASFNOBUILTINFLAG -- Performing Test COMPILERRTHASFNOBUILTINFLAG - Success -- Performing Test COMPILERRTHASFNOEXCEPTIONSFLAG -- Performing Test COMPILERRTHASFNOEXCEPTIONSFLAG - Success -- Performing Test COMPILERRTHASFOMITFRAMEPOINTERFLAG -- Performing Test COMPILERRTHASFOMITFRAMEPOINTERFLAG - Success Is it still related to this: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-March/071394.html
Adrian Zgorzałek
LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
- Previous message: [LLVMdev] CMake does not propagate flags to build
- Next message: [LLVMdev] CMake does not propagate flags to build
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]