File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,14 @@ IF ((CMAKE_VERSION VERSION_GREATER 3.1) OR
55 CMAKE_POLICY (SET CMP0054 NEW)
66ENDIF ()
77
8- PROJECT (msgpack-c)
8+ OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." ON )
9+ OPTION (MSGPACK_GEN_COVERAGE "Enable running gcov to get a test coverage report." OFF )
10+
11+ if (MSGPACK_BUILD_TESTS)
12+ PROJECT (msgpack-c)
13+ else ()
14+ PROJECT (msgpack-c C)
15+ endif ()
916
1017FILE (READ ${CMAKE_CURRENT_SOURCE_DIR} /include /msgpack/version_master.h contents)
1118STRING (REGEX MATCH "#define MSGPACK_VERSION_MAJOR *([0-9a-zA-Z_]*)" NULL_OUT ${contents} )
@@ -74,14 +81,6 @@ IF (MSGPACK_CHAR_SIGN)
7481 SET (CMAKE_C_FLAGS "-f${MSGPACK_CHAR_SIGN} -char ${CMAKE_C_FLAGS} " )
7582ENDIF ()
7683
77- FIND_PACKAGE (GTest)
78- FIND_PACKAGE (ZLIB)
79- FIND_PACKAGE (Threads)
80- IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND)
81- OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." ON )
82- OPTION (MSGPACK_GEN_COVERAGE "Enable running gcov to get a test coverage report." OFF )
83- ENDIF ()
84-
8584IF (DEFINED BUILD_SHARED_LIBS )
8685 IF (BUILD_SHARED_LIBS )
8786 IF (DEFINED MSGPACK_ENABLE_SHARED AND NOT MSGPACK_ENABLE_SHARED)
You can’t perform that action at this time.
0 commit comments