Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Put a warn if try to make a dist without maintainer mode
authornavarro <navarro@caraja.(none)>
Fri, 15 Jun 2012 09:29:21 +0000 (11:29 +0200)
committernavarro <navarro@caraja.(none)>
Fri, 15 Jun 2012 09:29:21 +0000 (11:29 +0200)
buildtools/Cmake/Distrib.cmake

index 9951a09..6ef4705 100644 (file)
@@ -268,6 +268,7 @@ endforeach(file ${source_to_pack})
 add_custom_target(dist
   DEPENDS ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-${release_version}.tar.gz
 )
 add_custom_target(dist
   DEPENDS ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-${release_version}.tar.gz
 )
+
 add_custom_command(
        OUTPUT ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-${release_version}.tar.gz    
        COMMENT "Compressing the archive from the distribution directory"
 add_custom_command(
        OUTPUT ${CMAKE_BINARY_DIR}/${PROJECT_NAME}-${release_version}.tar.gz    
        COMMENT "Compressing the archive from the distribution directory"
@@ -277,6 +278,15 @@ add_custom_command(
 )
 add_dependencies(dist dist-dir)
 
 )
 add_dependencies(dist dist-dir)
 
+if(NOT enable_maintainer_mode)
+  add_custom_target(echo-dist
+    COMMAND ${CMAKE_COMMAND} -E echo "WARNING: ----------------------------------------------------"
+    COMMAND ${CMAKE_COMMAND} -E echo "WARNING: Distrib is generated without option maintainer mode "
+    COMMAND ${CMAKE_COMMAND} -E echo "WARNING: ----------------------------------------------------"
+  )
+   add_dependencies(dist echo-dist)
+endif(NOT enable_maintainer_mode)
+
 ###########################################
 ### Fill in the "make distcheck" target ###
 ###########################################
 ###########################################
 ### Fill in the "make distcheck" target ###
 ###########################################