Skip to content
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

[cmake] Add ninja support for Windows #15635

Open
wants to merge 13 commits into
base: master
Choose a base branch
from

Conversation

bellenot
Copy link
Member

No description provided.

@bellenot bellenot self-assigned this May 24, 2024
@dpiparo
Copy link
Member

dpiparo commented May 24, 2024

PoW item number 6 of the "Builds and Binaries" category

Copy link

github-actions bot commented May 24, 2024

Test Results

    13 files      13 suites   2d 23h 39m 11s ⏱️
 2 651 tests  2 651 ✅ 0 💤 0 ❌
32 645 runs  32 645 ✅ 0 💤 0 ❌

Results for commit 5815afb.

♻️ This comment has been updated with latest results.

@bellenot bellenot marked this pull request as draft May 24, 2024 14:43
@bellenot bellenot marked this pull request as ready for review May 24, 2024 19:30
Copy link
Member

@dpiparo dpiparo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Let's not forget to update the PoW status accordingly.

@bellenot bellenot requested a review from couet as a code owner May 28, 2024 10:03
graf3d/CMakeLists.txt Outdated Show resolved Hide resolved
Fix ACLiC in debug mode (match ROOT build type)
Fix dictionary generation with Eve7 (adjusting rootcling skack size)
@bellenot bellenot requested a review from pcanal May 30, 2024 15:11
Copy link
Member

@pcanal pcanal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One missing comment.

@bellenot
Copy link
Member Author

One missing comment.

Nope, the code (the condition) onto which you commented has been removed (I fixed rootcling which was failing on eve7)

@pcanal
Copy link
Member

pcanal commented May 30, 2024

Nope, the code (the condition) onto which you commented has been removed (I fixed rootcling which was failing on eve7)

Sorry, github misled me :). (and I equally missed the fix :) )

@bellenot
Copy link
Member Author

bellenot commented May 30, 2024

Sorry, github misled me :). (and I equally missed the fix :) )

No problem! 🙂

@@ -2136,6 +2136,10 @@ void AddPlatformDefines(std::vector<std::string> &clingArgs)
clingArgs.push_back(platformDefines);
snprintf(platformDefines, 64, "-DG__VISUAL=%ld", (long)_MSC_VER);
clingArgs.push_back(platformDefines);
#if defined(_WIN64) && defined(_DEBUG)
snprintf(platformDefines, 64, "-D_ITERATOR_DEBUG_LEVEL=0"); //, (long)_ITERATOR_DEBUG_LEVEL);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does that fix: "the I/O is still broken in debug mode, due to the special iterators on x64," ?

Copy link
Member Author

@bellenot bellenot May 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately not, it's just a workaround. The problem is that one can only link the ROOT libraries in debug mode if they use the same flag with their software. Even worse, the externals have to be built with the same flag (e.g. I had the issue with Pythia8)!
And you are the only one able to fix the issue!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok.

Comment on lines +16 to +17
if(CMAKE_GENERATOR MATCHES Ninja)
if (CMAKE_BUILD_TYPE MATCHES Debug)
Copy link
Contributor

@guitargeek guitargeek Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if(CMAKE_GENERATOR MATCHES Ninja)
if (CMAKE_BUILD_TYPE MATCHES Debug)
if(CMAKE_GENERATOR MATCHES Ninja AND CMAKE_BUILD_TYPE MATCHES Debug)

Maybe better?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope. the if() - else() test is for ninja only, independently of the build type

Comment on lines 21 to 27
if(winrtdebug)
set(PCRE_POSTFIX $<$<CONFIG:Debug>:d>)
set(pcre_config_kind "Debug")
else()
set(pcre_config_kind "Release")
endif()
set(pcre_config "--config")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, is this not in the else() of the if(WIN32) branch? Why is winrtdebug relevant then? I thought if(WIN32) is true for any ROOT build on Windows

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code is correct, but I'll make it more clear

Comment on lines 29 to 32
set(CLAD_BYPRODUCTS
${_CLAD_LIBRARY_PATH}/cladPlugin.lib
${_CLAD_LIBRARY_PATH}/cladDifferentiator.lib
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why can't CMAKE_STATIC_LIBRARY_PREFIX and CMAKE_STATIC_LIBRARY_SUFFIX be used in case of Ninja on Windows?

Copy link
Member Author

@bellenot bellenot Jun 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I'll cross-check...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You were right. Fixed. Thanks!

Copy link
Contributor

@guitargeek guitargeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice! I have only a few small questions and suggestions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants