ValveSoftware / steam-audio

Steam Audio
https://valvesoftware.github.io/steam-audio/
Apache License 2.0
2.2k stars 152 forks source link

Redundant CMake re-configures automatically triggering #357

Closed Ravbug closed 3 weeks ago

Ravbug commented 3 weeks ago

System Information Please provide the following information about your system:

Issue Description When using SteamAudio as a subdirectory, CMake redundantly re-configures because something is marking core/src/core/CMakeLists.txt as changed even though I have made no edits to it. It only happens with this specific file.

CMake is re-running because [...]/steam-audio/core/src/core/CMakeFiles/generate.stamp is out-of-date.
1>  the file '[...]/steam-audio/core/src/core/CMakeLists.txt'
1>  is newer than '[build_dir]/steam-audio/core/src/core/CMakeFiles/generate.stamp.depend'

Steps To Reproduce

  1. Place the files listed below and steam-audio in a directory next to each other.
  2. Use CMake to generate a build system (VS, Xcode, ninja, doesn't seem to matter)
  3. Build the test target
  4. Wait some time without modifying any files in the sample. Closing and re-opening Xcode or Visual Studio sometimes expedites this. It can vary from a few minutes to a whole day. I haven't figured out what is triggering this.
  5. Build the test target again. CMake will trigger a reconfigure.

CMakeLists.txt:

project(reconfigure-bug)
add_subdirectory(steam-audio/core EXCLUDE_FROM_ALL)
add_executable(test main.cpp)
target_link_libraries(test PUBLIC phonon)

main.cpp

#include <phonon.h>
int main() {
    IPLContext steamAudioContext;
    IPLContextSettings contextSettings{STEAMAUDIO_VERSION};
    IPLerror errorCode = iplContextCreate(&contextSettings, &steamAudioContext);
}

If you are able to provide a minimal project or minimal source code that reproduces the issue, include a link to the project/code here.

Ravbug commented 3 weeks ago

Closing because it appears this is not being caused by SteamAudio, I started seeing this in other files as well.