summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/ExportCompileCommands/CustomCompileRule.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/ExportCompileCommands/CustomCompileRule.cmake')
-rw-r--r--Tests/RunCMake/ExportCompileCommands/CustomCompileRule.cmake5
1 files changed, 5 insertions, 0 deletions
diff --git a/Tests/RunCMake/ExportCompileCommands/CustomCompileRule.cmake b/Tests/RunCMake/ExportCompileCommands/CustomCompileRule.cmake
new file mode 100644
index 000000000..12368a29b
--- /dev/null
+++ b/Tests/RunCMake/ExportCompileCommands/CustomCompileRule.cmake
@@ -0,0 +1,5 @@
+enable_language(C)
+add_library(empty STATIC empty.c)
+string(REPLACE "<DEFINES>" "" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
+string(REPLACE "<INCLUDES>" "" CMAKE_C_COMPILE_OBJECT "${CMAKE_C_COMPILE_OBJECT}")
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)