首页 > 其他分享 >what to write in cmakelists.txt to force build 64 bit exe

what to write in cmakelists.txt to force build 64 bit exe

时间:2023-03-23 22:55:06浏览次数:36  
标签:what exe force x64 64 build bit txt

To force a 64-bit build in CMake, you can add the following lines to your CMakeLists.txt file:

set(CMAKE_GENERATOR_PLATFORM x64)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /SUBSYSTEM:WINDOWS,6.01 /MACHINE:X64")

The first line sets the generator platform to x64, which tells CMake to generate 64-bit build files. The second line sets the linker flags for the executable, which sets the subsystem to windows and specifies the machine type as x64.

标签:what,exe,force,x64,64,build,bit,txt
From: https://www.cnblogs.com/symbolflowing/p/17249838.html

相关文章

  • what are the primitive types of C++?
    InC++,thereareseveralprimitivedatatypes,whicharealsoknownasfundamentalorbuilt-indatatypes.Theseinclude:Integertypes:Usedtorepresentw......
  • P3489 [POI2009]WIE-Hexer 题解
    一、题目描述:大陆上有 n 个村庄,m 条双向道路,p 种怪物,k 个铁匠,铁匠都在一个村庄里,他可会给你打造他所能打造的所有剑,特定的剑可以对付特定的怪物,每条道路上都可......
  • 高可用K8S集群中Master加入集群的时候报错:error execution phase check-etcd:解决方法
    报错信息:  报错原因:1、这个问题我找了两天没找到,最后找到网络的问题,我做的有双网卡,导致Master02和Master03服务器抢一个虚拟IP。2、Master02先抢到这个IP,Master03......
  • Java多线程之ExecutorCompletionService
    目录1ExecutorCompletionService1.1简介1.2原理1.3Demo示例1.3.1未使用ExecutorCompletionService1.3.2使用ExecutorCompletionService1.4深入分析说明1.4.1所有方......
  • Educational Codeforces Round 116 (Rated for Div. 2)
    题目链接A核心思路这个题目相当的玄学,所以如果遇到实在不会的题目。那么直接从样例入手吧,我们可以从样例发现每次改的都是开头或者最后的一个。于是大胆的猜测啊。会不......
  • win10广告弹窗ShellExperienceHost.exe
    原文:https://blog.csdn.net/weixin_39934264/article/details/105804992win10右下角老是弹出广告弹窗,排查为以下程序引起,但是这个是系统菜单的程序不能动:C:\Windows\Sys......
  • Codeforces Round 760 (Div. 3) D. Array and Operations(贪心)
    https://codeforces.com/contest/1618/problem/D题目大意:给定一个长度为n的数组a,我们可以进行m次操作:每次操作可以任意选择两个不同的下标的数字x和y,并把它两删除,替换......
  • Codeforces 70D. Professor's task
    题目链接:D-Professor'stask题目大意:初始给三个点,之后要求实现两种操作:加点;判断给定点是否在凸包内部。动态凸包板子题,留档怕忘了,参考https://www.cnblogs.com/enzymi......
  • Codeforces Round 644 (Div. 3) D. Buying Shovels(数论)
    https://codeforces.com/contest/1360/problem/DD.BuyingShovels题目大意:一个人想买正好n把铲子。店内有k种包装的铲子:第i种包装正好由i把铲子组成(1≤i≤k)。这家......
  • Codeforces Round 859 (Div
    F.BouncyBall给定\(n×m\)矩形,起点\(st\),终点\(ed\),有一小球从起点出发,每次可以选择4个方向,如果碰到边界就反弹,询问最后能否到达终点题解:\(DFS\)+\(map\)记录状......