cmake: forbid user to use experimental flags

Namely GTK3_API and 64BIT_BUILD_DONT_WORK

The former was barely tested and doesn't compile with standard wx
The latter doesn't work at all

Note: I was very close to disable SDL2 too.  If wxWidget was built with
SDL1 support it will crash
This commit is contained in:
Gregory Hainaut 2014-12-21 10:46:33 +01:00
parent 1f54bb73aa
commit dc1cd3eb25
1 changed files with 12 additions and 0 deletions

View File

@ -288,3 +288,15 @@ if(DEFINED USER_CMAKE_CXX_FLAGS)
endif() endif()
# Use some default machine flags # Use some default machine flags
string(STRIP "${CMAKE_CXX_FLAGS} ${DEFAULT_CPP_FLAG}" CMAKE_CXX_FLAGS) string(STRIP "${CMAKE_CXX_FLAGS} ${DEFAULT_CPP_FLAG}" CMAKE_CXX_FLAGS)
#-------------------------------------------------------------------------------
# Too much user/packager use experimental flags as release flags
#-------------------------------------------------------------------------------
if(CMAKE_BUILD_TYPE MATCHES "Release" OR PACKAGE_MODE)
if (64BIT_BUILD_DONT_WORK)
message(FATAL_ERROR "64 bit is not suitable for end users. It will only crash and it will be 10 times slower than 32 bits !!!")
endif()
if (GTK3_API)
message(FATAL_ERROR "GTK3 is highly experimental besides it requires a wxWidget built with __WXGTK3__ support !!!")
endif()
endif()