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

COMP: Fix build ensuring inner-build doesn't override the outer build #48

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jcfr
Copy link
Contributor

@jcfr jcfr commented Apr 20, 2023

This ensures the project and its dependency are built using the expected compiler.

With this set of changes, the extension project now build on the Slicer build machine where we explicitly set CC and CXX variables to /dev/null and ensure the same compiler is used across all projects.

It fixes the following error:

-- Extension description has been written to: /.../DiffusionQC-build/DiffusionQC.s4ext
-- Checking if extension type is SuperBuild
-- Checking if extension type is SuperBuild - true
-- Extension fixup mode: updating CPACK_INSTALL_CMAKE_PROJECTS with <cpack_bundle_fixup_directory>
-- The C compiler identification is unknown
-- The CXX compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /dev/null
-- Check for working C compiler: /dev/null - broken
...

Source: https://slicer.cdash.org/viewBuildError.php?buildid=3001519

Summary:

  • Ensure inner-build doesn't override the outer build by setting the EXTENSION_BUILD_SUBDIRECTORY variable specific to the SuperBuild extension layout.

  • Fix inner build ensuring the Slicer_DIR variable is propagated.

  • Ensure the Git executable is consistently set and remove obsolete workaround. Note also that Subversion is not used anymore.

  • Ensure CMake options specific to CXX standard are propagated.

  • Remove obsolete <proj>_USE_GIT_PROTOCOL variable. It is now defined and set in the ExternalProjectDependency CMake module. Note also that the default is now set to "https" as GitHub removed unauthenticated access through the git protocol. See https://github.blog/2021-09-01-improving-git-protocol-security-github/

  • Remove obsolete MIDAS_PACKAGE_* variables. Upload of extension is done using a different mechanism. See Slicer/Slicer@359f95c9b (COMP: Simplify extension package upload logic removing midas support)

  • Remove explicit and incorrect setting of CMAKE_BUILD_TYPE option. The option is set only for single-config CMake generator (e.g Unix Makefiles) after calling include(${Slicer_USE_FILE}) which indirectly includes the SlicerInitializeBuildType CMake module.

If these changes, the extension now build successfully:

image

References:

cc: @sjh26 @Sunderlandkyl

@jcfr jcfr force-pushed the improve-and-fix-build-system branch from c3aced6 to f2db3be Compare April 20, 2023 02:03
* Ensure inner-build doesn't override the outer build by setting
  the EXTENSION_BUILD_SUBDIRECTORY variable specific to the SuperBuild
  extension layout.

* Fix inner build ensuring the Slicer_DIR variable is propagated.

* Ensure the Git executable is consistently set and remove obsolete
  workaround. Note also that Subversion is not used anymore.

* Ensure CMake options specific to CXX standard are propagated.

* Remove obsolete <proj>_USE_GIT_PROTOCOL variable. It is now defined and
  set in the ExternalProjectDependency CMake module.
  Note also that the default is now set to "https" as GitHub removed
  unauthenticated access through the git protocol.
  See https://github.blog/2021-09-01-improving-git-protocol-security-github/

* Remove obsolete MIDAS_PACKAGE_* variables. Upload of extension is done
  using a different mechanism. See Slicer/Slicer@359f95c9b (COMP: Simplify
  extension package upload logic removing midas support)

* Remove explicit and incorrect setting of CMAKE_BUILD_TYPE option. The option
  is set only for single-config CMake generator (e.g Unix Makefiles) after
  calling "include(${Slicer_USE_FILE})" which indirectly includes the
  "SlicerInitializeBuildType" CMake module.
@jcfr jcfr force-pushed the improve-and-fix-build-system branch from f2db3be to c760643 Compare April 20, 2023 02:06
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.

1 participant