Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
1f9b4970
Unverified
Commit
1f9b4970
authored
Oct 11, 2019
by
Patrick Steinhardt
Committed by
GitHub
Oct 11, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #5260 from pks-t/pks/cmake3
cmake: update minimum CMake version to v3.5.1
parents
6716e2f3
ebabb88f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
24 deletions
+6
-24
CMakeLists.txt
+3
-8
src/CMakeLists.txt
+2
-10
tests/CMakeLists.txt
+1
-6
No files found.
CMakeLists.txt
View file @
1f9b4970
...
...
@@ -12,7 +12,7 @@
# > cmake --build . --target install
PROJECT
(
libgit2 C
)
CMAKE_MINIMUM_REQUIRED
(
VERSION
2.8.1
1
)
CMAKE_MINIMUM_REQUIRED
(
VERSION
3.5.
1
)
CMAKE_POLICY
(
SET CMP0015 NEW
)
IF
(
POLICY CMP0051
)
CMAKE_POLICY
(
SET CMP0051 NEW
)
...
...
@@ -335,10 +335,5 @@ IF(BUILD_FUZZERS)
ADD_SUBDIRECTORY
(
fuzzers
)
ENDIF
()
IF
(
CMAKE_VERSION VERSION_GREATER 3
)
FEATURE_SUMMARY
(
WHAT ENABLED_FEATURES DESCRIPTION
"Enabled features:"
)
FEATURE_SUMMARY
(
WHAT DISABLED_FEATURES DESCRIPTION
"Disabled features:"
)
ELSE
()
PRINT_ENABLED_FEATURES
()
PRINT_DISABLED_FEATURES
()
ENDIF
()
FEATURE_SUMMARY
(
WHAT ENABLED_FEATURES DESCRIPTION
"Enabled features:"
)
FEATURE_SUMMARY
(
WHAT DISABLED_FEATURES DESCRIPTION
"Disabled features:"
)
src/CMakeLists.txt
View file @
1f9b4970
...
...
@@ -333,16 +333,8 @@ SET_TARGET_PROPERTIES(git2internal PROPERTIES C_STANDARD 90)
IDE_SPLIT_SOURCES
(
git2internal
)
LIST
(
APPEND LIBGIT2_OBJECTS $<TARGET_OBJECTS:git2internal>
)
IF
(
${
CMAKE_VERSION
}
VERSION_LESS 2.8.12
)
INCLUDE_DIRECTORIES
(
${
LIBGIT2_INCLUDES
}
)
INCLUDE_DIRECTORIES
(
SYSTEM
${
LIBGIT2_SYSTEM_INCLUDES
}
)
ELSE
()
TARGET_INCLUDE_DIRECTORIES
(
git2internal
PRIVATE
${
LIBGIT2_INCLUDES
}
PUBLIC
${
libgit2_SOURCE_DIR
}
/include
)
TARGET_INCLUDE_DIRECTORIES
(
git2internal
SYSTEM PRIVATE
${
LIBGIT2_SYSTEM_INCLUDES
}
)
ENDIF
()
TARGET_INCLUDE_DIRECTORIES
(
git2internal PRIVATE
${
LIBGIT2_INCLUDES
}
PUBLIC
${
libgit2_SOURCE_DIR
}
/include
)
TARGET_INCLUDE_DIRECTORIES
(
git2internal SYSTEM PRIVATE
${
LIBGIT2_SYSTEM_INCLUDES
}
)
SET
(
LIBGIT2_OBJECTS
${
LIBGIT2_OBJECTS
}
PARENT_SCOPE
)
SET
(
LIBGIT2_INCLUDES
${
LIBGIT2_INCLUDES
}
PARENT_SCOPE
)
...
...
tests/CMakeLists.txt
View file @
1f9b4970
...
...
@@ -42,12 +42,7 @@ ADD_EXECUTABLE(libgit2_clar ${SRC_CLAR} ${SRC_TEST} ${LIBGIT2_OBJECTS})
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES C_STANDARD 90)
SET_TARGET_PROPERTIES(libgit2_clar PROPERTIES RUNTIME_OUTPUT_DIRECTORY
${
libgit2_BINARY_DIR
}
)
IF (
${
CMAKE_VERSION
}
VERSION_LESS 2.8.12)
# Already handled by a global INCLUDE_DIRECTORY()
ELSE()
TARGET_INCLUDE_DIRECTORIES(libgit2_clar PRIVATE ../src PUBLIC ../include)
ENDIF()
TARGET_INCLUDE_DIRECTORIES(libgit2_clar PRIVATE ../src PUBLIC ../include)
TARGET_LINK_LIBRARIES(libgit2_clar
${
LIBGIT2_LIBS
}
)
IDE_SPLIT_SOURCES(libgit2_clar)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment