[CMake] Where to change default link line on Cmake
Rene Salmon
salmr0 at bp.com
Tue May 4 17:37:16 EDT 2010
> Prior to 2.8.1 CMake had a bug that led to use of -rdynamic with xlc
> on Linux. Are you sure that the "ccmake" that you're running is 2.8.1?
Yes.
hpci6001t(salmr0)133:ccmake -version
ccmake version 2.8.1
>> I am doing and out of source build. Something like this.
>> hpci6001t(salmr0)54:mkdir build
>> hpci6001t(salmr0)55:cd build/
>
> Just to confirm, the source tree was pristine at this point, right?
> There was no previous in-source build?
Correct nothing left from any in-source builds.
>> hpci6001t(salmr0)56:ccmake ../CMakeLists.txt
>
> FYI, this can simply be "cmake .." in your case. You don't need to specify
> the CMakeLists.txt file, just the directory containing it.
OK. Good to know.
> Did the initial run of CMake report the compiler id? It may
> not have been visible for long if you used the curses dialog.
> Try running the command-line cmake:
>
> $ rm -rf build
> $ mkdir build
> $ cd build
> $ cmake ..
>
> to see if it reports the compiler id.
Ahhh.. That is the problem cmake is not detecting the correct compiler ID.
hpci6001t(salmr0)139:rm -rf build/
hpci6001t(salmr0)140:mkdir build
hpci6001t(salmr0)141:cd build
/gpfs01/vol0/salmr0/mspain/fd/build
hpci6001t(salmr0)142:cmake ..
-- The C compiler identification is GNU
-- The Fortran compiler identification is GNU
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working Fortran compiler: /usr/bin/gfortran
-- Check for working Fortran compiler: /usr/bin/gfortran -- works
-- Detecting Fortran compiler ABI info
-- Detecting Fortran compiler ABI info - done
-- Checking whether /usr/bin/gfortran supports Fortran 90
-- Checking whether /usr/bin/gfortran supports Fortran 90 -- yes
-- CMAKE_SHARED_LINKER_FLAGS
-- CMAKE_MODULE_LINKER_FLAGS
-- CMAKE_SYSTEM_NAME = Linux
-- CMAKE_SYSTEM_PROCESSOR = ppc64
-- CMAKE_MODULE_PATH =
-- CMAKE_CURRENT_BINARY_DIR = /gpfs01/vol0/salmr0/mspain/fd/build
-- Configuring done
-- Generating done
-- Build files have been written to: /gpfs01/vol0/salmr0/mspain/fd/build
I guess I need to INCLUDE or something the:
Modules/CMakeDetermineCompilerId.cmake
File in my CMakeLists.txt file? Also I put in some message like this one:
message(STATUS "CMAKE_MODULE_PATH = ${CMAKE_MODULE_PATH}")
And as you can tell from the output above It looks like cmake does not know
the CMAKE_MODULE_PATH. Should that have been set or is that something Every
user should have to put in their CMAKE_MODULE_PATH file?
Thanks
Rene
More information about the CMake
mailing list