diff --git a/.templates/.clangd b/.templates/.clangd index 9ac5961..06afaff 100644 --- a/.templates/.clangd +++ b/.templates/.clangd @@ -1,2 +1,2 @@ CompileFlags: - Add: [-pthread, -std=c++20, -I%%%CURRENT_DIR%%%/src, -I%%%GLOBAL_WORKING_DIR%%%/pikotools/src, -I%%%GLOBAL_WORKING_DIR%%%/ezc/src, -I/usr/include, -I/usr/local/include, -DMORM_HAS_EZC_LIBRARY] + Add: [-pthread, -std=c++23, -I%%%CURRENT_DIR%%%/src, -I%%%GLOBAL_WORKING_DIR%%%/pikotools/src, -I%%%GLOBAL_WORKING_DIR%%%/ezc/src, -I/usr/include, -I/usr/local/include, -DMORM_HAS_EZC_LIBRARY] diff --git a/.templates/.qtcreator/morm.cflags b/.templates/.qtcreator/morm.cflags index 594bcef..836a2f4 100644 --- a/.templates/.qtcreator/morm.cflags +++ b/.templates/.qtcreator/morm.cflags @@ -1 +1 @@ --std=c20 +-std=c23 diff --git a/.templates/.qtcreator/morm.cxxflags b/.templates/.qtcreator/morm.cxxflags index e23b2ae..ebae601 100644 --- a/.templates/.qtcreator/morm.cxxflags +++ b/.templates/.qtcreator/morm.cxxflags @@ -1 +1 @@ --std=c++20 +-std=c++23 diff --git a/.templates/install_clangd.sh b/.templates/install_clangd.sh index 6483581..a836768 100755 --- a/.templates/install_clangd.sh +++ b/.templates/install_clangd.sh @@ -5,6 +5,14 @@ GLOBAL_WORKING_DIR=$(realpath ${CURRENT_DIR}/..) # ---------- +has_force_arg=0 + +if [ $# -eq 1 ] ; then + if [ $1 == 'force' ] ; then + has_force_arg=1 + fi +fi + # make sure the current directory is correct if [ ! -d ${CURRENT_DIR}/.templates ] ; then echo "this script should be called by make: make clangd (one level up)" @@ -17,7 +25,7 @@ GLOBAL_WORKING_DIR_FOR_SED=$(echo ${GLOBAL_WORKING_DIR} | sed 's/\//\\\//g') if [ -f "${CURRENT_DIR}/.templates/.clangd" ] ; then - if [ ! -f "${CURRENT_DIR}/.clangd" ] ; then + if [ $has_force_arg -eq 1 -o ! -f "${CURRENT_DIR}/.clangd" ] ; then cat "${CURRENT_DIR}/.templates/.clangd" | \ sed -e "s/%%%CURRENT_DIR%%%/${CURRENT_DIR_FOR_SED}/g" \ -e "s/%%%GLOBAL_WORKING_DIR%%%/${GLOBAL_WORKING_DIR_FOR_SED}/g" > \ diff --git a/.templates/install_qtcreator.sh b/.templates/install_qtcreator.sh index e44e694..18e8127 100755 --- a/.templates/install_qtcreator.sh +++ b/.templates/install_qtcreator.sh @@ -6,6 +6,14 @@ QTCREATOR_DIR=${CURRENT_DIR}/.qtcreator # ---------- +has_force_arg=0 + +if [ $# -eq 1 ] ; then + if [ $1 == 'force' ] ; then + has_force_arg=1 + fi +fi + # make sure the current directory is correct if [ ! -d ${CURRENT_DIR}/.templates ] ; then echo "this script should be called by make: make qtcreator (one level up)" @@ -48,6 +56,10 @@ GLOBAL_WORKING_DIR_FOR_SED=$(echo ${GLOBAL_WORKING_DIR} | sed 's/\//\\\//g') was_qtcreator_dir=0 +if [ $has_force_arg -eq 1 ] ; then + rm -rf "${QTCREATOR_DIR}" +fi + if [ -d "${QTCREATOR_DIR}" ] ; then was_qtcreator_dir=1 else @@ -76,7 +88,7 @@ if [ -d "${QTCREATOR_DIR}" ] ; then if [ $was_qtcreator_dir -eq 0 ] ; then echo "QTCreator files generated to ${QTCREATOR_DIR} directory" - echo "select an 'open project...' option and find a ${QTCREATOR_DIR}/*.creator file" + echo "In QTCreator select an 'open project...' option and find a ${QTCREATOR_DIR}/*.creator file" fi fi @@ -96,4 +108,3 @@ if [ -d "${QTCREATOR_DIR}" ] ; then fi - diff --git a/Makefile b/Makefile index 305be8f..3b1528a 100644 --- a/Makefile +++ b/Makefile @@ -40,9 +40,17 @@ clangd: FORCE @.templates/install_clangd.sh +forceclangd: FORCE + @.templates/install_clangd.sh force + + qtcreator: clangd @.templates/install_qtcreator.sh +forceqtcreator: forceclangd + @.templates/install_qtcreator.sh force + + FORCE: