Project

General

Profile

Bug #8890

cet_test has confusing error report

Added by Lynn Garren over 4 years ago. Updated almost 2 years ago.

Status:
Feedback
Priority:
Low
Target version:
-
Start date:
05/21/2015
Due date:
% Done:

0%

Estimated time:
1.00 h
Scope:
Internal
Experiment:
-
SSI Package:
cetbuildtools
Co-Assignees:
Duration:

Description

cet_test expects a .cc extension unless you specify SOURCES. This differs from art_make, etc. and can cause confusion.

For instance, in attempting to use test_Range.cxx and cet_test(test_Range ...), we get the following error report:

CMake Error at /home/dladams/ups/cetbuildtools/v4_08_01/Modules/CetTest.cmake:273 (ADD_EXECUTABLE):
  Cannot find source file:

    test_Range.cc

  Tried extensions .c .C .c++ .cc .cpp .cxx .m .M .mm .h .hh .h++ .hm .hpp
  .hxx .in .txx
Call Stack (most recent call first):
  lbtupler/test/LbTupler/CMakeLists.txt:1 (cet_test)

The problem is easily fixed by calling cet_test(test_Range SOURCES test_Range.cxx ... ), but the error report is confusing. Would it be reasonable for cet_test to check for standard extensions? If not, could cet_test please check for the presence of the expected file and throw a fatal error immediately before attempting to use the default file name?

History

#1 Updated by Christopher Green over 4 years ago

  • Status changed from New to Feedback
  • Assignee set to Christopher Green
  • Target version set to 1.18.00
  • Estimated time set to 1.00 h
  • SSI Package cetbuildtools added
  • SSI Package deleted ()

This can certainly done, and it will take two minutes to implement, but we should run this past the stakeholders because it could break existing builds.

#2 Updated by Christopher Green about 4 years ago

  • Target version changed from 1.18.00 to 834

#3 Updated by Marc Paterno almost 4 years ago

  • Target version changed from 834 to 3.12.06

#4 Updated by Christopher Green almost 4 years ago

  • Target version changed from 3.12.06 to 521

#5 Updated by Kyle Knoepfel almost 2 years ago

  • Target version deleted (521)


Also available in: Atom PDF