Skip to content

started to update the project to the current Beman standard #151

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

Closed
wants to merge 19 commits into from

Conversation

dietmarkuehl
Copy link
Member

@dietmarkuehl dietmarkuehl commented May 29, 2025

see #155

@dietmarkuehl dietmarkuehl force-pushed the update-for-beman-standards branch from 73c7631 to bd17f0f Compare May 31, 2025 22:39
@ClausKlein ClausKlein self-assigned this Jun 1, 2025
@ClausKlein
Copy link
Collaborator

ClausKlein commented Jun 1, 2025

I can not understand what is going on this project?

see https://github.com/ClausKlein/execution/actions/runs/15373746732/job/43256183253#step:5:121

Some of my checks are deleted?

The build fails on OSX?
see #153

The installed version is not usable:

bash-5.2$ cmake -B build -S .
CMake Error at CMakeLists.txt:17 (find_package):
  Could not find a configuration file for package "beman.execution" that
  exactly matches requested version "0.0.2".

  The following configuration files were considered but not accepted:

    /Users/clausklein/.local/lib/cmake/beman.execution/beman.execution-config.cmake, version: unknown



-- Configuring incomplete, errors occurred!
bash-5.2$ 

...

@ClausKlein
Copy link
Collaborator

Do you know why this code was removed and what the konsequences are?

if(NOT PROJECT_IS_TOP_LEVEL)
  # test if the targets are findable from the build directory
  # cmake-format: off
  add_test(NAME find-package-test
    COMMAND ${CMAKE_CTEST_COMMAND}
      # --verbose
      --output-on-failure
      -C $<CONFIG>
      --build-and-test
          "${CMAKE_CURRENT_SOURCE_DIR}"
          "${CMAKE_CURRENT_BINARY_DIR}/find-package-test"
      --build-generator ${CMAKE_GENERATOR}
      --build-makeprogram ${CMAKE_MAKE_PROGRAM}
      --build-options
          "-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}"
          "-DCMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD}"
          "-DCMAKE_BUILD_TYPE=$<CONFIG>"
          "-DCMAKE_PREFIX_PATH=${CMAKE_PREFIX_PATH}"
          # TODO(CK): Needed too? "--config $<CONFIG>"
  )
  # cmake-format: on
endif()

Copy link
Collaborator

@ClausKlein ClausKlein left a comment

Choose a reason for hiding this comment

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

damit ist quasi das project tot!

"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/find-package-test"
--build-generator ${CMAKE_GENERATOR}
--build-makeprogram ${CMAKE_MAKE_PROGRAM}
Copy link
Collaborator

Choose a reason for hiding this comment

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

... den sie wissen nicht was sie tun!

Copy link
Member Author

Choose a reason for hiding this comment

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

Similar to my previous comment, I admit that I don't understand what this test tries to achieve. In my development it was always executed (and I haven't figured out, yet, why) and took a substantial amount of time.

Copy link
Collaborator

Choose a reason for hiding this comment

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

with bemanproject/exemplar#173 this variant, only examples are used.


if(PROJECT_IS_TOP_LEVEL)
find_package(beman_execution 0.0.1 EXACT QUIET)
if(beman_execution_FOUND)
Copy link
Collaborator

Choose a reason for hiding this comment

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

... den sie wissen nicht was sie tun!

Copy link
Member Author

Choose a reason for hiding this comment

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

I do understand the German but I don't quite understand the implication. I admit that I don't understand what that is trying to achieve. There is certainly no equivalent logic in the exemplar version of the file. Explicitly testing for a version number seems ill-advised, though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dietmarkuehl
Copy link
Member Author

I can not understand what is going on this project?

see https://github.com/ClausKlein/execution/actions/runs/15373746732/job/43256183253#step:5:121

At C++Now we had multiple discussions on the build infrastructure. The general consensus was (is?) that Beman projects should have mainly identical builds: the overall development should happen on the exemplar and/or infra repository(-ies). There are multiple parties interested in getting build right, including people from Kitware who can change cmake if changes are needed/useful (and representatives from, at least, one Kitware client who may ask them to do so).

