Unity build: sublime text generators don't list cxx files
Since sublime generator only has "folder" value set to the parent folder of the project, cxx files created by cmake in build folder cannot be opened in sublime text.
Sublime 3/4 has "include patterns" property that can be used to add those paths to the project.
Steps:
- Run cmake -B ../build "-GSublime Text 2 - Unix Makefiles"
- Open ../build/unity_sublime.sublime-project and try to navigate to the created cxx file.
cmake_minimum_required(VERSION 3.16)
project(unity_sublime)
file(WRITE file1.cpp "int main() {
return 0;
;
}")
add_executable(main file1.cpp)
set_target_properties(main PROPERTIES UNITY_BUILD ON)
set_target_properties(main PROPERTIES UNITY_BUILD_BATCH_SIZE 10)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON CACHE BOOL "" FORCE)