Make sdc.py use explicit use python2 Fixes T1304
Details
- Reviewers
staniek - Maniphest Tasks
- T1304: cmake failure when default 'python' is aliased to python3
- Commits
- R15:69c49f12e883: Make sdc.py use explicit use python2
Diff Detail
- Repository
- R15 KDb
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
cmake/modules/KDbCreateSharedDataClasses.cmake | ||
---|---|---|
42 | I used 'python ${CMAKE_SOURCE_DIR}/tools/sdc.py' probably because of the Windows requirement. sdc.py wouldn't work. So the change to python2 would belong here. |
Could you check if the standard Python 2 for Windows is python2.exe or python.exe? The sdc.py won't conflict, but the cmake COMMAND can. If that's the case, we need a condition in KDbCreateSharedDataClasses.cmake.
PS: I migrated *.shared.h files of KDb locally to the new syntax and everything works. Please push this patch first.
about python2.exe: I'm going to rewrite entire macro(KDB_CREATE_SHARED_DATA_CLASSES) to be used as add_excutable/add_library, so i will produce "target", and then I'll check if ".exe" is required for windows.
That's appreciated! For now users need to remember about calling cmake . in the builddir every time a *shared.h file changes. Looking forward to proper cmake dependencies coded, they did not work for me last I tried to code them.