Skip to content

Commit d711c6e

Browse files
authored
Merge pull request #27 from zurdala/dla/fix-generator
Logger in a single line and fix cmake generator
2 parents 5a912e1 + b831e3f commit d711c6e

File tree

3 files changed

+14
-12
lines changed

3 files changed

+14
-12
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ include/
22
lib/
33
build/
44
doc/latex/
5-
.DS_store
5+
.DS_store
6+
*.mod

build.sh

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
BUILD_TYPE=Debug
55
Fortran_COMPILER=gfortran
66
LIBSUFFIX="so"
7+
GENERATOR_FLAGS=""
78
if [[ "$OSTYPE" == "linux-gnu" ]]; then
89
LIBSUFFIX="so"
910
elif [[ "$OSTYPE" == "darwin"* ]]; then
@@ -14,7 +15,7 @@ elif [[ "$OSTYPE" == "MINGW"* ]]; then
1415
LIBSUFFIX="dll"
1516
elif [[ "$OSTYPE" == "msys"* ]]; then
1617
LIBSUFFIX="dll"
17-
GENERATOR="MSYS Makefiles"
18+
GENERATOR_FLAGS="-G MSYS Makefiles"
1819
fi
1920
git submodule update --init --recursive
2021
################################################################################
@@ -33,7 +34,7 @@ cd build || exit || exit
3334
echo "Updating cmake"
3435
export PFUNIT_DIR=..//pFUnit/build/installed
3536
export FC=$Fortran_COMPILER
36-
cmake -DSKIP_MPI=yes -G "$GENERATOR" ../
37+
cmake -DSKIP_MPI=yes "$GENERATOR_FLAGS" ../
3738
echo "Building pFUnit"
3839
cmake --build .
3940
cmake --install .
@@ -54,7 +55,7 @@ fi
5455
cd build || exit || exit
5556
echo "Executing cmake"
5657

57-
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_Fortran_COMPILER=$Fortran_COMPILER -DENABLE_OpenMP_SUPPORT=ON -DENABLE_POSTGRESQL_SUPPORT=ON -DENABLE_PFUNIT=ON -G "$GENERATOR" ../
58+
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_Fortran_COMPILER=$Fortran_COMPILER -DENABLE_OpenMP_SUPPORT=ON -DENABLE_POSTGRESQL_SUPPORT=ON -DENABLE_PFUNIT=ON "$GENERATOR_FLAGS" ../
5859
echo "Building libslam"
5960
cmake --build .
6061
cmake --install .

src/inout/slam_error_handling.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1396,13 +1396,13 @@ subroutine setError(code, err_type, par, errorMessage)
13961396
latestErrorType = DEBUG_MSG
13971397
if (cli_verbosity >= DEBUG_MSGS) then ! CLI output
13981398

1399-
write(*,'(a)') trim(C_DEBUG_MSG(errorLanguage))//trim(ctemp)//': '//trim(cmess)
1399+
write(*,'(a)') trim(C_DEBUG_MSG(errorLanguage))//':'//trim(ctemp)//':'//trim(cmess)
14001400

14011401
end if
14021402

14031403
if (log_verbosity >= DEBUG_MSGS .and. flag_ichlog) then ! logfile output
14041404

1405-
write(ichlog,'(a)') trim(C_DEBUG_MSG(errorLanguage))//trim(ctemp)//': '//trim(cmess)
1405+
write(ichlog,'(a)') trim(C_DEBUG_MSG(errorLanguage))//':'//trim(ctemp)//trim(cmess)//':'
14061406

14071407
end if
14081408

@@ -1411,7 +1411,7 @@ subroutine setError(code, err_type, par, errorMessage)
14111411
latestErrorType = REMARK
14121412
if (cli_verbosity >= REMARKS) then ! CLI output
14131413

1414-
write(*,'(a)') trim(C_REMARK(errorLanguage))//trim(ctemp)//':'
1414+
write(*,'(a)', advance = "no") trim(C_REMARK(errorLanguage))//':'//trim(ctemp)//':'
14151415
! Prepare the message based on the optional parameter or the predefined message
14161416
if(present(par)) then
14171417
do i = 1, SIZE_ERROR_PARAMETER
@@ -1429,7 +1429,7 @@ subroutine setError(code, err_type, par, errorMessage)
14291429

14301430
if (log_verbosity >= REMARKS .and. flag_ichlog) then ! logfile output
14311431

1432-
write(ichlog,'(a)') trim(C_REMARK(errorLanguage))//trim(ctemp)//':'
1432+
write(ichlog,'(a)', advance = "no") trim(C_REMARK(errorLanguage))//':'//trim(ctemp)//':'
14331433
! Prepare the message based on the optional parameter or the predefined message
14341434
if(present(par)) then
14351435
do i = 1, SIZE_ERROR_PARAMETER
@@ -1450,7 +1450,7 @@ subroutine setError(code, err_type, par, errorMessage)
14501450
latestErrorType = WARNING
14511451
if (cli_verbosity >= WARNINGS) then ! CLI output
14521452

1453-
write(*,'(a)') trim(C_WARNING(errorLanguage))//trim(ctemp)//':'
1453+
write(*,'(a)', advance = "no") trim(C_WARNING(errorLanguage))//':'//trim(ctemp)//':'
14541454
! Prepare the message based on the optional parameter or the predefined message
14551455
if(present(par)) then
14561456
do i = 1, SIZE_ERROR_PARAMETER
@@ -1468,7 +1468,7 @@ subroutine setError(code, err_type, par, errorMessage)
14681468

14691469
if (log_verbosity >= WARNINGS .and. flag_ichlog) then ! logfile output
14701470

1471-
write(ichlog,'(a)') trim(C_WARNING(errorLanguage))//trim(ctemp)//':'
1471+
write(ichlog,'(a)', advance = "no") trim(C_WARNING(errorLanguage))//':'//trim(ctemp)//':'
14721472
! Prepare the message based on the optional parameter or the predefined message
14731473
if(present(par)) then
14741474
do i = 1, SIZE_ERROR_PARAMETER
@@ -1489,15 +1489,15 @@ subroutine setError(code, err_type, par, errorMessage)
14891489
latestErrorType = FATAL
14901490
if (cli_verbosity >= ERRORS) then ! CLI output
14911491

1492-
write(*,'(a)') trim(C_FATAL(errorLanguage))//trim(ctemp)//':'
1492+
write(*,'(a)', advance = "no") trim(C_FATAL(errorLanguage))//':'//trim(ctemp)//':'
14931493
write(*,'(a)') ' '//trim(cmess)
14941494
if(errorAction == ERR_ABORT) write(*,'(a)') ' '//C_TERMINATED(errorLanguage)
14951495

14961496
end if
14971497

14981498
if (log_verbosity >= ERRORS .and. flag_ichlog) then ! logfile output
14991499

1500-
write(ichlog,'(a)') trim(C_FATAL(errorLanguage))//trim(ctemp)//':'
1500+
write(ichlog,'(a)', advance = "no") trim(C_FATAL(errorLanguage))//':'//trim(ctemp)//':'
15011501
write(ichlog,'(a)') ' '//trim(cmess)
15021502
if(errorAction == ERR_ABORT) write(ichlog,'(a)') ' '//C_TERMINATED(errorLanguage)
15031503

0 commit comments

Comments
 (0)