[CMake] ADD_DEFINITIONS in RC10
Brad King
brad.king at kitware.com
Fri May 2 09:24:50 EDT 2008
George Neill wrote:
> Bill,
>
> Seems like RC10 handles quotes differently regarding ADD_DEFINITIONS,
>
> e.g. in 2.4 patch 6
>
> ADD_DEFINITIONS(
> -DSOME_VALUE=\\"value\\"
> )
>
> in 2.6 RC 10
>
> ADD_DEFINITIONS(
> -DSOME_VALUE="value"
> )
>
> Is this expected?
Yes, according to new CMake Policy CMP0005:
http://www.cmake.org/HTML/cmake-2.6.html#command_CMP0005
You should only see the new behavior if you call
cmake_minimum_required(VERSION 2.6) # note value is 2.6 and not 2.4
or explicitly set this policy to NEW behavior. Otherwise CMake preserves
the old behavior and warns. If you require 2.6 there is also this new feature:
http://www.cmake.org/Wiki/CMake_2.6_Notes#Preprocessor_Definitions
-Brad
More information about the CMake
mailing list