Thanks. configopts actually seems to work. I think before I actually overlooked the verbose cmake command, and didn’t see that the CMAKE_CXX_FLAGS was actually repeated.
> On Oct 5, 2016, at 7:11 PM, Jack Perdue <[email protected]> wrote: > > On 10/05/2016 11:40 AM, Michele Dolfi wrote: >> Dear EasyBuild experts, >> >> I would like to enable C++11 inside some EB config file. >> Usually, in a CMake project, I was doing -DCMAKE_CXX_FLAGS=“-std=c++11”. >> However EB overrides it if I put it in `configopts`. >> >> >> If I read the log correctly, EB is setting the optimization options in the >> CMAKE_CXX_FLAGS. Personally I think this is a wrong behavior, because >> optimization flags in CMake are delivered by the BuildMode (Debug, Release, >> …), and those CXXFLAGS should be overridden in CMAKE_CXX_FLAGS_RELEASE. >> > > preconfigopts most definitely won't work given > the CMakeMake.py easyblock. > > I usually add to configopts something like: > > -DCMAKE_CXX_FLAGS=“$CXXFLAGS -std=c++11" > > which usually works since it appears later on the command > line and seems to override EB's setting, > > YMMV (not sure why it isn't working for you) > > jack >

