[Dune] changing to cmake
Atgeirr.Rasmussen at sintef.no
Wed Jan 7 21:24:26 CET 2015
I have had the same need. My solution is to pre-populate the cache with the -C option to cmake:
cmake -C my_cmake_options.cmake the_dir_with_CMakeLists.txt
where the my_cmake_options.cmake file contains:
set(CMAKE_CXX_COMPILER "clang++" CACHE STRING "C++ compiler")
and other things that I need often. With the above, the correct compiler is chosen (clang in my case).
I am not sure how to do this via dunecontrol, but perhaps adding the -C <file> option in CMAKE_FLAGS would work.
7. jan. 2015 kl. 19:30 skrev Arya Fallahi <arya.fallahi at gmail.com>:
> Hi Christoph,
> I have done that and additionally it seems CMake does not recognize g++-4.7 itself. It needs the absolute path. The problem that I have now is that ALUGrid can not be found by the compiler. Currently the opts file is looking like this:
> GXX_OPTS="-O3 -g0"
> CMAKE_FLAGS=" \
> CXXFLAGS=\"$GXX_OPTS\" \
> MPICC=$HOME/extlib/openmpi-1.6/bin/mpicc \
> However, I receive the following error when dune-geometry is compiling:
> configure: searching for ALUGrid in /usr...
> configure: searching for ALUGrid in /usr/local...
> configure: searching for ALUGrid in /usr/local/alugrid...
> configure: searching for ALUGrid in /opt/alugrid...
> checking ALUGrid version >= 1.52... no
> checking alugrid_serial.h usability... no
> checking alugrid_serial.h presence... no
> checking for alugrid_serial.h... no
> configure: WARNING: alugrid_serial.h not found in /include
> configure: error: could not find required module dune-geometry
> --- Failed to build dune-grid ---
> Terminating dunecontrol due to previous errors!
> I am just copy and pasting from the website. But, it seems something is wrong in the guide lines.
> On Wed, Jan 7, 2015 at 7:16 PM, Christoph Grüninger <christoph.grueninger at iws.uni-stuttgart.de> wrote:
> Hi Arya,
> delete the build directory.
> Am 07.01.2015 um 18:35 schrieb Arya Fallahi <arya.fallahi at gmail.com>:
>> Hi Christoph,
>> Thank you very much for the quick reply. I did what you said. However, it seems the compiler gets trap in a loop. It returns the following message and does some configuring which again is followed by the message below. Do you know what is exactly happening?
>> -- Configuring done
>> You have changed variables that require your cache to be deleted.
>> Configure will be re-run and you may have to reset some variables.
>> The following variables have changed:
>> CMAKE_CXX_COMPILER= g++-4.7
>> On Wed, Jan 7, 2015 at 6:13 PM, Christoph Grüninger <christoph.grueninger at iws.uni-stuttgart.de> wrote:
>> Hi Arya,
>> instead of
>> you should add it to the CMAKE_FLAGS like
>> All CMake variables are passed -D<variablename>=<value> in the
>> CMAKE_FLAGS variable.
>> GDB does hate your application, expresses its contempt through the
>> design of its command-line interface. -- Tom Tromey, FOSDEM 2014
>> Dune mailing list
>> Dune at dune-project.org
> Dune mailing list
> Dune at dune-project.org
More information about the Dune