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
6874cafd
Commit
6874cafd
authored
Mar 03, 2014
by
Miha
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmake examples change so that general.c is off by default
parent
058956ce
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
2 deletions
+6
-2
CMakeLists.txt
+1
-1
examples/CMakeLists.txt
+5
-1
No files found.
CMakeLists.txt
View file @
6874cafd
...
@@ -58,7 +58,7 @@ IF(MSVC)
...
@@ -58,7 +58,7 @@ IF(MSVC)
# HTTP transport, invoke CMake with the "-DWINHTTP=OFF" argument.
# HTTP transport, invoke CMake with the "-DWINHTTP=OFF" argument.
OPTION
(
WINHTTP
"Use Win32 WinHTTP routines"
ON
)
OPTION
(
WINHTTP
"Use Win32 WinHTTP routines"
ON
)
ADD_DEFINITIONS
(
-D_SCL_SECURE_NO_WARNINGS
)
ADD_DEFINITIONS
(
-D_SCL_SECURE_NO_WARNINGS
)
ADD_DEFINITIONS
(
-D_CRT_SECURE_NO_DEPRECATE
)
ADD_DEFINITIONS
(
-D_CRT_SECURE_NO_DEPRECATE
)
ADD_DEFINITIONS
(
-D_CRT_NONSTDC_NO_DEPRECATE
)
ADD_DEFINITIONS
(
-D_CRT_NONSTDC_NO_DEPRECATE
)
ENDIF
()
ENDIF
()
...
...
examples/CMakeLists.txt
View file @
6874cafd
...
@@ -6,10 +6,14 @@ ELSE()
...
@@ -6,10 +6,14 @@ ELSE()
TARGET_LINK_LIBRARIES
(
cgit2 git2 pthread
)
TARGET_LINK_LIBRARIES
(
cgit2 git2 pthread
)
ENDIF
()
ENDIF
()
OPTION
(
BUILD_EXAMPLES_GENERAL
"Build general example"
OFF
)
FILE
(
GLOB SRC_EXAMPLE_APPS RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*.c
)
FILE
(
GLOB SRC_EXAMPLE_APPS RELATIVE
${
CMAKE_CURRENT_SOURCE_DIR
}
*.c
)
FOREACH
(
src_app
${
SRC_EXAMPLE_APPS
}
)
FOREACH
(
src_app
${
SRC_EXAMPLE_APPS
}
)
STRING
(
REPLACE
".c"
""
app_name
${
src_app
}
)
STRING
(
REPLACE
".c"
""
app_name
${
src_app
}
)
IF
(
NOT
${
app_name
}
STREQUAL
"common"
)
IF
(
${
app_name
}
STREQUAL
"general"
AND BUILD_EXAMPLES_GENERAL OR
NOT
${
app_name
}
STREQUAL
"general"
AND NOT
${
app_name
}
STREQUAL
"common"
)
ADD_EXECUTABLE
(
${
app_name
}
${
src_app
}
"common.c"
)
ADD_EXECUTABLE
(
${
app_name
}
${
src_app
}
"common.c"
)
TARGET_LINK_LIBRARIES
(
${
app_name
}
git2
)
TARGET_LINK_LIBRARIES
(
${
app_name
}
git2
)
ENDIF
()
ENDIF
()
...
...
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