Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
9cfd7902
Commit
9cfd7902
authored
Nov 13, 2020
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid touching existing uninstall targets
parent
72e62b1a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
36 deletions
+28
-36
CMakeLists.txt
CMakeLists.txt
+7
-12
cmake/cmake_uninstall.cmake.in
cmake/cmake_uninstall.cmake.in
+0
-24
cmake/uninstall.cmake.in
cmake/uninstall.cmake.in
+21
-0
No files found.
CMakeLists.txt
View file @
9cfd7902
...
@@ -283,22 +283,17 @@ install(TARGETS libcaf_test
...
@@ -283,22 +283,17 @@ install(TARGETS libcaf_test
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
COMPONENT test
RUNTIME DESTINATION
${
CMAKE_INSTALL_BINDIR
}
COMPONENT test
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
COMPONENT test
)
LIBRARY DESTINATION
${
CMAKE_INSTALL_LIBDIR
}
COMPONENT test
)
# --
provide an uinstall target -------------------
-----------------------------
# --
add uninstall target if it does not exist yet
-----------------------------
# process cmake_uninstall.cmake.in
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/cmake_uninstall.cmake.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cmake_uninstall.cmake"
IMMEDIATE @ONLY
)
# add uninstall target if it does not exist yet
if
(
NOT TARGET uninstall
)
if
(
NOT TARGET uninstall
)
add_custom_target
(
uninstall
)
configure_file
(
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/cmake/uninstall.cmake.in"
"
${
CMAKE_CURRENT_BINARY_DIR
}
/uninstall.cmake"
IMMEDIATE @ONLY
)
add_custom_target
(
uninstall
COMMAND
${
CMAKE_COMMAND
}
-P
${
CMAKE_CURRENT_BINARY_DIR
}
/uninstall.cmake
)
endif
()
endif
()
add_custom_command
(
TARGET uninstall
PRE_BUILD
COMMAND
"
${
CMAKE_COMMAND
}
"
-P
"
${
CMAKE_CURRENT_BINARY_DIR
}
/cmake_uninstall.cmake"
)
# -- utility function for installing library targets ---------------------------
# -- utility function for installing library targets ---------------------------
...
...
cmake/cmake_uninstall.cmake.in
deleted
100644 → 0
View file @
72e62b1a
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest:
\"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
list(REVERSE files)
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing
\"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)
cmake/uninstall.cmake.in
0 → 100644
View file @
9cfd7902
if(NOT EXISTS "@CMAKE_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: @CMAKE_BINARY_DIR@/install_manifest.txt")
endif()
file(READ "@CMAKE_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
foreach(file ${files})
message(STATUS "Uninstalling $ENV{DESTDIR}${file}")
if(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
exec_program(
"@CMAKE_COMMAND@" ARGS "-E remove \"$ENV{DESTDIR}${file}\""
OUTPUT_VARIABLE rm_out
RETURN_VALUE rm_retval
)
if(NOT "${rm_retval}" STREQUAL 0)
message(FATAL_ERROR "Problem when removing $ENV{DESTDIR}${file}")
endif()
else(IS_SYMLINK "$ENV{DESTDIR}${file}" OR EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File $ENV{DESTDIR}${file} does not exist.")
endif()
endforeach()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment