diff options
author | Brad King <brad.king@kitware.com> | 2016-03-16 20:42:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-03-17 13:32:16 (GMT) |
commit | e903a9fc55a1a8d1e6cc681f8d2e98bb74566ec8 (patch) | |
tree | 8cc61086edf0ae8111638757f78dda82ac851951 | |
parent | dd630075448f6aa45c0e51444365feb73701ebbd (diff) | |
download | CMake-e903a9fc55a1a8d1e6cc681f8d2e98bb74566ec8.zip CMake-e903a9fc55a1a8d1e6cc681f8d2e98bb74566ec8.tar.gz CMake-e903a9fc55a1a8d1e6cc681f8d2e98bb74566ec8.tar.bz2 |
Utilities/Release: Create a Windows 64-bit binary
Compile with `-D_WIN32_WINNT=0x502` to use a WinXP-compatible API.
Compile with `-D_USING_V110_SDK71_` to tell the VS standard library
headers that we are building with a WinXP-compatible Windows SDK. Link
executables with `-subsystem:console,5.02` to make them runnable on
Windows XP 64-bit. Ideally `cmake-gui` should instead be linked with
`-subsystem:windows,5.02` but with the Ninja and Makefile generators
CMake adds `-subsystem:windows` after our `-subsystem:console,5.02` flag
and the linker seems to interpret this combination as we need.
-rw-r--r-- | Tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | Utilities/Release/create-cmake-release.cmake | 1 | ||||
-rw-r--r-- | Utilities/Release/win64_release.cmake | 29 |
3 files changed, 33 insertions, 0 deletions
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index c14008f..8a256bf 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -686,12 +686,15 @@ ${CMake_BINARY_DIR}/bin/cmake -DDIR=dev -P ${CMake_SOURCE_DIR}/Utilities/Release if(CMAKE_BUILD_NIGHTLY_RELEASES) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWin32 win32_release.cmake) + ADD_NIGHTLY_BUILD_TEST(CMakeNightlyWin64 + win64_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyOSX osx_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyLinux32 linux32_release.cmake) ADD_NIGHTLY_BUILD_TEST(CMakeNightlyLinux64 linux64_release.cmake) + set_property(TEST CMakeNightlyWin64 PROPERTY DEPENDS CMakeNightlyWin32) endif() # add tests with more complex invocations diff --git a/Utilities/Release/create-cmake-release.cmake b/Utilities/Release/create-cmake-release.cmake index f440519..f8844e9 100644 --- a/Utilities/Release/create-cmake-release.cmake +++ b/Utilities/Release/create-cmake-release.cmake @@ -14,6 +14,7 @@ set(RELEASE_SCRIPTS_BATCH_1 set(RELEASE_SCRIPTS_BATCH_2 cygwin_release.cmake # Cygwin x86 + win64_release.cmake # Windows x64 ) function(write_batch_shell_script filename) diff --git a/Utilities/Release/win64_release.cmake b/Utilities/Release/win64_release.cmake new file mode 100644 index 0000000..cc1f37f --- /dev/null +++ b/Utilities/Release/win64_release.cmake @@ -0,0 +1,29 @@ +set(CMAKE_RELEASE_DIRECTORY "c:/msys64/home/dashboard/CMakeReleaseDirectory64") +set(CONFIGURE_WITH_CMAKE TRUE) +set(CMAKE_CONFIGURE_PATH "c:/Program\\ Files\\ \\(x86\\)/CMake/bin/cmake.exe") +set(PROCESSORS 8) +set(HOST dash3win7) +set(SCRIPT_NAME dash3win7x64) +set(RUN_LAUNCHER ~/rel/run) +set(CPACK_BINARY_GENERATORS "WIX ZIP") +set(CPACK_SOURCE_GENERATORS "") +set(MAKE_PROGRAM "ninja") +set(MAKE "${MAKE_PROGRAM} -j8") +set(INITIAL_CACHE "CMAKE_BUILD_TYPE:STRING=Release +CMAKE_DOC_DIR:STRING=doc/cmake +CMAKE_USE_OPENSSL:BOOL=OFF +CMAKE_SKIP_BOOTSTRAP_TEST:STRING=TRUE +CMAKE_Fortran_COMPILER:FILEPATH=FALSE +CMAKE_GENERATOR:INTERNAL=Ninja +BUILD_QtDialog:BOOL:=TRUE +CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL:BOOL=TRUE +CMake_INSTALL_DEPENDENCIES:BOOL=ON +CMAKE_EXE_LINKER_FLAGS:STRING=-machine:x64 -subsystem:console,5.02 +") +set(ppflags "-D_WIN32_WINNT=0x502 -D_USING_V110_SDK71_") +set(CFLAGS "${ppflags}") +set(CXXFLAGS "${ppflags}") +set(ENV ". ~/rel/env64") +get_filename_component(path "${CMAKE_CURRENT_LIST_FILE}" PATH) +set(GIT_EXTRA "git config core.autocrlf true") +include(${path}/release_cmake.cmake) |