The current PR is a draft bringing execution in line with the [current] exemplar structure. At least my hope is that we eventually arrive at a setup which is shared between projects with the only differences being the name and the list of entities being build.

Some of my checks are deleted?

Yes: see above. If the checks are useful/necessary I think they should be present in all Beman projects alike. While consistency was (is) the main driver, a secondary reason for me was that the find-package-test always took a substantial amount of time as it ran every time I built execution. When trying to confirm that this would still be the case I noticed that the test is not run if I just restore it (if the test isn't run all the time I'll restore it , assuming a corresponding test will emerge in exemplar).

The build fails on OSX? see #153

It most certainly doesn't when I build on my local machine(s) (I'm developing on Macs) or in the CI github. However, these use Apple's /usr/bin/clang++ when building rather than a recent LLVM release. I just tried to reproduce this problem but it builds OK for me:

PATH=/opt/llvm-20.1.5/bin:$PATH cmake --workflow appleclang-release
Executing workflow step 1 of 3: configure preset "appleclang-release"

Preset CMake variables:

  CMAKE_BUILD_TYPE="RelWithDebInfo"
  CMAKE_CXX_STANDARD="20"
  CMAKE_EXPORT_COMPILE_COMMANDS="ON"
  CMAKE_PROJECT_TOP_LEVEL_INCLUDES="./cmake/use-fetch-content.cmake"
  CMAKE_TOOLCHAIN_FILE="cmake/appleclang-toolchain.cmake"

-- The CXX compiler identification is Clang 20.1.5
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/llvm-20.1.5/bin/clang++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done (0.8s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/kuehl/src/execution/build/appleclang-release

Executing workflow step 2 of 3: build preset "appleclang-release"

[1/372] Scanning /Users/kuehl/src/execution/tests/beman/execution/exec-continues-on.test.cpp for CXX dependencies
...
99/99 Test #99: beman.execution.examples.doc-just_stopped ......   Passed    0.20 sec

100% tests passed, 0 tests failed out of 99

Total Test time (real) =  14.15 sec

The error on issue 153 looks like a mismatch between the used C++ run-time library and the library it was compiled with. I just noticed that the issue is with Intel Macs - so far I have only tried to run ARM Macs. I'll try with an Intel Mac, too.

The installed version is not usable:

bash-5.2$ cmake -B build -S .
CMake Error at CMakeLists.txt:17 (find_package):
  Could not find a configuration file for package "beman.execution" that
  exactly matches requested version "0.0.2".

  The following configuration files were considered but not accepted:

    /Users/clausklein/.local/lib/cmake/beman.execution/beman.execution-config.cmake, version: unknown



-- Configuring incomplete, errors occurred!
bash-5.2$ 

That's more concerning: that is something obviously undesirable. I haven't tried the changes, yet, with projects depending on execution (one additional motivation for meddling with the CMakeLists.txt was that recent versions of execution couldn't be used with net or task but I need some of the recent execution fixes.

I don't have a project set up which uses execution via find_package: do you have a URL for such a project or a basic CMakeLists.txt to reproduce the problem?

ClausKlein and others added 3 commits June 1, 2025 20:18
@ClausKlein
Copy link
Collaborator

I don't have a project set up which uses execution via find_package: do you have a URL for such a project or a basic CMakeLists.txt to reproduce the problem?

see bemanproject/exemplar#173

@ClausKlein
Copy link
Collaborator

However, these use Apple's /usr/bin/clang++ when building rather than a recent LLVM release

I have brew installed with llvm-20.
The clang-tools must in path to be used while build my projects. The most apple tools are old!

I need cmake, clang-tidy, clang-format, clang++, ...

@ClausKlein
Copy link
Collaborator

The new workflow presets are not usable in general!

My old presets supports also package preset.

How would you install after a workflow build?
I found only non working docs!

@ClausKlein
Copy link
Collaborator

@dietmarkuehl close this MR please!

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.

2 participants