- Set CMAKE_EXPORT_COMPILE_COMMANDS option to generate
compile_commands.json file while cmake build.
- It will be used to generate semantic information from various tools.
- Leave a comment about unsupported feature in CMake version 3.1.0
Signed-off-by: Sung-Jae Lee <sj925.lee@samsung.com>
set(CMAKE_CXX_STANDARD 11)
+# This feature works with CMake 3.5.2 or later. However, using previous versions does not produce
+# an error. We are still officially using CMake 3.1.0, but put this code for the sake of semantic
+# support in various development tools.
+# Todo: Someday, CMake needs to be updated to 3.7.2 or later to take advantage of improvements
+# such as `cmake-server`.
+set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
+
set(NNCC_OVERLAY_DIR "${CMAKE_BINARY_DIR}/overlay" CACHE
INTERNAL "Where locally built external dependencies are installed")