summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Rasmussen <axelrasmussen@google.com>2015-06-23 09:05:49 -0600
committerAxel Rasmussen <axelrasmussen@google.com>2015-09-18 23:33:56 -0700
commitc963fe1d3d7b576cc794049aafaf6bba46a24d30 (patch)
treeb934b63886e948d6264aa0d65c98c066effa4642
parente9e6df2c8f4a8577fcbcfdf56bf255ef9774b6ec (diff)
downloadlibgit2-c963fe1d3d7b576cc794049aafaf6bba46a24d30.tar.gz
cmake: fix CMake code organization problem
-rw-r--r--CMakeLists.txt12
1 files changed, 6 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cb1f1b8b4..a72659d34 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -23,9 +23,6 @@ INCLUDE(CheckStructHasMember)
INCLUDE(AddCFlagIfSupported)
INCLUDE(FindPkgConfig)
-CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtim.tv_nsec sys/stat.h
- HAVE_STRUCT_STAT_NSEC LANGUAGE C)
-
# Build options
#
OPTION( SONAME "Set the (SO)VERSION of the target" ON )
@@ -41,9 +38,6 @@ OPTION( LIBGIT2_FILENAME "Name of the produced binary" OFF )
OPTION( USE_ICONV "Link with and use iconv library" OFF )
OPTION( USE_SSH "Link with libssh to enable SSH support" ON )
OPTION( USE_GSSAPI "Link with libgssapi for SPNEGO auth" OFF )
-IF(HAVE_STRUCT_STAT_NSEC)
- OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" OFF )
-ENDIF()
OPTION( VALGRIND "Configure build for valgrind" OFF )
OPTION( CURL "User curl for HTTP if available" ON)
@@ -91,6 +85,12 @@ IF (NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
OPTION( USE_OPENSSL "Link with and use openssl library" ON )
ENDIF()
+CHECK_STRUCT_HAS_MEMBER("struct stat" st_mtim.tv_nsec sys/stat.h
+ HAVE_STRUCT_STAT_NSEC LANGUAGE C)
+IF(HAVE_STRUCT_STAT_NSEC)
+ OPTION( USE_NSEC "Care about sub-second file mtimes and ctimes" OFF )
+ENDIF()
+
# This variable will contain the libraries we need to put into
# libgit2.pc's Requires.private. That is, what we're linking to or
# what someone who's statically linking us needs to link to.