Skip to content

Commit

Permalink
Re-added old feature that was present in previous versions of the CMake
Browse files Browse the repository at this point in the history
files: set policy CMP0003 to "old" in order to work around warnings about
escaped quotes in ADD_DEFINITIONS statements.
  • Loading branch information
Joerg Riesmeier committed Jun 29, 2010
1 parent 9e9b45f commit 7f84bea
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGES.355
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ Changes between releases are documented here.
files: commented definition of DCMTK_BUILD_DATE and non-public modules.
Affects: CMakeLists.txt

- Re-added old feature that was present in previous versions of the CMake
files: set policy CMP0003 to "old" in order to work around warnings about
escaped quotes in ADD_DEFINITIONS statements.
Affects: CMakeLists.txt

**** Changes from 2010.06.29 (schlachter)

- Avoid an unneeded call to strlen().
Expand Down
13 changes: 8 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ SET(INSTALL_MANDIR "/share/man")
# set project wide flags for compiler and linker

IF(WIN32)
OPTION(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS "Overwrite compiler flags with DCMTK's WIN32 package default values." ON)
OPTION(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS "Overwrite compiler flags with DCMTK's WIN32 package default values." ON)
ENDIF(WIN32)

IF(DCMTK_OVERWRITE_WIN32_COMPILER_FLAGS)
Expand Down Expand Up @@ -266,12 +266,15 @@ IF(WITH_THREADS)
ENDIF(HAVE_PTHREAD_H)
ENDIF(WITH_THREADS)

# Enable new cmake behaviour when dealing with libraries whose full path is
# given to the linker. This is necessary to avoid warnings in cmake versions
# greater lower than 2.6.
# See http://www.cmake.org/cmake/help/cmake-2.6.html#policy:CMP0003
IF(COMMAND CMAKE_POLICY)
# Enable new CMake behaviour when dealing with libraries whose full path is
# given to the linker. This is necessary to avoid warnings in CMake versions
# greater than 2.6.
# See http://www.cmake.org/cmake/help/cmake-2.6.html#policy:CMP0003
CMAKE_POLICY(SET CMP0003 NEW)

# Works around warnings about escaped quotes in ADD_DEFINITIONS statements
CMAKE_POLICY(SET CMP0005 OLD)
ENDIF(COMMAND CMAKE_POLICY)

#-----------------------------------------------------------------------------
Expand Down

0 comments on commit 7f84bea

Please sign in to comment.