File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -111,7 +111,8 @@ else(APPLE)
111111endif ()
112112
113113add_custom_command (TARGET _moose POST_BUILD
114- COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR} /setup.py bdist --skip-build
114+ COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR} /setup.py bdist_dumb
115+ -d ${CMAKE_BINARY_DIR} --format=gztar --skip-build --quiet
115116 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
116117 VERBATIM )
117118
Original file line number Diff line number Diff line change 66import os
77import sys
88import subprocess
9+ import datetime
910
1011#### TEST IF REQUIRED TOOLS EXISTS.
1112if sys .version_info [0 ] < 3 :
1617try :
1718 cmakeVersion = subprocess .check_output (["cmake" , "--version" ])
1819 print ("[INFO ] CMake found: %s" % cmakeVersion .decode ('utf8' ))
19-
2020except Exception as e :
21- print (f "[ERROR] cmake is not found. Please install cmake.", file = sys . stderr )
21+ print ("[ERROR] cmake is not found. Please install cmake." )
2222 quit (- 1 )
2323
2424
3131
3232# Global variables.
3333
34- sdir_ = Path ().absolute ()
35- builddir_ = sdir_ / '_build'
34+ sdir_ = Path (__file__ ).parent .absolute ()
35+ stamp = datetime .datetime .now ().strftime ('%Y%m%d' )
36+ builddir_ = sdir_ / ('_build_%s' % stamp )
3637builddir_ .mkdir (parents = True , exist_ok = True )
3738
3839numCores_ = os .cpu_count () - 1
You can’t perform that action at this time.
0 commit comments