]> granicus.if.org Git - taglib/commitdiff
Add ENABLE_CCACHE build option to allow users opt in to use ccache.
authorTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 27 Nov 2015 03:15:03 +0000 (12:15 +0900)
committerTsuda Kageyu <tsuda.kageyu@gmail.com>
Fri, 27 Nov 2015 03:15:03 +0000 (12:15 +0900)
CMakeLists.txt
NEWS

index 8dcb72b43d90fc0cdd3893c5d10e252d27b594e5..9491d47f3f70bd7287e1a4e3835d0972a7da867a 100644 (file)
@@ -17,6 +17,15 @@ else()
 endif()
 option(ENABLE_STATIC_RUNTIME "Visual Studio, link with runtime statically" OFF)
 
+option(ENABLE_CCACHE "Use ccache when building libtag" OFF)
+if(ENABLE_CCACHE)
+  find_program(CCACHE_FOUND ccache)
+  if(CCACHE_FOUND)
+    set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+    set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+  endif()
+endif()
+
 option(VISIBILITY_HIDDEN "Build with -fvisibility=hidden" OFF)
 if(VISIBILITY_HIDDEN)
   add_definitions(-fvisibility=hidden)
@@ -146,12 +155,6 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.cmake" "${CMAKE_CURRENT_BIN
 file(COPY doc/taglib.png DESTINATION doc)
 add_custom_target(docs doxygen)
 
-find_program(CCACHE_FOUND ccache)
-if(CCACHE_FOUND)
-  set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
-  set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
-endif()
-
 # uninstall target
 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY)
 
diff --git a/NEWS b/NEWS
index ade98dbaaa20201e5c1623c57da313d52c07e313..866800081f2a78326f4dc5c8d2e6bbc5cff7929f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@
  * Fixed possible file corruptions when saving ASF files.
  * Fixed updating the comment field of Vorbis comments.
  * Added BUILD_BINDINGS build option.
+ * Added ENABLE_CCACHE build option.
  * Marked ByteVector::null and ByteVector::isNull() deprecated.
  * Marked String::null and ByteVector::isNull() deprecated.
  * Marked XiphComment::removeField() deprecated.