[Orxonox-commit 5522] r10185 - in code/trunk: cmake/tools src

landauf at orxonox.net landauf at orxonox.net
Sat Jan 10 14:22:06 CET 2015


Author: landauf
Date: 2015-01-10 14:22:06 +0100 (Sat, 10 Jan 2015)
New Revision: 10185

Modified:
   code/trunk/cmake/tools/TargetUtilities.cmake
   code/trunk/src/CMakeLists.txt
Log:
fixed warnings with cmake 3.1

Modified: code/trunk/cmake/tools/TargetUtilities.cmake
===================================================================
--- code/trunk/cmake/tools/TargetUtilities.cmake	2014-12-17 14:43:07 UTC (rev 10184)
+++ code/trunk/cmake/tools/TargetUtilities.cmake	2015-01-10 13:22:06 UTC (rev 10185)
@@ -447,8 +447,10 @@
   # We use the properties to get the name because the librarys name may differ from
   # the target name (for example orxonox <-> liborxonox)
 
+  CMAKE_POLICY(SET CMP0026 OLD) # we only use the file's name, not its actual location, so the old policy is fine
   GET_TARGET_PROPERTY(_target_loc ${_target} LOCATION)
   GET_FILENAME_COMPONENT(_target_name ${_target_loc} NAME_WE)
+  CMAKE_POLICY(SET CMP0026 NEW) # set policy back to 'new'
 
   IF(CMAKE_CONFIGURATION_TYPES)
     FOREACH(_config ${CMAKE_CONFIGURATION_TYPES})

Modified: code/trunk/src/CMakeLists.txt
===================================================================
--- code/trunk/src/CMakeLists.txt	2014-12-17 14:43:07 UTC (rev 10184)
+++ code/trunk/src/CMakeLists.txt	2015-01-10 13:22:06 UTC (rev 10185)
@@ -72,9 +72,11 @@
 ADD_DEPENDENCIES(orxonox-main ${ORXONOX_MODULES})
 
 # Get name to configure the run scripts
+CMAKE_POLICY(SET CMP0026 OLD) # we only use the file's name, not its actual location, so the old policy is fine
 GET_TARGET_PROPERTY(_exec_loc orxonox-main LOCATION)
 GET_FILENAME_COMPONENT(_exec_name ${_exec_loc} NAME)
 SET(ORXONOX_EXECUTABLE_NAME ${_exec_name} CACHE INTERNAL "")
+CMAKE_POLICY(SET CMP0026 NEW) # set policy back to 'new'
 
 
 # Apple Mac OS X specific build settings




More information about the Orxonox-commit mailing list