Skip to content

Commit

Permalink
Silence CMake warning regarding CMP0046
Browse files Browse the repository at this point in the history
Re ECFLOW-1936
  • Loading branch information
marcosbento committed Jan 3, 2024
1 parent b09f9ad commit c742571
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 17 deletions.
15 changes: 0 additions & 15 deletions Viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,5 @@
# nor does it submit to any jurisdiction.
#

# avoid warning about dependency targets that don't exist
#
# CMake Warning (dev) at Viewer/src/CMakeLists.txt:261 (ADD_DEPENDENCIES):
# Policy CMP0046 is not set: Error on non-existent dependency in
# add_dependencies. Run "cmake --help-policy CMP0046" for policy details.
# Use the cmake_policy command to set the policy and suppress this warning.
#
# The dependency target
# "/tmp/ma0/workspace/ecflow/Viewer/src/../images/zombie_dock.svg" of target
# "Qt_resource_cpp" does not exist.

if (POLICY CMP0046)
cmake_policy(SET CMP0046 OLD)
endif()

add_subdirectory( libViewer)
add_subdirectory( ecflowUI)
3 changes: 1 addition & 2 deletions Viewer/ecflowUI/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,7 @@ endif()
# add all the images as dependencies of the resource file so that it is
# automatically recompiled when an image changes
file(GLOB image_files "${CMAKE_CURRENT_SOURCE_DIR}/../images/*.*")
add_custom_target(Qt_resource_cpp DEPENDS ${VIEWER_RES})
add_dependencies(Qt_resource_cpp ${image_files})
add_custom_target(Qt_resource_cpp DEPENDS ${VIEWER_RES} ${image_files})

ecbuild_add_executable(
TARGET
Expand Down

0 comments on commit c742571

Please sign in to comment.