diff --git a/CMakeLists.txt b/CMakeLists.txt index 879debac4a..ea99630abc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -18,7 +18,7 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.16.3) +cmake_minimum_required(VERSION 3.16.8) project(clr) ########## diff --git a/README.md b/README.md index 76b8d00885..c6c7cd0e11 100644 --- a/README.md +++ b/README.md @@ -20,19 +20,20 @@ If you need to build static clr library, `rocm-llvm-dev` package should be insta ### Linux - Clone this repository -``` -cd clr && mkdir build && cd build -``` + +- `cd clr && mkdir build && cd build` + - For HIP: -`cmake .. -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=$HIP_COMMON_DIR` + - `cmake .. -DCLR_BUILD_HIP=ON -DHIP_COMMON_DIR=$HIP_COMMON_DIR -DHIPCC_BIN_DIR=$HIPCC_BIN_DIR` + - `HIP_COMMON_DIR` points to [HIP](https://github.com/ROCm/HIP) - `HIP_COMMON_DIR` points to [HIP](https://github.com/ROCm/HIP) + - `HIPCC_BIN_DIR` points to hipcc directory, if you have ROCm installed you can point it to `$ROCM_PATH/bin` - For OpenCLâ„¢: -`cmake .. -DCLR_BUILD_OCL=ON` + - `cmake .. -DCLR_BUILD_OCL=ON` - Build and install diff --git a/hipamd/CMakeLists.txt b/hipamd/CMakeLists.txt index b9f90e315e..61e87acf57 100755 --- a/hipamd/CMakeLists.txt +++ b/hipamd/CMakeLists.txt @@ -17,7 +17,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.16.8) project(hip) include(GNUInstallDirs) diff --git a/hipamd/src/CMakeLists.txt b/hipamd/src/CMakeLists.txt index 5f6736d8dd..2a65b2d007 100644 --- a/hipamd/src/CMakeLists.txt +++ b/hipamd/src/CMakeLists.txt @@ -18,12 +18,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.5.1) - -if (POLICY CMP0074) - cmake_policy(SET CMP0074 NEW) -endif() - include(GNUInstallDirs) set(VERSION_MAJOR_AMDHIP ${HIP_VERSION_MAJOR}) diff --git a/hipamd/src/hiprtc/CMakeLists.txt b/hipamd/src/hiprtc/CMakeLists.txt index ef473f6237..6654e561b4 100644 --- a/hipamd/src/hiprtc/CMakeLists.txt +++ b/hipamd/src/hiprtc/CMakeLists.txt @@ -24,13 +24,8 @@ # Depends on: rocclr, so find_package(rocclr) will be required # Building hip header requires hip include folders with hip_version.h -cmake_minimum_required(VERSION 3.16.1) option(BUILD_SHARED_LIBS "Build the shared library" ON) -if (POLICY CMP0074) - cmake_policy(SET CMP0074 NEW) -endif() - list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") if(BUILD_SHARED_LIBS) diff --git a/hipamd/src/hiprtc/cmake/hiprtc-config.cmake.in b/hipamd/src/hiprtc/cmake/hiprtc-config.cmake.in index 5aa911925e..7b1421f17c 100644 --- a/hipamd/src/hiprtc/cmake/hiprtc-config.cmake.in +++ b/hipamd/src/hiprtc/cmake/hiprtc-config.cmake.in @@ -18,7 +18,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.3) @PACKAGE_INIT@ include(CMakeFindDependencyMacro) set_and_check(hiprtc_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@") diff --git a/opencl/CMakeLists.txt b/opencl/CMakeLists.txt index 14ae06c477..407964d7a7 100644 --- a/opencl/CMakeLists.txt +++ b/opencl/CMakeLists.txt @@ -1,10 +1,3 @@ -cmake_minimum_required(VERSION 3.5.1) - -if (POLICY CMP0048) - cmake_policy(SET CMP0048 NEW) - set(PROJ_VERSION VERSION 1.5.0) -endif() - project(opencl) set(CMAKE_POSITION_INDEPENDENT_CODE ON) diff --git a/opencl/amdocl/CMakeLists.txt b/opencl/amdocl/CMakeLists.txt index 7829021f17..cbe814a6e5 100644 --- a/opencl/amdocl/CMakeLists.txt +++ b/opencl/amdocl/CMakeLists.txt @@ -18,8 +18,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.5) - project(amdocl) option(BUILD_SHARED_LIBS "Build the shared library" ON) diff --git a/opencl/khronos/headers/opencl2.2/tests/CMakeLists.txt b/opencl/khronos/headers/opencl2.2/tests/CMakeLists.txt index 18451f784e..e8d1fd7d51 100644 --- a/opencl/khronos/headers/opencl2.2/tests/CMakeLists.txt +++ b/opencl/khronos/headers/opencl2.2/tests/CMakeLists.txt @@ -1,5 +1,4 @@ cmake_minimum_required (VERSION 3.5) - project(OpenCL_Headers_Tests) enable_testing() diff --git a/opencl/khronos/icd/CMakeLists.txt b/opencl/khronos/icd/CMakeLists.txt index 8ed6fe08d1..b35b4450ef 100644 --- a/opencl/khronos/icd/CMakeLists.txt +++ b/opencl/khronos/icd/CMakeLists.txt @@ -1,5 +1,4 @@ cmake_minimum_required (VERSION 3.5) - project (OPENCL_ICD_LOADER) include (GNUInstallDirs) find_package (Threads REQUIRED) diff --git a/opencl/packaging/CMakeLists.txt b/opencl/packaging/CMakeLists.txt index 1170e57e64..6cc4a64b67 100644 --- a/opencl/packaging/CMakeLists.txt +++ b/opencl/packaging/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5.1) +cmake_minimum_required(VERSION 3.16.8) project(rocm-opencl) set(CPACK_COMPONENTS_ALL binary dev) diff --git a/opencl/tests/ocltst/CMakeLists.txt b/opencl/tests/ocltst/CMakeLists.txt index cd7b501ac8..f903b32fe3 100644 --- a/opencl/tests/ocltst/CMakeLists.txt +++ b/opencl/tests/ocltst/CMakeLists.txt @@ -1,9 +1,3 @@ -cmake_minimum_required(VERSION 3.5.1) - -if (POLICY CMP0072) - cmake_policy(SET CMP0072 NEW) -endif() - set(OCLTST_DIR ${CMAKE_CURRENT_SOURCE_DIR}) if (WIN32) diff --git a/rocclr/CMakeLists.txt b/rocclr/CMakeLists.txt index 29ed85f88c..529960f0f3 100644 --- a/rocclr/CMakeLists.txt +++ b/rocclr/CMakeLists.txt @@ -18,8 +18,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.5) - project(ROCclr) if (${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/rocclr/cmake/ROCclr.cmake b/rocclr/cmake/ROCclr.cmake index 3358c51a7c..2241b6e924 100644 --- a/rocclr/cmake/ROCclr.cmake +++ b/rocclr/cmake/ROCclr.cmake @@ -18,12 +18,6 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -cmake_minimum_required(VERSION 3.5) - -if (POLICY CMP0072) - cmake_policy(SET CMP0072 NEW) -endif() - # ROCclr abstracts the usage of multiple AMD compilers and runtimes. # It is possible to support multiple backends concurrently in the same binary. option(ROCCLR_ENABLE_HSAIL "Enable support for HSAIL compiler" OFF) diff --git a/rocclr/elf/test/CMakeLists.txt b/rocclr/elf/test/CMakeLists.txt index 8326176b05..5ff4318f7b 100644 --- a/rocclr/elf/test/CMakeLists.txt +++ b/rocclr/elf/test/CMakeLists.txt @@ -19,7 +19,6 @@ # THE SOFTWARE. #-------------------------------------elf_test--------------------------------------# -cmake_minimum_required(VERSION 3.5.1) # This is unit test for amd::Elf. # The test is on top of rocclr, so rocclr must be built and installed firstly. # This file is seperate from cmake file of rocclr to prevent interference.