You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think if(${Coverage_BASE_DIRECTORY}) evaluates wrongly, probably should be without the parenthesis.
Here I attache a small test:
project(Test)
cmake_minimum_required(VERSION 3.5)
function(f)
set(options NO_DEMANGLE)
set(oneValueArgs BASE_DIRECTORY NAME)
set(multiValueArgs EXCLUDE EXECUTABLE EXECUTABLE_ARGS DEPENDENCIES LCOV_ARGS GENHTML_ARGS)
cmake_parse_arguments(Coverage "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
message("Coverage_BASE_DIRECTORY should be defined as ${Coverage_BASE_DIRECTORY}")
if(${Coverage_BASE_DIRECTORY})
message("but is defined as ${Coverage_BASE_DIRECTORY}")
else()
message("but is not defined")
endif()
if(Coverage_BASE_DIRECTORY)
message("[with fix]: is defined as ${Coverage_BASE_DIRECTORY}")
else()
message("[with fix]: is not defined")
endif()
endfunction()
f(BASE_DIRECTORY "TEST1")
f()
That on my machine (amd64, ubuntu 20.04, cmake 3.16) produces:
Coverage_BASE_DIRECTORY should be defined as TEST1
but is not defined
[with fix]: is defined as TEST1
Coverage_BASE_DIRECTORY should be defined as
but is not defined
[with fix]: is not defined
I found this line because I'm using lcov, but probably same thing applies for gcov sections.
Cheers!
The text was updated successfully, but these errors were encountered:
Hello,
I have a problem defining the BASE_DIRECTORY in CodeCoverage.cmake:
cmake-modules/CodeCoverage.cmake
Line 212 in 0503702
I think if(${Coverage_BASE_DIRECTORY}) evaluates wrongly, probably should be without the parenthesis.
Here I attache a small test:
That on my machine (amd64, ubuntu 20.04, cmake 3.16) produces:
I found this line because I'm using lcov, but probably same thing applies for gcov sections.
Cheers!
The text was updated successfully, but these errors were encountered: