Skip to content

Commit c363513

Browse files
committed
cmake: move definition of Win32 flags together
This makes splitting up the library build instructions later on more obvious and easier to achieve.
1 parent 32a2e50 commit c363513

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

CMakeLists.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ IF(MSVC)
7676
# If you want to embed a copy of libssh2 into libgit2, pass a
7777
# path to libssh2
7878
OPTION( EMBED_SSH_PATH "Path to libssh2 to embed (Windows)" OFF )
79-
80-
ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
81-
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
82-
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
8379
ENDIF()
8480

8581

@@ -402,6 +398,9 @@ ENDIF()
402398

403399
# Platform specific compilation flags
404400
IF (MSVC)
401+
ADD_DEFINITIONS(-D_SCL_SECURE_NO_WARNINGS)
402+
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE)
403+
ADD_DEFINITIONS(-D_CRT_NONSTDC_NO_DEPRECATE)
405404

406405
STRING(REPLACE "/Zm1000" " " CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
407406

0 commit comments

Comments
 (0)