General Question How to configure VS to use single core?

SpaceBoy2

Member
Joined
Jan 29, 2022
Messages
48
Reaction score
10
Points
23
Location
India
The instructions for building with the VS generator says to configure it to use single core. But how do I do this?

Thanks
 

n72.75

Move slow and try not to break too much.
Orbiter Contributor
Addon Developer
Tutorial Publisher
Donator
Joined
Mar 21, 2008
Messages
2,694
Reaction score
1,352
Points
128
Location
Saco, ME
Website
mwhume.space
Preferred Pronouns
he/him
To clarify, which instructions?

I can tell you for certain that both multithreaded compilation and multithreaded add-ons are possible.
 

SpaceBoy2

Member
Joined
Jan 29, 2022
Messages
48
Reaction score
10
Points
23
Location
India
I meant the build instructions for OpenOrbiter. I normally use Ninja so no problem. I asked the question out of curiosity, to see how you would do it to use the VS generator.

And what part of the code is not threadsafe? The integrator?

Thanks again
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
I have configured the VS generator to use multi-core build to greatly decrease build-time and it's been working just fine here. However, documentation build process could fail with multi-core. I have never tried to build documentation so far. If there is a problem then maybe the multi-core could be disabled if documentation build is enabled.
Multi-core build is enabled by "set(CompileFlags "/MP")" in CMakeLists.txt in the root folder.
 

SpaceBoy2

Member
Joined
Jan 29, 2022
Messages
48
Reaction score
10
Points
23
Location
India
Oh I see. Thanks for the information. But does that mean switching to single core is not necessary for building Orbiter? I have tried building with VS but it failed all the time so I thought it might be the configuration
P.S I never build docs too
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
But does that mean switching to single core is not necessary for building Orbiter?
Correct, no need to switch to single-core. Which part is failing ?

After building the Orbiter I have performed Install operation using "Tools/Command Line/Developer PowerShell"
like this "PS C:\Software\CleanBuild-VS> cmake --install C:\Software\CleanBuild-VS --config Debug"
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,666
Reaction score
795
Points
128
The install destination must be configured when running the "CMake-GUI"
 

SpaceBoy2

Member
Joined
Jan 29, 2022
Messages
48
Reaction score
10
Points
23
Location
India
I forgot which part. Something related to CMake.
Thanks for that
The install destination must be configured when running the "CMake-GUI"
Ah. I don't use CMake GUI now that I use to use Ninja. That might be it LOL
 

SpaceBoy2

Member
Joined
Jan 29, 2022
Messages
48
Reaction score
10
Points
23
Location
India
I succeeded in building it! Thanks. But I don't know what I did this time correctly. I still didn't use CMake GUI but used Ninja to set the variables and then switched to VS maybe that was it
 
Top