Unverified Commit fe840def authored by acpaquette's avatar acpaquette Committed by GitHub
Browse files

Added check in cmake for invalid truth/unittest counts (#5471)

parent 668181ba
Loading
Loading
Loading
Loading
+6 −1
Changes for isis/cmake/AddIsisModule.cmake: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -129,7 +129,12 @@ function(add_isis_obj folder reqLibs)
  # If there are multiple truth files, select based on the OS.
  list(LENGTH thisTestFiles numTest)
  list(LENGTH thisTruthFiles numTruth)
  if(NOT (${numTest} EQUAL ${numTruth}) )
  if(((${numTruth} EQUAL 0) OR (${numTest} EQUAL 0)) AND NOT (${numTruth} EQUAL ${numTest}))
    message( FATAL_ERROR "Error: Found different number of truth {${numTruth}} and test {${numTest}} files for ${folderName}!\n"
                         "There should be at least one object.truth file and one unittest.cpp file." )
  endif()

  if(${numTruth} GREATER ${numTest})

    # Look for a truth file that contains the OS string
    set(matchedTruth "NONE")
−37

File deleted.

−84

File deleted.