[問題] VS2017和cmake 執行檔輸出位置問題
開發平台(Platform): (Ex: Win10, Linux, ...)
Win7
編譯器(Ex: GCC, clang, VC++...)+目標環境(跟開發平台不同的話需列出)
Visual Studio 2017 IDE (Visual Studio 15.5)
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
無
問題(Question):
最近在使用VS2017裡面的CMake功能
在程式build完成之後
發現VS會把build出來的binary放到我安裝CMake安裝位置裡的CMakeBuilds資料夾
想請問一下VS2017的CMake功能可不可以指定binary的輸出位置
餵入的資料(Input):
CMakeLists.txt
詳細內容在"程式碼"段落
預期的正確結果(Expected Output):
binary會出現在目前project的根目錄
錯誤結果(Wrong Output):
binary會出現在CMake安裝位置裡的CMakeBuilds資料夾
程式碼(Code):(請善用置底文網頁, 記得排版)
https://gist.github.com/Cuda-Chen/301e24154e1e936c6a90cc2a90529b71
CMakeLists.txt 文字好讀版:
# CMake minimum version requirment
cmake_minimum_required(VERSION 2.8)
# executable name
project(sobel_mfnn)
# set executable output path
#set(EXECUTABLE_OUTPUT_PATH "..")
set(CMAKE_BUILD_TYPE Debug)
set(SRCS
main.cpp
)
add_executable(sobel_mfnn ${SRCS})
補充說明(Supplement):
無
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.115.150.28
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1519632331.A.AC6.html
推
02/27 14:36,
8年前
, 1F
02/27 14:36, 1F
→
02/27 14:37,
8年前
, 2F
02/27 14:37, 2F
→
02/27 14:38,
8年前
, 3F
02/27 14:38, 3F
→
02/27 14:39,
8年前
, 4F
02/27 14:39, 4F
→
02/27 14:39,
8年前
, 5F
02/27 14:39, 5F
→
02/27 14:42,
8年前
, 6F
02/27 14:42, 6F
→
02/27 14:43,
8年前
, 7F
02/27 14:43, 7F
→
02/27 14:44,
8年前
, 8F
02/27 14:44, 8F
推
02/27 14:50,
8年前
, 9F
02/27 14:50, 9F
討論串 (同標題文章)
以下文章回應了本文:
完整討論串 (本文為第 1 之 2 篇):
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章