From Jean-Sebastien Guay, "This is a fix for the warning we've been discussing on osg-users. CMake 2.6.0 allows quotes to be unescaped in strings in ADD_DEFINITIONS statements, where we had to escape them before (CMake 2.4.x). Setting CMake policy CMP0005 to OLD removes the warning for 2.6.0, and the quotes are still escaped, so it still works with 2.4.x.

"
This commit is contained in:
Robert Osfield 2008-05-30 16:53:45 +00:00
parent 0a6b4d5709
commit 5c30b98785

View File

@ -11,10 +11,14 @@ ELSE(WIN32)
ENDIF(APPLE) ENDIF(APPLE)
ENDIF(WIN32) ENDIF(WIN32)
# Works around warnings libraries linked against that don't
# have absolute paths (e.g. -lpthreads)
if(COMMAND cmake_policy) if(COMMAND cmake_policy)
# Works around warnings libraries linked against that don't
# have absolute paths (e.g. -lpthreads)
cmake_policy(SET CMP0003 NEW) cmake_policy(SET CMP0003 NEW)
# Works around warnings about escaped quotes in ADD_DEFINITIONS
# statements.
cmake_policy(SET CMP0005 OLD)
endif(COMMAND cmake_policy) endif(COMMAND cmake_policy)
PROJECT(OpenSceneGraph) PROJECT(OpenSceneGraph)