[CMake] what is the right way to set CMAKE_USE_RELATIVE_PATHS?

Michael Jackson mike.jackson at bluequartz.net
Mon Dec 21 16:04:06 EST 2009


There are lots of questions on this CMake variable and the consensus  
is DO NOT USE IT. PERIOD. The implementation is basically broken for  
all but the most trivial case.
_________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio

On Dec 21, 2009, at 3:59 PM, John Drescher wrote:

> On Mon, Dec 21, 2009 at 3:50 PM, Claus Klein  
> <claus.klein at arcormail.de> wrote:
>> Hi all,
>>
>> I tried to use:
>>   set(CMAKE_USE_RELATIVE_PATHS ON)
>> in my CMakeLists.txt.
>>
>> But I noticed, that some cmake variables can't be changed in that  
>> way.
>> In the CMakeCache.txt, it is still OFF?
>>
> I have no idea about CMAKE_USE_RELATIVE_PATHS since I have never
> needed/wanted to use that however for the other cases that it appears
> the CMake does not let me change a value I usually get around this
> using the following examples:
>
> SET (CMAKE_INSTALL_PREFIX ${PGM_FILES}/UPMC/${CMAKE_PROJECT_NAME}
> CACHE STRING "Default Install Path" FORCE)
>
>
> IF (MAKE_DEBUGRELEASE)
> SET (CMAKE_CONFIGURATION_TYPES "Debug;RelWithDebInfo" CACHE STRING
> "Debug;RelWithDebInfo" FORCE)
> SET (RELEASE_BUILD_NAME "RelWithDebInfo")
> ELSE(MAKE_DEBUGRELEASE)
> SET (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING
> "Debug;Release" FORCE)
> SET (RELEASE_BUILD_NAME "Release")
> ENDIF (MAKE_DEBUGRELEASE)
>
>
> The keys are CACHE and FORCE.
>
>
> John
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list