Message: Re: cmake additional compiler flags Not Logged In (login)
 Next-in-Thread Next-in-Thread
 Next-in-Forum Next-in-Forum

Question Re: cmake additional compiler flags 

Forum: Installation and Configuration
Re: None cmake additional compiler flags (Tom Roberts)
Re: Note Re: cmake additional compiler flags (Ben Morgan)
Re: None Re: cmake additional compiler flags (Tom Roberts)
Date: 24 Feb, 2012
From: Ben Morgan <Ben Morgan>

On Fri, 24 Feb 2012 16:31:11 GMT, Tom Roberts wrote:
> This does not work (in a Cygwin bash shell on Windows Xp):
>     export CPPFLAGS="-DCOIN_NOT_DLL -DSOWIN_NOT_DLL"
>     export CXXFLAGS="-DCOIN_NOT_DLL -DSOWIN_NOT_DLL"
>     export CCFLAGS="-DCOIN_NOT_DLL -DSOWIN_NOT_DLL"
>     cmake -G "Unix Makefiles" 
>     make
>     ... #error Define either COIN_DLL or COIN_NOT_DLL
> 
> Note that during configuration I get a message "setting default compiler
> flags for CXX", but grep cannot find that string in any file under
> geant4.9.5/source. Indeed the only uses of CXXFLAGS and CPPFLAGS appear
> to be in the various GNUmakefile-s, not the cmake files. So this is
> apparently a cmake feature that I don't understand.

That message is coming from

cmake/Modules/Geant4MakeRules_cxx.cmake 

Did you try as suggested and start from a completely clean build directory (or remove the CMakeCache.txt file that's in there)? Note that by clean build directory, I don't mean that you've run make clean, rather a completely empty directory, or one in which you've removed the CMakeCache.txt file. CMake is particular about caching variables between configurations. If that doesn't work, can you (again starting from a clean build directory), run, instead of exporting, this:

CXXFLAGS="-DCOIN_NOT_DLL -DSOWIN_NOT_DLL" cmake -G "Unix Makefiles"

If that doesn't work, can you try running ccmake with the same arguments (again, start from a clean build directory), press 't' to display the advanced options, and check the value of the variable CMAKE_CXX_FLAGS.

Cheers,

Ben.

Inline Depth:
 1 1
 All All
Outline Depth:
 1 1
 2 2
 All All
Add message: (add)

1 None: Re: cmake additional compiler flags   (Tom Roberts - 27 Feb, 2012)
 Add Message Add Message
to: "Re: cmake additional compiler flags"

 Subscribe Subscribe

This site runs SLAC HyperNews version 1.11-slac-98, derived from the original HyperNews


[ Geant 4 Home | Geant 4 HyperNews | Search | Request New Forum | Feedback ]