Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Hadrien Benjamin Grasland
Gaudi
Commits
dd57161e
Commit
dd57161e
authored
Feb 07, 2019
by
Marco Clemencic
Browse files
Make gaudi_add_compile_test also work for succeeding compilations (!844)
parents
7010260d
bd1130be
Changes
1
Hide whitespace changes
Inline
Side-by-side
cmake/GaudiProjectConfig.cmake
View file @
dd57161e
...
...
@@ -2621,7 +2621,8 @@ endfunction()
#
# Declare a compilation test (typically to test for compilation failure):
# ERRORS - List of errors (regex allowed) that are all required in the output
# in order for the test to succeed(!)
# in order for the test to succeed(!). If not specified, test result is
# the same as compilation success/failure.
#---------------------------------------------------------------------------------------------------
function
(
gaudi_add_compile_test executable
)
CMAKE_PARSE_ARGUMENTS
(
ARG
""
...
...
@@ -2636,17 +2637,18 @@ function(gaudi_add_compile_test executable)
set_target_properties
(
${
executable
}
PROPERTIES EXCLUDE_FROM_ALL TRUE
EXCLUDE_FROM_DEFAULT_BUILD TRUE
)
# Concatenate errors into multiline regex
if
(
ARG_ERRORS
)
# Concatenate errors into multiline regex
string
(
REPLACE
";"
".*[
\\
n
\\
r]*.*"
regex
"
${
ARG_ERRORS
}
"
)
gaudi_add_test
(
${
executable
}
COMMAND
${
CMAKE_COMMAND
}
--build . --target
${
executable
}
LABELS
${
ARG_LABELS
}
PASSREGEX
${
regex
}
)
else
()
set
(
regex
".*"
)
gaudi_add_test
(
${
executable
}
COMMAND
${
CMAKE_COMMAND
}
--build . --target
${
executable
}
LABELS
${
ARG_LABELS
}
)
endif
()
gaudi_add_test
(
${
executable
}
COMMAND
${
CMAKE_COMMAND
}
--build . --target
${
executable
}
LABELS
${
ARG_LABELS
}
PASSREGEX
${
regex
}
)
endfunction
()
#---------------------------------------------------------------------------------------------------
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment