driazati commented on a change in pull request #9763:
URL: https://github.com/apache/tvm/pull/9763#discussion_r777799841



##########
File path: CMakeLists.txt
##########
@@ -110,6 +110,16 @@ include_directories(SYSTEM ${PICOJSON_PATH})
 set(TVM_LINKER_LIBS "")
 set(TVM_RUNTIME_LINKER_LIBS "")
 
+
+# Check if this is being run on its own or as a subdirectory for another 
project
+# If we update to CMake 2.21+, we can use PROJECT_IS_TOP_LEVEL instead
+get_directory_property(IS_SUBPROJECT PARENT_DIRECTORY)
+
+if(NOT IS_SUBPROJECT AND "${CMAKE_EXPORT_COMPILE_COMMANDS}" STREQUAL "")

Review comment:
       I don't think it makes any functional difference in this cases but the 
intent is clearer




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to