From b581c037a9d99202dcdb0493ddd48ddcc5d8d5cf Mon Sep 17 00:00:00 2001 From: Jun Xu <693788454@qq.com> Date: Thu, 26 Sep 2019 17:48:24 +0800 Subject: [PATCH] add copyright --- .../hello-world-cmake/CMakeLists.txt | 14 ++++++ .../app-samples/hello-world-cmake/build.sh | 14 ++++++ .../app-samples/hello-world-cmake/main.c | 16 +++++++ .../app-samples/hello-world-cmake/print.c | 16 +++++++ test-tools/toolchain/wamr_toolchain.cmake | 44 ++++++++++++------- 5 files changed, 88 insertions(+), 16 deletions(-) diff --git a/core/iwasm/app-samples/hello-world-cmake/CMakeLists.txt b/core/iwasm/app-samples/hello-world-cmake/CMakeLists.txt index 966e87781..fd4b2cca9 100644 --- a/core/iwasm/app-samples/hello-world-cmake/CMakeLists.txt +++ b/core/iwasm/app-samples/hello-world-cmake/CMakeLists.txt @@ -1,3 +1,17 @@ +# Copyright (C) 2019 Intel Corporation. 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. + cmake_minimum_required (VERSION 3.5) project(hello_world) diff --git a/core/iwasm/app-samples/hello-world-cmake/build.sh b/core/iwasm/app-samples/hello-world-cmake/build.sh index bbd335386..56077177a 100755 --- a/core/iwasm/app-samples/hello-world-cmake/build.sh +++ b/core/iwasm/app-samples/hello-world-cmake/build.sh @@ -1,5 +1,19 @@ #!/bin/bash +# Copyright (C) 2019 Intel Corporation. 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. + mkdir build cd build cmake .. -DCMAKE_TOOLCHAIN_FILE=../../../../test-tools/toolchain/wamr_toolchain.cmake diff --git a/core/iwasm/app-samples/hello-world-cmake/main.c b/core/iwasm/app-samples/hello-world-cmake/main.c index 8ff352b87..ced441960 100644 --- a/core/iwasm/app-samples/hello-world-cmake/main.c +++ b/core/iwasm/app-samples/hello-world-cmake/main.c @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2019 Intel Corporation. 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 "stdio.h" void print_line(char* str); diff --git a/core/iwasm/app-samples/hello-world-cmake/print.c b/core/iwasm/app-samples/hello-world-cmake/print.c index 3d85f9f95..62378b834 100644 --- a/core/iwasm/app-samples/hello-world-cmake/print.c +++ b/core/iwasm/app-samples/hello-world-cmake/print.c @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2019 Intel Corporation. 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 "stdio.h" #include "string.h" diff --git a/test-tools/toolchain/wamr_toolchain.cmake b/test-tools/toolchain/wamr_toolchain.cmake index 0ea6ae77f..97b730eaf 100644 --- a/test-tools/toolchain/wamr_toolchain.cmake +++ b/test-tools/toolchain/wamr_toolchain.cmake @@ -1,21 +1,33 @@ +# Copyright (C) 2019 Intel Corporation. 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. - SET(CMAKE_SYSTEM_NAME Linux) - SET(CMAKE_SYSTEM_PROCESSOR wasm32) - SET (CMAKE_SYSROOT ${CMAKE_CURRENT_LIST_DIR}/sysroot) +SET(CMAKE_SYSTEM_NAME Linux) +SET(CMAKE_SYSTEM_PROCESSOR wasm32) +SET (CMAKE_SYSROOT ${CMAKE_CURRENT_LIST_DIR}/sysroot) - SET (CMAKE_C_FLAGS "-nostdlib" CACHE INTERNAL "") - SET (CMAKE_C_COMPILER_TARGET "wasm32") - SET (CMAKE_C_COMPILER "clang-8") +SET (CMAKE_C_FLAGS "-nostdlib" CACHE INTERNAL "") +SET (CMAKE_C_COMPILER_TARGET "wasm32") +SET (CMAKE_C_COMPILER "clang-8") - SET (CMAKE_CXX_FLAGS "-nostdlib" CACHE INTERNAL "") - SET (CMAKE_CXX_COMPILER_TARGET "wasm32") - SET (CMAKE_CXX_COMPILER "clang++-8") +SET (CMAKE_CXX_FLAGS "-nostdlib" CACHE INTERNAL "") +SET (CMAKE_CXX_COMPILER_TARGET "wasm32") +SET (CMAKE_CXX_COMPILER "clang++-8") - SET (CMAKE_EXE_LINKER_FLAGS "-Wl,--no-entry,--export-all,--allow-undefined-file=${CMAKE_SYSROOT}/share/defined-symbols.txt" CACHE INTERNAL "") - SET (CMAKE_LINKER "/usr/bin/wasm-ld-8" CACHE INTERNAL "") +SET (CMAKE_EXE_LINKER_FLAGS "-Wl,--no-entry,--export-all,--allow-undefined-file=${CMAKE_SYSROOT}/share/defined-symbols.txt" CACHE INTERNAL "") +SET (CMAKE_LINKER "/usr/bin/wasm-ld-8" CACHE INTERNAL "") - SET (CMAKE_AR "/usr/bin/llvm-ar-8" CACHE INTERNAL "") - SET (CMAKE_NM "/usr/bin/llvm-nm-8" CACHE INTERNAL "") - SET (CMAKE_OBJDUMP "/usr/bin/llvm-objdump-8" CACHE INTERNAL "") - SET (CMAKE_RANLIB "/usr/bin/llvm-ranlib-8" CACHE INTERNAL "") - \ No newline at end of file +SET (CMAKE_AR "/usr/bin/llvm-ar-8" CACHE INTERNAL "") +SET (CMAKE_NM "/usr/bin/llvm-nm-8" CACHE INTERNAL "") +SET (CMAKE_OBJDUMP "/usr/bin/llvm-objdump-8" CACHE INTERNAL "") +SET (CMAKE_RANLIB "/usr/bin/llvm-ranlib-8" CACHE INTERNAL "")