Skip to content
Snippets Groups Projects
Commit fca96882 authored by Adrien Matta's avatar Adrien Matta :skull_crossbones:
Browse files

* Adding npcompilation cli to compile nps and npl from any folder

parent 114f480b
No related branches found
No related tags found
No related merge requests found
...@@ -138,4 +138,5 @@ file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" "${CMAKE_ ...@@ -138,4 +138,5 @@ file(RELATIVE_PATH REL_INCLUDE_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" "${CMAKE_
set(CONF_INCLUDE_DIRS "./" "./") set(CONF_INCLUDE_DIRS "./" "./")
configure_file(ressources/CMake/NPLibConfig.cmake.in "${PROJECT_BINARY_DIR}/NPLibConfig.cmake" @ONLY) configure_file(ressources/CMake/NPLibConfig.cmake.in "${PROJECT_BINARY_DIR}/NPLibConfig.cmake" @ONLY)
configure_file(scripts/nptool-cleaner.sh "${CMAKE_BINARY_OUTPUT_DIRECTORY}/nptool-cleaner" @ONLY) configure_file(scripts/nptool-cleaner.sh "${CMAKE_BINARY_OUTPUT_DIRECTORY}/nptool-cleaner" @ONLY)
configure_file(scripts/nptool-compilation.sh "${CMAKE_BINARY_OUTPUT_DIRECTORY}/npcompilation" @ONLY)
configure_file(scripts/nptool-wizard.sh "${CMAKE_BINARY_OUTPUT_DIRECTORY}/nptool-wizard" @ONLY) configure_file(scripts/nptool-wizard.sh "${CMAKE_BINARY_OUTPUT_DIRECTORY}/nptool-wizard" @ONLY)
# *****************************************************************************
# * Copyright (C) 2016 this file is part of the NPTool Project *
# * *
# * For the licensing terms see $NPTOOL/Licence/NPTool_Licence *
# * For the list of contributors see $NPTOOL/Licence/Contributors *
# *****************************************************************************/
# *****************************************************************************
# * Original Author: A. Matta contact address: a.matta@surrey.ac.uk *
# * *
# * Creation Date : 23/4/2014 *
# * Last update : *
# *---------------------------------------------------------------------------*
# * Decription: This script edit the user .rootlogon.C file to load NPTool *
# * Libraries. *
# * *
# *---------------------------------------------------------------------------*
# * Comment: *
# * *
# * *
# *****************************************************************************
#! /bin/bash
# save the current folder information
FOLDER=${PWD}
# simulation
if [ "$1" = "s" ]; then
cd $NPTOOL/NPSimulation
if [ -f "build.ninja" ]; then
ninja install
elif [ -f "Makefile" ]; then
make install
else
cmake ./
make install
fi
# lib
elif [ "$1" = "l" ]; then
cd $NPTOOL/NPLib
if [ -f "build.ninja" ]; then
ninja install
elif [ -f "Makefile" ]; then
make install
else
cmake ./
make install
fi
# all
elif [ "$1" = "a" ]; then
cd $NPTOOL/NPSimulation
if [ -f "build.ninja" ]; then
ninja install
elif [ -f "Makefile" ]; then
make install
else
cmake ./
make install
fi
cd $NPTOOL/NPLib
if [ -f "build.ninja" ]; then
ninja install
elif [ -f "Makefile" ]; then
make install
else
cmake ./
make install
fi
# current folder
cd $FOLDER
echo "Folder is $PWD"
if [ -f "build.ninja" ]; then
ninja
elif [ -f "Makefile" ]; then
make
else
echo "no build in current folder"
fi
else
echo "Unexpected argument: $1"
echo "Expecting : s (simulation) , l (library) or a (all)"
fi
# return to original folder
cd $FOLDER
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment