diff options
author | Tony Theodore <tonyt@logyst.com> | 2017-03-15 13:04:27 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-15 13:04:27 (GMT) |
commit | a3e0b6a3419abfd4ac52415793f5642737bf2855 (patch) | |
tree | 3406bf5b23d6d79729c6d5fd13524f337af801dd /src | |
parent | 40566ba1f18dfdb386be36b79fbbdd67b50fdb05 (diff) | |
parent | aa4a5223c2cac4ffc069a103dcc2c63fe1e98db5 (diff) | |
download | mxe-a3e0b6a3419abfd4ac52415793f5642737bf2855.zip mxe-a3e0b6a3419abfd4ac52415793f5642737bf2855.tar.gz mxe-a3e0b6a3419abfd4ac52415793f5642737bf2855.tar.bz2 |
Merge pull request #1717 from LuaAndC/cmake-release-in-script
support overriding CMAKE_BUILD_TYPE in cmdline
Diffstat (limited to 'src')
-rw-r--r-- | src/cmake/conf/mxe-conf.cmake.in | 1 | ||||
-rw-r--r-- | src/cmake/conf/target-cmake.in | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/src/cmake/conf/mxe-conf.cmake.in b/src/cmake/conf/mxe-conf.cmake.in index d9c6a44..12d3856 100644 --- a/src/cmake/conf/mxe-conf.cmake.in +++ b/src/cmake/conf/mxe-conf.cmake.in @@ -25,7 +25,6 @@ endif() ## General configuration set(CMAKE_SYSTEM_NAME Windows) set(MSYS 1) -set(CMAKE_BUILD_TYPE Release CACHE STRING "Debug|Release|RelWithDebInfo|MinSizeRel" FORCE) set(CMAKE_EXPORT_NO_PACKAGE_REGISTRY ON) # Workaround for https://www.cmake.org/Bug/view.php?id=14075 set(CMAKE_CROSS_COMPILING ON) diff --git a/src/cmake/conf/target-cmake.in b/src/cmake/conf/target-cmake.in index 5858a7b..a78bcf5 100644 --- a/src/cmake/conf/target-cmake.in +++ b/src/cmake/conf/target-cmake.in @@ -18,6 +18,10 @@ else echo " - warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored" echo "== Using MXE toolchain: @CMAKE_TOOLCHAIN_FILE@" echo "== Using MXE runresult: @CMAKE_RUNRESULT_FILE@" + if ! ( echo "$@" | grep --silent "DCMAKE_BUILD_TYPE" ) ; then + echo '== Adding "-DCMAKE_BUILD_TYPE=Release"' + set -- "-DCMAKE_BUILD_TYPE=Release" "$@" + fi exec "@PREFIX@/@BUILD@/bin/cmake" \ -DCMAKE_TOOLCHAIN_FILE="@CMAKE_TOOLCHAIN_FILE@" \ `eval echo -DCMAKE_POLICY_DEFAULT_CMP{$POLICIES}=NEW` \ |