--- a/CMakeLists.txt Wed Oct 09 15:30:29 2019 +0200
+++ b/CMakeLists.txt Wed Oct 09 16:35:06 2019 +0200
@@ -54,7 +54,7 @@
if(BUILD_ENGINE_C AND NOT NOVIDEOREC)
- if((CMAKE_BUILD_TYPE MATCHES "RELEASE") OR (CMAKE_BUILD_TYPE MATCHES "RELWITHDEBUGINFO"))
+ if((CMAKE_BUILD_TYPE MATCHES "Release") OR (CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo"))
message("NOTE: Video recorder support disabled. It's incompatible with BUILD_ENGINE_C")
set(BUILD_ENGINE_C ON CACHE STRING "Required for BUILD_ENGINE_JS" FORCE)
else()
@@ -93,7 +93,7 @@
set(CPACK_PACKAGE_VERSION_MINOR 0)
set(CPACK_PACKAGE_VERSION_PATCH 0)
set(HEDGEWARS_PROTO_VER 59)
-if((CMAKE_BUILD_TYPE MATCHES "RELEASE") OR (CMAKE_BUILD_TYPE MATCHES "RELWITHDEBUGINFO"))
+if((CMAKE_BUILD_TYPE MATCHES "Release") OR (CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo"))
set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
else()
set(HEDGEWARS_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-dev")
@@ -113,9 +113,9 @@
#when build type is not specified, assume Debug/Release according to build version information
if(CMAKE_BUILD_TYPE)
string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)
- if(NOT((CMAKE_BUILD_TYPE MATCHES "RELEASE") OR
- (CMAKE_BUILD_TYPE MATCHES "DEBUG") OR
- (CMAKE_BUILD_TYPE MATCHES "RELWITHDEBINFO")))
+ if(NOT((CMAKE_BUILD_TYPE MATCHES "Release") OR
+ (CMAKE_BUILD_TYPE MATCHES "Debug") OR
+ (CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")))
set(CMAKE_BUILD_TYPE ${default_build_type} CACHE STRING "Build type (Debug/Release/RelWithDebInfo)" FORCE)
message(STATUS "Unknown build type ${CMAKE_BUILD_TYPE}, using default (${default_build_type})")
endif()
@@ -168,7 +168,7 @@
#get BUILD_TYPE and enable/disable optimisation
message(STATUS "Using ${CMAKE_BUILD_TYPE} configuration")
-if(CMAKE_BUILD_TYPE MATCHES "DEBUG")
+if(CMAKE_BUILD_TYPE MATCHES "Debug")
list(APPEND haskell_flags "-Wall" # all warnings
"-debug" # debug mode
"-fno-warn-unused-do-bind"
--- a/QTfrontend/CMakeLists.txt Wed Oct 09 15:30:29 2019 +0200
+++ b/QTfrontend/CMakeLists.txt Wed Oct 09 16:35:06 2019 +0200
@@ -213,9 +213,9 @@
#when debugging, always prompt a console to see fronted messages
#TODO: check it doesn't interfere on UNIX
-if(CMAKE_BUILD_TYPE MATCHES "RELEASE" OR CMAKE_BUILD_TYPE MATCHES "RELWITHDEBINFO")
+if(CMAKE_BUILD_TYPE MATCHES "Release" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
set(console_access "WIN32")
-endif(CMAKE_BUILD_TYPE MATCHES "RELEASE" OR CMAKE_BUILD_TYPE MATCHES "RELWITHDEBINFO")
+endif(CMAKE_BUILD_TYPE MATCHES "Release" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
add_executable(hedgewars ${console_access}
${hwfr_src}
--- a/cmake_modules/compilerchecks.cmake Wed Oct 09 15:30:29 2019 +0200
+++ b/cmake_modules/compilerchecks.cmake Wed Oct 09 16:35:06 2019 +0200
@@ -62,7 +62,7 @@
endif()
endif()
- if(CMAKE_BUILD_TYPE MATCHES "RELEASE" OR CMAKE_BUILD_TYPE MATCHES "RELWITHDEBINFO")
+ if(CMAKE_BUILD_TYPE MATCHES "Release" OR CMAKE_BUILD_TYPE MATCHES "RelWithDebInfo")
set(CMAKE_REQUIRED_FLAGS "-Wl,--as-needed")
check_c_compiler_flag("" HAVE_ASNEEDED)
if(HAVE_ASNEEDED)
--- a/cmake_modules/cpackvars.cmake Wed Oct 09 15:30:29 2019 +0200
+++ b/cmake_modules/cpackvars.cmake Wed Oct 09 16:35:06 2019 +0200
@@ -1,6 +1,6 @@
# revision information in cpack-generated names
-if(CMAKE_BUILD_TYPE MATCHES DEBUG)
+if(CMAKE_BUILD_TYPE MATCHES "Debug")
set(full_suffix "${HEDGEWARS_VERSION}-r${HEDGEWARS_REVISION}")
else()
set(full_suffix "${HEDGEWARS_VERSION}")
--- a/cmake_modules/revinfo.cmake Wed Oct 09 15:30:29 2019 +0200
+++ b/cmake_modules/revinfo.cmake Wed Oct 09 16:35:06 2019 +0200
@@ -17,7 +17,7 @@
endif()
#let's assume that if you have hg you might be interested in debugging
- set(default_build_type "DEBUG")
+ set(default_build_type "Debug")
#write down hash and rev for easy picking should hg be missing
file(WRITE "${CMAKE_SOURCE_DIR}/share/version_info.txt" "Hedgewars versioning information, do not modify\nrev ${HEDGEWARS_REVISION}\nhash ${HEDGEWARS_HASH}\n")
@@ -30,12 +30,12 @@
set(HEDGEWARS_REVISION "GIT")
#let's assume that if you have git you might be interested in debugging
- set(default_build_type "DEBUG")
+ set(default_build_type "Debug")
#write down hash and rev for easy picking should hg be missing
file(WRITE "${CMAKE_SOURCE_DIR}/share/version_info.txt" "Hedgewars versioning information, do not modify\nrev ${HEDGEWARS_REVISION}\nhash ${HEDGEWARS_HASH}\n")
else()
- set(default_build_type "RELEASE")
+ set(default_build_type "Release")
# when compiling outside rev control, fetch revision and hash information from version_info.txt
find_file(version_info version_info.txt PATH ${CMAKE_SOURCE_DIR}/share)
if(version_info)