diff --git a/CMakeLists.txt b/CMakeLists.txt index 52bcfe147..977d57bec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -85,6 +85,9 @@ # written. CMAKE_MINIMUM_REQUIRED(VERSION 2.6.3 FATAL_ERROR) +IF(POLICY CMP0025) + CMAKE_POLICY(SET CMP0025 NEW) +ENDIF() #----------------------------------------------------------------------------- # If a namespace is not specified, use "kwsys" and enable testing. diff --git a/SystemTools.cxx b/SystemTools.cxx index b6a243706..32e79e62f 100644 --- a/SystemTools.cxx +++ b/SystemTools.cxx @@ -4918,8 +4918,8 @@ void SystemTools::ClassInitialize() // Strip off one directory level and see if the logical // mapping still works. - pwd_str = SystemTools::GetFilenamePath(pwd_str.c_str()); - cwd_str = SystemTools::GetFilenamePath(cwd_str.c_str()); + pwd_str = SystemTools::GetFilenamePath(pwd_str); + cwd_str = SystemTools::GetFilenamePath(cwd_str); Realpath(pwd_str.c_str(), pwd_path); }