From 26a2f47bdc8ca60d8fabff9fa08a2ca82451ab04 Mon Sep 17 00:00:00 2001 From: ccsuzzh <1719571694@qq.com> Date: Wed, 28 Jun 2023 21:09:05 +0800 Subject: [PATCH 1/2] add concurrentqueue.cmake --- .../mlu/cmake/external/concurrentqueue.cmake | 48 ++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) mode change 120000 => 100644 backends/mlu/cmake/external/concurrentqueue.cmake diff --git a/backends/mlu/cmake/external/concurrentqueue.cmake b/backends/mlu/cmake/external/concurrentqueue.cmake deleted file mode 120000 index d6d0ff1a2..000000000 --- a/backends/mlu/cmake/external/concurrentqueue.cmake +++ /dev/null @@ -1 +0,0 @@ -../../../../Paddle/cmake/external/concurrentqueue.cmake \ No newline at end of file diff --git a/backends/mlu/cmake/external/concurrentqueue.cmake b/backends/mlu/cmake/external/concurrentqueue.cmake new file mode 100644 index 000000000..587cdc992 --- /dev/null +++ b/backends/mlu/cmake/external/concurrentqueue.cmake @@ -0,0 +1,47 @@ +# Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include(ExternalProject) + +set(CONCURRENTQUEUE_PROJECT "extern_concurrentqueue") +set(CONCURRENTQUEUE_VER "v1.0.3") +set(CONCURRENTQUEUE_URL_MD5 118e5bb661b567634647312991e10222) +set(CONCURRENTQUEUE_PREFIX_URL + "https://github.com/cameron314/concurrentqueue/archive/refs/tags") +set(CONCURRENTQUEUE_URL + "${CONCURRENTQUEUE_PREFIX_URL}/${CONCURRENTQUEUE_VER}.tar.gz") + +message( + STATUS + "CONCURRENTQUEUE_VERSION: ${CONCURRENTQUEUE_VER}, CONCURRENTQUEUE_URL: ${CONCURRENTQUEUE_URL}" +) + +set(CONCURRENTQUEUE_PREFIX_DIR ${THIRD_PARTY_PATH}/concurrentqueue) +set(CONCURRENTQUEUE_SOURCE_DIR ${THIRD_PARTY_PATH}/concurrentqueue/src/) +set(CONCURRENTQUEUE_INCLUDE_DIR + "${CONCURRENTQUEUE_SOURCE_DIR}/extern_concurrentqueue") + +ExternalProject_Add( + ${CONCURRENTQUEUE_PROJECT} + ${EXTERNAL_PROJECT_LOG_ARGS} + URL ${CONCURRENTQUEUE_URL} + URL_MD5 ${CONCURRENTQUEUE_URL_MD5} + PREFIX ${CONCURRENTQUEUE_PREFIX_DIR} + DOWNLOAD_NO_PROGRESS 1 + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND "" + UPDATE_COMMAND "") + +include_directories(${CONCURRENTQUEUE_INCLUDE_DIR}) \ No newline at end of file From 430a28b6fff560f9fa4d94328ebb6189d6bdadb6 Mon Sep 17 00:00:00 2001 From: ccsuzzh <1719571694@qq.com> Date: Wed, 28 Jun 2023 21:42:38 +0800 Subject: [PATCH 2/2] fix codestyle --- .../mlu/cmake/external/concurrentqueue.cmake | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/backends/mlu/cmake/external/concurrentqueue.cmake b/backends/mlu/cmake/external/concurrentqueue.cmake index 587cdc992..4ca368eb8 100644 --- a/backends/mlu/cmake/external/concurrentqueue.cmake +++ b/backends/mlu/cmake/external/concurrentqueue.cmake @@ -1,16 +1,16 @@ # Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved. # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); you may not +# use this file except in compliance with the License. You may obtain a copy of +# the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations under +# the License. include(ExternalProject) @@ -44,4 +44,4 @@ ExternalProject_Add( INSTALL_COMMAND "" UPDATE_COMMAND "") -include_directories(${CONCURRENTQUEUE_INCLUDE_DIR}) \ No newline at end of file +include_directories(${CONCURRENTQUEUE_INCLUDE_DIR})