Cannot configure more than once in server mode when using CONFIGURE_DEPENDS
I'm using CMake version 3.12.0 and I'm testing the new CONFIGURE_DEPENDS option of file(GLOB). I'm on Windows but I think this should happen on any OS.
How to reproduce:
- Make a folder containing an empty source file
main.cpp
and aCMakeLists.txt
with those lines:
file(GLOB SOURCES CONFIGURE_DEPENDS *.cpp)
add_executable(cfgdeptest ${SOURCES})
- Launch cmake in server mode (I use cmake -E server --debug --experimental)
- Do the handshake by pasting this in the console:
[== "CMake Server" ==[
{"cookie":"test","type":"handshake","protocolVersion":{"major":1},"sourceDirectory":"C:/Users/alex/cfgdeptest","buildDirectory":"C:/Users/alex/cfgdeptest/build","generator":"Ninja"}
]== "CMake Server" ==]
- Configure once by pasting this in the console:
[== "CMake Server" ==[
{"cookie":"test","type":"configure"}
]== "CMake Server" ==]
- Add a file that matches
*.cpp
in the folder. - Configure a second time, the following error is reported:
file(GLOB SOURCES LIST_DIRECTORIES true "C:/Users/alex/cfgdeptest/*.cpp") at src/CMakeLists.txt:4 (file)
was already present in the glob cache but the directory
contents have changed during the configuration run.
Matching glob expressions:
SOURCES at src/CMakeLists.txt:4 (file)
SOURCES at src/CMakeLists.txt:4 (file)