Skip to content

Conversation

@Lomadriel
Copy link
Member

This PR is a proposition to move auto-generated files in build directory.
The problem with generating sources in sources directories is that it may cause problem when the compilation mode (Release; Debug; …) is changed without cleaning.

Furthermore, some IDEs that support CMake create a build directory per compilation mode, so the project directory has the following architecture:

|─ debug-build/
|─ release-build/
|─ include/
     |─ setting.hpp
     |─ setting.hpp.cmake

With generated sources in the sources directories when I change from Debug to Release, cmake doesn't regenerate the setting file since it already exists but if you move the generated files in the build directory the problem disappears.

|─ debug-build/
     |─ generated-sources/
          |─ setting.hpp
|─ release-build/
     |─ generated-sources/
          |─ setting.hpp
|─ include/
     |─ setting.hpp.cmake

Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@patrick96 patrick96 merged commit 57b8fcc into polybar:master Apr 4, 2019
patrick96 added a commit to patrick96/polybar that referenced this pull request Apr 7, 2019
The settings.hpp file is now generated in the build folder and doesn't
need to be included in the gitignore

Ref polybar#1726
patrick96 added a commit that referenced this pull request Apr 8, 2019
The settings.hpp file is now generated in the build folder and doesn't
need to be included in the gitignore

Ref #1726
doronbehar pushed a commit to doronbehar/polybar that referenced this pull request Jun 16, 2019
doronbehar pushed a commit to doronbehar/polybar that referenced this pull request Jun 16, 2019
The settings.hpp file is now generated in the build folder and doesn't
need to be included in the gitignore

Ref polybar#1726
@Lomadriel Lomadriel deleted the feat/cmake_generated_sources branch August 4, 2019 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants