Revision: 76758
          http://sourceforge.net/p/brlcad/code/76758
Author:   starseeker
Date:     2020-08-14 19:07:59 +0000 (Fri, 14 Aug 2020)
Log Message:
-----------
Auugh.  VS clean target exists all right, but it doesn't seem to be happy with 
the solution file generated by CMake - claims there are two regress targets 
defined, even though grep only sees one.  Possibly some variation on this 
issue?  https://github.com/dotnet/msbuild/issues/3019  Fall back on just the 
distcheck script.

Modified Paths:
--------------
    brlcad/branches/RELEASE/CMakeLists.txt
    brlcad/branches/RELEASE/misc/CMake/distclean.cmake.in

Modified: brlcad/branches/RELEASE/CMakeLists.txt
===================================================================
--- brlcad/branches/RELEASE/CMakeLists.txt      2020-08-14 19:04:09 UTC (rev 
76757)
+++ brlcad/branches/RELEASE/CMakeLists.txt      2020-08-14 19:07:59 UTC (rev 
76758)
@@ -3737,12 +3737,18 @@
 get_property(CMAKE_DISTCLEAN_TARGET_LIST GLOBAL PROPERTY 
CMAKE_DISTCLEAN_TARGET_LIST)
 list(REMOVE_DUPLICATES CMAKE_DISTCLEAN_TARGET_LIST)
 configure_file("${BRLCAD_CMAKE_DIR}/distclean.cmake.in" 
"${BRLCAD_BINARY_DIR}/distclean.cmake" @ONLY)
-add_custom_target(distclean
-  COMMAND ${CMAKE_COMMAND} -E echo "Running clean target..."
-  COMMAND ${CMAKE_COMMAND} --build ${BRLCAD_BINARY_DIR} --target clean
-  COMMAND ${CMAKE_COMMAND} -E echo "Running clean target... done."
-  COMMAND ${CMAKE_COMMAND} -P "${BRLCAD_BINARY_DIR}/distclean.cmake"
-  )
+if ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+  add_custom_target(distclean
+    COMMAND ${CMAKE_COMMAND} -P "${BRLCAD_BINARY_DIR}/distclean.cmake"
+    )
+else ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
+  add_custom_target(distclean
+    COMMAND ${CMAKE_COMMAND} -E echo "Running clean target..."
+    COMMAND ${CMAKE_COMMAND} --build ${BRLCAD_BINARY_DIR} --target clean
+    COMMAND ${CMAKE_COMMAND} -E echo "Running clean target... done."
+    COMMAND ${CMAKE_COMMAND} -P "${BRLCAD_BINARY_DIR}/distclean.cmake"
+    )
+endif ("${CMAKE_GENERATOR}" MATCHES "Visual Studio")
 if(TARGET distclean)
   set_target_properties(distclean PROPERTIES FOLDER "Compilation Utilities")
 endif(TARGET distclean)

Modified: brlcad/branches/RELEASE/misc/CMake/distclean.cmake.in
===================================================================
--- brlcad/branches/RELEASE/misc/CMake/distclean.cmake.in       2020-08-14 
19:04:09 UTC (rev 76757)
+++ brlcad/branches/RELEASE/misc/CMake/distclean.cmake.in       2020-08-14 
19:07:59 UTC (rev 76758)
@@ -53,6 +53,13 @@
 endif(EXISTS "@BRLCAD_BINARY_DIR@/source_archive_contents")
 message("Removing CMake-generated files... done.")
 
+# Visual Studio generators don't have a clean target, so we need to do
+# this manually - remove all files
+if(EXISTS "@BRLCAD_BINARY_DIR@/BRLCAD.sln")
+  file(GLOB_RECURSE VSFILES LIST_DIRECTORIES TRUE RELATIVE 
"@BRLCAD_BINARY_DIR@" "*")
+  file(REMOVE_RECURSE ${VSFILES})
+endif(EXISTS "@BRLCAD_BINARY_DIR@/BRLCAD.sln")
+
 # Need to recursively go down the directories to get a full list.
 # Easier to use a function, so maintain the directory list in
 # a global property

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.



_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to