-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[interop] Fix build errors with -Dtesting=off
#17791
base: master
Are you sure you want to change the base?
Conversation
@@ -59,6 +59,7 @@ set(CMAKE_CXX_EXTENSIONS NO) | |||
include(GNUInstallDirs) | |||
option(CPPINTEROP_USE_CLING "Use Cling as backend" OFF) | |||
option(CPPINTEROP_USE_REPL "Use clang-repl as backend" ON) | |||
option(CPPINTEROP_ENABLE_TESTING "Enable the CppInterOp testing infrastructure." ON) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong place, you set set(CPPINTEROP_ENABLE_TESTING OFF)
in interpreter/CMakeLists.txt
but add the option here... Please take a look at my diff again
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These options are meant to live inside CppInterOp. See CPPINTEROP_USE_CLING
. We configure them from within the Interpreter CMake that propagates the flags to InterOp.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We cannot define the option in ROOT, since InterOp is also a standalone library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, anyway, you cannot set a value before defining it...
interpreter/CMakeLists.txt
Outdated
@@ -525,4 +525,9 @@ set(CPPINTEROP_INCLUDE_DIRS | |||
#---Set InterOp to build on Cling, this can be toggled to use Clang-REPL------------------------------------------------------- | |||
set(CPPINTEROP_USE_CLING ON BOOL "Use Cling as backend") | |||
|
|||
#---Disable testing on InterOp if ROOT's testing is OFF (InterOp tests are enabled by default) ------------------------------------------------------- | |||
if(NOT testing) | |||
set(CPPINTEROP_ENABLE_TESTING OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set(CPPINTEROP_ENABLE_TESTING OFF) | |
set(CPPINTEROP_ENABLE_TESTING OFF) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don’t we just need set in the cache with force?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is how we do it for LLVM. Updated with the same
Test Results 15 files 15 suites 3d 19h 20m 58s ⏱️ Results for commit 463c909. ♻️ This comment has been updated with latest results. |
8b0950b
to
3f4d1a9
Compare
3f4d1a9
to
e1f3605
Compare
This was due to a bug in CppInterOp where
option(CPPINTEROP_ENABLE_TESTING "Enables the testing infrastructure." BOOL)
was defined twice conditionally. This is incorrect and does not allow users to override the option, leading to testing always being on. Fixed with compiler-research/CppInterOp#506
This also requires ROOT to set the same flag in the interpreter CMake (which did not work earlier due to the underlying bug in InterOp)
cc @bellenot