-
Notifications
You must be signed in to change notification settings - Fork 14
Cmake #295
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
base: master
Are you sure you want to change the base?
Cmake #295
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| inherit: [cmake] | ||
|
|
||
| depends: | ||
| - name: devel::cmake-3 | ||
| use: [tools] | ||
| tools: | ||
| target-toolchain: host-compat-toolchain |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| inherit: [patch] | ||
|
|
||
| metaEnvironment: | ||
| PKG_VERSION: "3.31.0" | ||
| PKG_LICENSE: "BSD-3-Clause" | ||
|
|
||
| checkoutSCM: | ||
| scm: url | ||
| url: ${GITHUB_MIRROR}/Kitware/CMake/releases/download/v${PKG_VERSION}/cmake-${PKG_VERSION}.tar.gz | ||
| digestSHA256: "300b71db6d69dcc1ab7c5aae61cbc1aa2778a3e00cbd918bc720203e311468c3" | ||
| stripComponents: 1 | ||
|
|
||
| checkoutDeterministic: True | ||
| checkoutScript: | | ||
| patchApplySeries $<@cmake/*.patch@> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is certainly not working, or? Even if it does currently, it will fail in the future. We have to keep the cmake-3 patches separate... |
||
|
|
||
| multiPackage: | ||
| "": | ||
| inherit: [cmake] | ||
| depends: | ||
| - libs::expat-dev | ||
| - libs::jsoncpp-dev | ||
| - libs::libarchive-dev | ||
| - libs::libuv-dev | ||
| - libs::rhash-dev | ||
| - libs::zlib-dev | ||
| - net::curl-dev | ||
| - use: [] | ||
| depends: | ||
| - libs::expat-tgt | ||
| - libs::jsoncpp-tgt | ||
| - libs::libarchive-tgt | ||
| - libs::libuv-tgt | ||
| - libs::rhash-tgt | ||
| - libs::zlib-tgt | ||
| - net::curl-tgt | ||
|
|
||
| buildScript: | | ||
| cmakeBuild "$1" \ | ||
| -DKWSYS_LFS_WORKS=TRUE \ | ||
| -DKWSYS_CHAR_IS_SIGNED=TRUE \ | ||
| -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ | ||
| -DCTEST_USE_XMLRPC=OFF \ | ||
| -DBUILD_CursesDialog=OFF | ||
|
|
||
| packageScript: | | ||
| cmakePackageTgt | ||
|
|
||
| provideDeps: [ "*-tgt" ] | ||
|
|
||
| bootstrap: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. AFAICT, the bootstrap package can be removed, couldn't it? |
||
| inherit: [make, install] | ||
|
|
||
| buildTools: [target-toolchain] | ||
| buildVars: [CC, CXX, LD, CPPFLAGS, CFLAGS, CXXFLAGS, LDFLAGS] | ||
| buildVarsWeak: [MAKE_JOBS] # hook onto make class | ||
| buildScript: | | ||
| mkdir -p build install | ||
| pushd build | ||
| "$1"/bootstrap \ | ||
| --prefix=/usr \ | ||
| --parallel="${MAKE_JOBS-$(nproc)}" -- \ | ||
| -DCMAKE_USE_OPENSSL:BOOL=OFF \ | ||
| -DBUILD_CursesDialog=OFF | ||
| makeParallel | ||
| make install DESTDIR="$PWD/../install" | ||
| popd | ||
|
|
||
| packageScript: | | ||
| installPackageTgt "$1/install/" | ||
|
|
||
| provideTools: | ||
| cmake: usr/bin | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,13 @@ | ||
| inherit: [patch] | ||
|
|
||
| metaEnvironment: | ||
| PKG_VERSION: "3.25.1" | ||
| PKG_VERSION: "${DEVEL__CMAKE_VERSION:-4.2.1}" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not a huge fan of this to be honest. It's better to have a dedicated cmake-3 recipe.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks. I guess you overlooked the remaining |
||
| PKG_LICENSE: "BSD-3-Clause" | ||
|
|
||
| checkoutSCM: | ||
| scm: url | ||
| url: ${GITHUB_MIRROR}/Kitware/CMake/releases/download/v${PKG_VERSION}/cmake-${PKG_VERSION}.tar.gz | ||
| digestSHA256: 1c511d09516af493694ed9baf13c55947a36389674d657a2d5e0ccedc6b291d8 | ||
| digestSHA256: "${DEVEL__CMAKE_DIGEST:-414aacfac54ba0e78e64a018720b64ed6bfca14b587047b8b3489f407a14a070}" | ||
| stripComponents: 1 | ||
|
|
||
| checkoutDeterministic: True | ||
|
|
@@ -40,6 +40,7 @@ multiPackage: | |
| -DKWSYS_LFS_WORKS=TRUE \ | ||
| -DKWSYS_CHAR_IS_SIGNED=TRUE \ | ||
| -DCMAKE_USE_SYSTEM_LIBRARIES=1 \ | ||
| -DCMAKE_USE_SYSTEM_LIBRARY_CPPDAP=OFF \ | ||
| -DCTEST_USE_XMLRPC=OFF \ | ||
| -DBUILD_CursesDialog=OFF | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid that doesn't work this way. After merging #282, the
ninjaandmakeclasses set different values for thejobServerkey. 😕The only way forward that I see is to move the common parts of this class to classes/basement/bits/cmake.yaml and create a new class
cmake-makethat doesinherit: ["basement::bits::cmake", make].There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😢 Bad timing... I have not rebased to #282...
I need this for only one package. I'll move
make-inherit to the recipe and leave only theCMAKE_GENERATORchange here..There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems fragile. I just had another idea. We could set
jobServer: "fifo"explicitly in the cmake class again with a big, fat comment explaining why. This mode is compatible with both tools...There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If make understands fifo as well why do we not simply set
jobServer: "fifo"in the make-class?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will fail if you start Bob from an old make. See here. OTOH, as soon as you hit a cmake/ninja recipe, this will happen anyway. Looking back, it should probably be a warning and just not pass the incompatible job server instead of failing.
Having said that, it sounds like an artificial problem. So using "fifo" consistently looks like the best way forward. Let's do it this way...