Project

General

Profile

Bug #24996

Cmake warning: No project() command is present

Added by Gianluca Petrillo about 1 month ago. Updated 29 days ago.

Status:
Closed
Priority:
Low
Assignee:
Target version:
-
Start date:
09/21/2020
Due date:
% Done:

100%

Estimated time:
Spent time:
Duration:

Description

Cmake started recently to complain about a missing project() command.
This was obtained from an area with only icaruscode develop checked out, but I suppose it happens in any case given a properly new version of Cmake:

$ mrb build -j16
/icarus/app/users/petrillo/LArSoft/tests/sigProcError/build_slf7.x86_64
calling buildtool -I /icarus/app/users/petrillo/LArSoft/tests/sigProcError/localProducts_larsoft_v09_03_00_e19_prof -b -j16
INFO: Install prefix = /icarus/app/users/petrillo/LArSoft/tests/sigProcError/localProducts_larsoft_v09_03_00_e19_prof
INFO: CETPKG_TYPE = Prof

------------------------------------
INFO: Stage cmake.
------------------------------------

CMake Warning (dev) in CMakeLists.txt:
  No project() command is present.  The top-level CMakeLists.txt file must
  contain a literal, direct call to the project() command.  Add a line of
  code such as

    project(ProjectName)

  near the top of the file, but after cmake_minimum_required().

  CMake is pretending there is a "project(Project)" command on the first
  line.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- The C compiler identification is GNU 8.2.0
-- The CXX compiler identification is GNU 8.2.0
-- Check for working C compiler: /cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/gcc
-- Check for working C compiler: /cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/gcc - works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/g++
-- Check for working CXX compiler: /cvmfs/larsoft.opensciencegrid.org/products/gcc/v8_2_0/Linux64bit+3.10-2.17/bin/g++ - works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- 
-- =============================================================================
-- === *** Start of configuration of icaruscode ***
-- ===
-- cetbuildtools_BINDIR = /cvmfs/larsoft.opensciencegrid.org/products/cetbuildtools/v7_17_01/bin
-- full qual e19:prof reduced to e19
-- Product is icaruscode v09_02_00 e19:prof
-- Module path is /cvmfs/larsoft.opensciencegrid.org/products/canvas/v3_09_01/Modules;/cvmfs/larsoft.opensciencegrid.org/products/cetbuildtools/v7
_17_01/Modules
[...]
(the warning is just after the stage banner)

Needless to say, icaruscode's CMakeLists.txt complies. I think the issue is that the master file ${MRB_SOURCE}/CMakeLists.txt does not.
The project() command is typically among the first ones in each single repository, so I suppose it does not matter too much which project is declared in the master... but I don't really know that.

Software environment: mrb v4_01_04, cmake v3_17_3.

cmake.diff (1.51 KB) cmake.diff icaruscode CMakeLists.txt Lynn Garren, 09/21/2020 09:17 PM

Associated revisions

Revision 27cb2217
Added by Lynn Garren about 1 month ago

Merge tag 'v4_02_00' into develop

mrb v4_02_00 for #24996 v4_02_00

History

#1 Updated by Lynn Garren about 1 month ago

  • Assignee set to Lynn Garren
  • Status changed from New to Assigned

I'll take a look. I note that icaruscode/CMakeLists.txt does not reflect our latest recommendations.

#2 Updated by Lynn Garren about 1 month ago

See larg4/CMakeLists.txt or any of the art suite CMakeLists.txt files. I'm attaching a diff file for icaruscode.

#3 Updated by Lynn Garren about 1 month ago

  • % Done changed from 0 to 100
  • Status changed from Assigned to Resolved

The problem is resolved with mrb v4_02_00. However, I want to test this a bit more before installing it on the larsoft cvmfs.

#4 Updated by Lynn Garren about 1 month ago

mrb v4_02_00 is now installed on larsoft cvmfs

#5 Updated by Kyle Knoepfel 29 days ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF