Programing/Tool/CMake/Guides/Tutorial のバックアップ差分(No.1)


  • 追加された行はこの色です。
  • 削除された行はこの色です。
#contents
----
[[CMake Tutorial>https://cmake.org/cmake/help/latest/guide/tutorial/index.html]]の簡易翻訳

*はじめに [#z0b8f822]

*Step1.基本 [#p4c44c30]
最も基本的なプロジェクトは、ソースコードから実行ファイルをビルドします。
単純なプロジェクトの場合、必要なのは3行の CMakeLists.txt ファイルのみです。
このファイルがチュートリアルの出発点になります。
次のような CMakeLists.txt ファイルを Setp1 ディレクトリに作成します。

#geshi(CMake){{
cmake_minimum_required(VERSION 3.10)

# set the project name
project(Tutorial)

# add the executable
add_executable(Tutorial tutorial.cxx)
}}

Note that this example uses lower case commands in the CMakeLists.txt file. Upper, lower, and mixed case commands are supported by CMake. The source code for tutorial.cxx is provided in the Step1 directory and can be used to compute the square root of a number.