Re: Is this an intended change to cmake behavior in cmake 3.12?
On 07/20/2018 11:48 AM, Buster, James wrote:
> Using cmake 3.12: the second “cmake .” issues the following warning:
> CMake Warning (dev) in CMakeLists.txt:
> Policy CMP0048 is not set: project() command manages VERSION variables.
> See the “test_project2” macro in CMakeLists.txt? Simply uncomment it.
> Even though it isn’t called, uncommenting that macro causes the
> “Policy CMP0048” warning to disappear.
If no project() command appears anywhere in the top-level CMakeLists.txt
file then one is injected on line zero. That is the one that causes
the warning. When it is present in the inline macro then no injection
is done. It's strange but that's how things evolved.