Skip to content

Conversation

@Infinoid
Copy link
Contributor

@Infinoid Infinoid commented Jan 4, 2021

Building Taco with CUDA support causes cmake to warning, with cmake version 3.12.0 and later. Here's what it looks like:

$ cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DPYTHON=ON -DOPENMP=ON -DCUDA=ON ../git
CMake Warning (dev) at /usr/share/cmake-3.18/Modules/CMakeDetermineCompilerId.cmake:72 (if):
  Policy CMP0054 is not set: Only interpret if() arguments as variables or
  keywords when unquoted.  Run "cmake --help-policy CMP0054" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  Quoted variables like "CUDA" will no longer be dereferenced when the policy
  is set to NEW.  Since the policy is not set the OLD behavior will be used.
Call Stack (most recent call first):
  /usr/share/cmake-3.18/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:2 (project)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 10.2.1
-- The CXX compiler identification is GNU 10.2.1
[snip]

This patch silences the warning, without breaking older versions of cmake. (I tested all the way back to 2.8.12)

@stephenchouca stephenchouca merged commit f051a8f into tensor-compiler:master Jan 13, 2021
@Infinoid Infinoid deleted the cmake-policy-0054 branch January 21, 2021 12:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants