Giter VIP home page Giter VIP logo

Comments (11)

zbeekman avatar zbeekman commented on May 20, 2024 1

Perhaps we should avoid resolving the policy part of this problem within BLT until the cmake_minimum_version is decided. In the meantime, it is easy to add both a minimum version and the cmake policy part to your project's build system.

OK, I'll hold off adding the policy in my PR and leave it as the more portable/flexible MATCHES variant.

from blt.

zbeekman avatar zbeekman commented on May 20, 2024

Where would be the most appropriate place to set CMP0057 to NEW. I'd like to include that in my PR (#108).

from blt.

kennyweiss avatar kennyweiss commented on May 20, 2024

Thanks -- I'd think it should be around here -- https://github.com/LLNL/blt/blob/master/SetupBLT.cmake#L63 -- in SetupBLT.cmake.

It should be guarded by the version until we decide about adding a cmake_minimum_version to blt (and which version that should be), since earlier cmake versions will complain about unknown policies.
E.g.

if("${CMAKE_VERSION}" VERSION_GREATER 3.3)
    cmake_policy(SET CMP0057 NEW)
endif()

from blt.

zbeekman avatar zbeekman commented on May 20, 2024

from blt.

kennyweiss avatar kennyweiss commented on May 20, 2024

I think that it is a feature that is not yet in our blt tests.
It comes up when there is a transitive dependency in the DEPENDS_ON lists.

Perhaps we should avoid resolving the policy part of this problem within BLT until the cmake_minimum_version is decided. In the meantime, it is easy to add both a minimum version and the cmake policy part to your project's build system.

from blt.

kennyweiss avatar kennyweiss commented on May 20, 2024

Thanks @zbeekman.

It looks like we will explicit require cmake-3.3+ for basic blt functionality by testing against ${CMAKE_VERSION} in blt and throwing a FATAL_ERROR for earlier versions.

We will most likely not be adding the cmake_minimum_version to blt since this macro has side effects, and is better left to the user projects that brings in blt.

It is also worth mentioning that some of the CUDA functionality requires a significantly newer version of cmake (e.g. cmake-3.8.x), but since this is an optional feature of blt, we will not make this a requirement for all blt users.

We will be adding documentation and internal checks for these in the near future.

from blt.

zbeekman avatar zbeekman commented on May 20, 2024

from blt.

kennyweiss avatar kennyweiss commented on May 20, 2024

Let's make it a different PR to keep it separate from the fortran fixes.

from blt.

zbeekman avatar zbeekman commented on May 20, 2024

from blt.

white238 avatar white238 commented on May 20, 2024

This maybe caused by gmock/gtest overriding the cmake minimum in their code. It is at the top level CMakeLists.txt.

cmake_minimum_required(VERSION 2.6.2)

This should probably be commented out in our code.

from blt.

white238 avatar white238 commented on May 20, 2024

cmake_minimum_required calls were removed and a check was added in BLT to warn if you are below CMake 3.8.

from blt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.