[CMake] variables from configuration file
Michael Hertling
mhertling at online.de
Thu Sep 29 18:15:08 EDT 2011
On 09/29/2011 11:42 PM, EXT-Harris, Scott H wrote:
> Hi,
> I am using cmake-2.8.6-rc4.
>
> In my configuration file, config/cmake/linux.cmake, I have:
> set ( COMPILER_HOME /home/harris_s/cots/linux/v12.1/SunStudio12u1-Linux-x86-tar-ML/sunstudio12.1 )
SET(COMPILER_HOME ... CACHE STRING "Compiler home directory")
^^^^^
"-C <initial-cache>: Pre-load a script to populate the cache.
... The given file should be a CMake script containing
SET commands that use the CACHE option, ..."
Regards,
Michael
> and generated my makefiles like:
> cmake -C config/cmake/linux.cmake .
>
> and I would like to use ${COMPILER_HOME} in my CMakeList.txt files but it appears to not be defined.
> For example:
> install (FILES ${COMPILER_HOME}/lib/rw7/std/amd64/librwtool.so.2 DESTINATION ${TLMDISTRO_CLIENT_INSTALL_TOP}/lib)
>
> but I get this error running gmake:
> CMake Error at cmake_install.cmake:106 (FILE):
> file INSTALL cannot find "/lib/rw7/std/amd64/librwtool.so.2".
>
> How can use the COMPILER_HOME value in my CMakeLists.txt files?
>
> Thanks,
> Scott
More information about the CMake
mailing list