# HG changeset patch # User koda # Date 1370647913 -7200 # Node ID 1d2df388fcc64542c0f0d2f0025f687be07a6ab2 # Parent 79c58ff0d4b1d461cecb4527a49408b958919f9d simplify cmake message syntax a little bit diff -r 79c58ff0d4b1 -r 1d2df388fcc6 CMakeLists.txt --- a/CMakeLists.txt Sat Jun 08 01:22:46 2013 +0200 +++ b/CMakeLists.txt Sat Jun 08 01:31:53 2013 +0200 @@ -2,13 +2,6 @@ #initialise cmake environment cmake_minimum_required(VERSION 2.6.0) -if(CMAKE_VERSION VERSION_LESS "2.8") - set(WARNING "WARNING: ") - set(allow_parse_args FALSE) -else() - set(WARNING WARNING) - set(allow_parse_args TRUE) -endif() foreach(hwpolicy CMP0003 CMP0012 CMP0017) if(POLICY ${hwpolicy}) cmake_policy(SET ${hwpolicy} NEW) @@ -142,11 +135,11 @@ #parse additional parameters if(FPFLAGS OR GHFLAGS) - if(${allow_parse_args}) + if(CMAKE_VERSION VERSION_GREATER "2.6") separate_arguments(fpflags_parsed UNIX_COMMAND ${FPFLAGS}) separate_arguments(ghflags_parsed UNIX_COMMAND ${GHFLAGS}) else() - message(${WARNING} "FPFLAGS and GHFLAGS are available only when using CMake >= 2.8") + message("*** FPFLAGS and GHFLAGS are available only when using CMake >= 2.8 ***") endif() endif() diff -r 79c58ff0d4b1 -r 1d2df388fcc6 cmake_modules/platform.cmake --- a/cmake_modules/platform.cmake Sat Jun 08 01:22:46 2013 +0200 +++ b/cmake_modules/platform.cmake Sat Jun 08 01:31:53 2013 +0200 @@ -16,7 +16,7 @@ if(NOT minimum_macosx_version) message(FATAL_ERROR "sw_vers not found! Need explicit MACOSX_DEPLOYMENT_TARGET variable set") else() - message(${WARNING} "sw_vers not found! Fallback to MACOSX_DEPLOYMENT_TARGET variable") + message("*** sw_vers not found! Fallback to MACOSX_DEPLOYMENT_TARGET variable ***") set(current_macosx_version ${minimum_macosx_version}) endif() endif() diff -r 79c58ff0d4b1 -r 1d2df388fcc6 cmake_modules/revinfo.cmake --- a/cmake_modules/revinfo.cmake Sat Jun 08 01:22:46 2013 +0200 +++ b/cmake_modules/revinfo.cmake Sat Jun 08 01:31:53 2013 +0200 @@ -12,7 +12,7 @@ string(REGEX REPLACE "([0-9a-zA-Z]+)(.*) [0-9]+(.*)" "\\1" HEDGEWARS_HASH ${internal_version}) if(HGCHANGED) - message(${WARNING} "You have uncommitted changes in your repository!") + message("*** You have uncommitted changes in your repository ***") endif() #let's assume that if you have hg you might be interested in debugging set(default_build_type "DEBUG") @@ -28,8 +28,8 @@ file(STRINGS ${version_info} internal_version REGEX "hash") string(REGEX REPLACE "hash ([a-zA-Z0-9]*)" "\\1" HEDGEWARS_HASH ${internal_version}) else() - message(${WARNING} "${CMAKE_SOURCE_DIR}/share/version_info.txt not found, revision information " - "will be incorrect!!! Contact your source provider to fix this!") + message(WARNING "${CMAKE_SOURCE_DIR}/share/version_info.txt not found, revision information " + "will be incorrect!!! Contact your source provider to fix this!") set(HEDGEWARS_REVISION "0000") set(HEDGEWARS_HASH "unknown") endif() diff -r 79c58ff0d4b1 -r 1d2df388fcc6 hedgewars/CMakeLists.txt --- a/hedgewars/CMakeLists.txt Sat Jun 08 01:22:46 2013 +0200 +++ b/hedgewars/CMakeLists.txt Sat Jun 08 01:31:53 2013 +0200 @@ -102,7 +102,7 @@ ) if(${BUILD_ENGINE_LIBRARY}) - message(${WARNING} "Engine will be built as library (experimental)") + message("*** Engine will be built as library (experimental) ***") list(APPEND pascal_flags "-dHWLIBRARY") # create position independent code, only required for x68_64 builds, similar to -fPIC