Reference-ScaLAPACK / scalapack

ScaLAPACK development repository
Other
131 stars 58 forks source link

Allow build without building tests #29

Open derpda opened 3 years ago

derpda commented 3 years ago

Currently there seems to be no way to avoid building all tests when building with cmake. This takes considerable time, and allowing users to only compile the actual library would be easy by including an option like

option(SCALAPACK_BUILD_TESTS "Build all tests of the ScaLAPACK library" ON) and later writing

if (${SCALAPACK_BUILD_TESTS})
  add_subdirectory(TESTING)
endif()

If this is acceptable, I can make a small PR for this.

langou commented 3 years ago

Sounds good to me. A question I am asking myself is whether the testing should be enabled by default (and then deactivated by a flag) or whether the testing should be disabled by default (and then enabled by a flag). I see that you are choosing the alter (so testing disabled by default). This sounds good to me. I do not have an opinion on this. But yes, being able to control testing (or not) would be great.

derpda commented 3 years ago

I think many libraries build their tests by default, so I would probably it at that as well. Its easy enough for users to disable it once the cmake option exists. I'll make a simple PR now!

derpda commented 3 years ago

@langou Let me know what you think of the PR I made!

langou commented 3 years ago

Closed with PR #30