Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor the CMake 3rdparty/Vc-related bits #1903

Merged
merged 1 commit into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions 3rdparty/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Version 1.4.4
# Vc version 1.4.4
add_subdirectory(Vc)
set(conky_libs ${conky_libs} Vc)
set(conky_includes ${conky_includes} "${CMAKE_CURRENT_SOURCE_DIR}/Vc")

set(conky_libs ${conky_libs} PARENT_SCOPE)
set(conky_includes ${conky_includes} PARENT_SCOPE)
Comment on lines -3 to -7
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why not keep 3rdparty related build configuration in 3rdparty/CMakeLists.txt?

Copy link
Owner Author

Choose a reason for hiding this comment

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

I dislike this because it feels like the dependency is going in the wrong direction (from lower -> upper scope). The child shouldn't know about the parent (i.e., you should be able to take the code out of 3rdparty/ and move it elsewhere and it should work all the same).

add_subdirectory(toluapp)
2 changes: 1 addition & 1 deletion 3rdparty/Vc/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.0)
# cmake_minimum_required(VERSION 3.0)

cmake_policy(SET CMP0028 NEW) # Double colon in target name means ALIAS or IMPORTED target.
cmake_policy(SET CMP0048 NEW) # The ``project()`` command manages VERSION variables.
Expand Down
Loading