Skip to content

Commit 3168170

Browse files
committed
Pleasing CMake with version info
Project() needs to be set in the top most CMake file. Moreover, added version information which might later be used for installation or runtime identification
1 parent 1bfa309 commit 3168170

File tree

4 files changed

+9
-4
lines changed

4 files changed

+9
-4
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.cproject
2+
.vscode/*
23
.project
34
.settings/*
45
CMakeCache.txt

Diff for: CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
cmake_minimum_required(VERSION 2.6)
1+
cmake_minimum_required (VERSION 3.12.0)
2+
3+
# Read version from file VERSION
4+
FILE(READ "VERSION" project_VERSION)
5+
STRING(STRIP "${project_VERSION}" project_VERSION)
6+
7+
PROJECT(FTPClient VERSION ${project_VERSION} LANGUAGES CXX)
28

39
set(CMAKE_CXX_STANDARD 14)
410

Diff for: FTP/CMakeLists.txt

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
cmake_minimum_required(VERSION 2.6)
2-
3-
project(FTPClient)
41

52
IF(MSVC OR NOT CMAKE_BUILD_TYPE MATCHES Coverage)
63

Diff for: VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.1.0

0 commit comments

Comments
 (0)