File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ set(CMKR_EXECUTABLE "" CACHE FILEPATH "cmkr executable")
99set (CMKR_SKIP_GENERATION OFF CACHE BOOL "skip automatic cmkr generation" )
1010
1111# Disable cmkr if generation is disabled
12- if (CMKR_SKIP_GENERATION)
12+ if (DEFINED ENV{CI} OR CMKR_SKIP_GENERATION)
1313 message (STATUS "[cmkr] Skipping automatic cmkr generation" )
1414 macro (cmkr)
1515 endmacro ()
@@ -132,10 +132,15 @@ macro(cmkr)
132132
133133 file (SHA256 "${CMAKE_CURRENT_LIST_FILE} " CMKR_LIST_FILE_SHA256_POST)
134134
135+ # Delete the temporary file if it was left for some reason
136+ set (CMKR_TEMP_FILE "${CMAKE_CURRENT_SOURCE_DIR} /CMakerLists.txt" )
137+ if (EXISTS "${CMKR_TEMP_FILE} " )
138+ file (REMOVE "${CMKR_TEMP_FILE} " )
139+ endif ()
140+
135141 if (NOT CMKR_LIST_FILE_SHA256_PRE STREQUAL CMKR_LIST_FILE_SHA256_POST)
136142 # Copy the now-generated CMakeLists.txt to CMakerLists.txt
137143 # This is done because you cannot include() a file you are currently in
138- set (CMKR_TEMP_FILE "${CMAKE_CURRENT_SOURCE_DIR} /CMakerLists.txt" )
139144 configure_file (CMakeLists.txt "${CMKR_TEMP_FILE} " COPYONLY )
140145
141146 # Add the macro required for the hack at the start of the cmkr macro
You can’t perform that action at this time.
0 commit comments