areusch commented on a change in pull request #9763:
URL: https://github.com/apache/tvm/pull/9763#discussion_r777740500
##########
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:
not 100% on this but should we use `DEFINED` instead?
```suggestion
if(NOT IS_SUBPROJECT AND NOT DEFINED "${CMAKE_EXPORT_COMPILE_COMMANDS}")
```
--
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]