trinity-users@lists.pearsoncomputing.net

Message: previous - next
Month: February 2011

Re: [trinity-users] Built gcc 4.3.4-3 -- howto change Trinity cmake files to use gcc 4.3.4 instead of gcc 4.5.2

From: "David C. Rankin" <drankinatty@...>
Date: Sun, 13 Feb 2011 21:42:11 -0600
On 02/13/2011 09:33 PM, David C. Rankin wrote:
>   But where? Guessing, I think I can do this is CMakeLists.txt with something
> similar to the following:
> 
> ###### global compiler settings #################
> 
> add_definitions(
>   -DHAVE_CONFIG_H
>   ${TQT_CFLAGS_OTHER}
> )
> 
> set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include tqt.h" )
> set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
> set( CMAKE_MODULE_LINKER_FLAGS "-Wl,--no-undefined" )
> 
> ##### dcr cmake flags for gcc-4.3 ###############
> 
> set( CMAKE_C_COMPILER "gcc-4.3" )
> set( CMAKE_CXX_COMPILER "g++-4.3" )
> 
>   I'll see if this will work, but if this isn't right, please let me know what
> else to try. Thanks.
> 

I think I have it:

  cmake ../ \
    -DCMAKE_C_COMPILER="/usr/bin/gcc-4.3" \
    -DCMAKE_CXX_COMPILER="/usr/bin/g++-4.3" \
    -DCMAKE_INSTALL_PREFIX=${trinity_prefix} \
    -DCMAKE_VERBOSE_MAKEFILE=ON \
    -DWITH_QT3=ON \
    -DQTDIR=/opt/qt \
    -DQT_LIBRARY_DIRS=/opt/qt/lib \
    -DBUILD_ALL=ON
  make VERBOSE=1

It's building....

-- 
David C. Rankin, J.D.,P.E.