You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Very often when trying to compile different projects i need to set some cmake flags that are specific to this project.
fish in that regard is quite good at path sensitive command completion but issue when i have different configuration for the same project, one of the solution that provided by cmake itself is user defined presets they are good if you are working with one project for long time but not very convenient when you just started development.
what would be nice is to have possibility to create aliases for the commands for given directory, something like :
cmake --build build --target clean && cmake --build build >> clean-build
will create alias for this directory (or global one) that will execute this command when typing clean-build
While this can be archived by creating custom functions that will depend on directory and I use it at the moment with fish, issue that I have is that i want to have one configuration for different machines and then i need to distinguish in this function directories and host machines that i am using, so creation of such alliases directly from the shell can make it much easier.
as an example of this function for kokkos that i have in my fish function
Very often when trying to compile different projects i need to set some cmake flags that are specific to this project.
fish in that regard is quite good at path sensitive command completion but issue when i have different configuration for the same project, one of the solution that provided by cmake itself is user defined presets they are good if you are working with one project for long time but not very convenient when you just started development.
what would be nice is to have possibility to create aliases for the commands for given directory, something like :
cmake --build build --target clean && cmake --build build >> clean-build
will create alias for this directory (or global one) that will execute this command when typing
clean-build
While this can be archived by creating custom functions that will depend on directory and I use it at the moment with fish, issue that I have is that i want to have one configuration for different machines and then i need to distinguish in this function directories and host machines that i am using, so creation of such alliases directly from the shell can make it much easier.
as an example of this function for
kokkos
that i have in my fish functionWhere
CXX
andCC
variables depend on host machine.Another example is long cmake command for some projects, for example
cmake -S . -B build -G Ninja -D CMAKE_CXX_COMPILER=clang++ -D CMAKE_C_COMPILER=clang -DLLVM_DIR=/home/yaraslau/.local/lib/cmake/llvm -D LLVM_EXTERNAL_LIT=/home/yaraslau/repo/llvm-project/build/bin/llvm-lit -DCUDAQ_BUILD_TESTS=ON -DCUDA Q_ENABLE_PYTHON=ON -D CMAKE_INSTALL_PREFIX=/home/yaraslau/.local -D CUDAQ_SKIP_MPI=ON -D CUDAQ_BUILD_TESTS=ON
or
cmake -S llvm -B build -G Ninja -DLLVM_TARGETS_TO_BUILD="X86;NVPTX" -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lldb;mlir;llvm" -D CMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_LINK_JOBS=2 -D LLVM_ENABLE_RUNTIMES=all -DCMAKE_INSTALL_PR EFIX=/home/yaraslau/.local -DLLVM_INSTALL_UTILS=ON
The text was updated successfully, but these errors were encountered: