Skip to content

Commit

Permalink
guard CMP0074 cmake policy with version
Browse files Browse the repository at this point in the history
  • Loading branch information
fangq committed Sep 9, 2023
1 parent 1455fbb commit 7426c8d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ cmake_minimum_required(VERSION 3.3)

project(mmc)

cmake_policy(SET CMP0074 NEW) # to make -DOPENCL_ROOT= work with newer CMake versions as well
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12.0")
cmake_policy(SET CMP0074 NEW) # to make -DOPENCL_ROOT= work with newer CMake versions as well
endif()

find_package(OpenMP REQUIRED)
find_package(OpenCL REQUIRED)
Expand Down

0 comments on commit 7426c8d

Please sign in to comment.