Skip to content

Commit

Permalink
Sync1 (#1)
Browse files Browse the repository at this point in the history
* Version 6.2.0 : sortie du projet GUIToolkits.

* Version 6.2.0 du 23/06/23. Sortie du projet GUIToolkits. Les includes (XercesC.cmake) sont remplacés par des find_package/dependency (XercesC)

* New CI workflows

---------

Co-authored-by: Charles PIGNEROL <>
  • Loading branch information
lelandaisb authored Jul 17, 2023
1 parent a93be66 commit 5803530
Show file tree
Hide file tree
Showing 44 changed files with 1,066 additions and 1,324 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/cmake-ci.yml

This file was deleted.

11 changes: 11 additions & 0 deletions .github/workflows/make-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Make release

on:
push:
tags:
- '*'

jobs:
call:
name: Call check version CI
uses: LIHPC-Computational-Geometry/lihpccg-ci/.github/workflows/make-release-reusable.yml@main
9 changes: 5 additions & 4 deletions .github/workflows/spack-ci.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
name: Spack CI

on:
workflow_dispatch:
push:
branches: [ main ]
branches:
- '**'
pull_request:
branches: [ main ]
# Allows you to run this workflow manually
workflow_dispatch:

jobs:
call:
name: Call Spack reusable workflow
name: Call Spack CI
uses: LIHPC-Computational-Geometry/lihpccg-ci/.github/workflows/spack-reusable.yml@main
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@ cmake_minimum_required(VERSION 3.12)
project (Preferences CXX)

include (GNUInstallDirs)

find_package (GUIToolkitsVariables)

include (cmake/version.cmake)
include (cmake/common.cmake)
include (${GUIToolkitsVariables_CMAKE_DIR}/common.cmake)

set (Preferences_VERSION ${PREFERENCES_VERSION})

Expand Down
24 changes: 0 additions & 24 deletions cmake/XercesC.cmake

This file was deleted.

33 changes: 0 additions & 33 deletions cmake/common.cmake

This file was deleted.

36 changes: 0 additions & 36 deletions cmake/organization.cmake

This file was deleted.

6 changes: 3 additions & 3 deletions cmake/version.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
# version.cmake : version du projet
#

set (PREFERENCES_MAJOR_VERSION "5")
set (PREFERENCES_MINOR_VERSION "6")
set (PREFERENCES_RELEASE_VERSION "2")
set (PREFERENCES_MAJOR_VERSION "6")
set (PREFERENCES_MINOR_VERSION "2")
set (PREFERENCES_RELEASE_VERSION "0")
set (PREFERENCES_VERSION ${PREFERENCES_MAJOR_VERSION}.${PREFERENCES_MINOR_VERSION}.${PREFERENCES_RELEASE_VERSION})


83 changes: 0 additions & 83 deletions cmake/workarounds.cmake

This file was deleted.

6 changes: 4 additions & 2 deletions src/CfgEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
set (CURRENT_PACKAGE_NAME "CfgEditor")

find_package (GUIToolkitsVariables)

include (${CMAKE_SOURCE_DIR}/cmake/version.cmake)
include (${CMAKE_SOURCE_DIR}/cmake/common.cmake)
include (${CMAKE_SOURCE_DIR}/cmake/workarounds.cmake)
include (${GUIToolkitsVariables_CMAKE_DIR}/common.cmake)
include (${GUIToolkitsVariables_CMAKE_DIR}/workarounds.cmake)

add_executable (CfgEdit CfgEdit.cpp)

Expand Down
6 changes: 4 additions & 2 deletions src/CfgUpdater/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
set (CURRENT_PACKAGE_NAME "CfgUpdater")

find_package (GUIToolkitsVariables)

include (${CMAKE_SOURCE_DIR}/cmake/version.cmake)
include (${CMAKE_SOURCE_DIR}/cmake/common.cmake)
include (${CMAKE_SOURCE_DIR}/cmake/workarounds.cmake)
include (${GUIToolkitsVariables_CMAKE_DIR}/common.cmake)
include (${GUIToolkitsVariables_CMAKE_DIR}/workarounds.cmake)

add_executable (CfgUpdate CfgUpdate.cpp)

Expand Down
7 changes: 5 additions & 2 deletions src/PrefsCore/BoolNamedValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,25 @@ string BoolNamedValue::getStrValue ( ) const

void BoolNamedValue::setStrValue (const string& value)
{
checkForModification (true); // v 5.7.0

if (trueStr == value)
setValue (true);
else if (falseStr == value)
setValue (false);
else
{
UTF8String msg (charset);
msg << "Impossible de convertir la chaine de caractères "
<< value << " en booléen.";
msg << "Impossible de convertir la chaine de caractères " << value << " en booléen.";
throw Exception (msg);
}
} // BoolNamedValue::setStrValue


void BoolNamedValue::setValue (bool value)
{
checkForModification (true); // v 5.7.0

_value = value;
} // BoolNamedValue::setValue

Expand Down
8 changes: 5 additions & 3 deletions src/PrefsCore/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
set (CURRENT_PACKAGE_NAME "PrefsCore")
set (CURRENT_PACKAGE_MACRO_NAME "PREFERENCES")

find_package (GUIToolkitsVariables)

include (${CMAKE_SOURCE_DIR}/cmake/version.cmake)
include (${CMAKE_SOURCE_DIR}/cmake/common.cmake)
include (${CMAKE_SOURCE_DIR}/cmake/workarounds.cmake)
include (${GUIToolkitsVariables_CMAKE_DIR}/common.cmake)
include (${GUIToolkitsVariables_CMAKE_DIR}/workarounds.cmake)

find_package (TkUtil 5 REQUIRED)
find_package (TkUtil 6 REQUIRED)
file (GLOB HEADERS public/${CURRENT_PACKAGE_NAME}/*.h)
file (GLOB CPP_SOURCES *.cpp)

Expand Down
12 changes: 8 additions & 4 deletions src/PrefsCore/ColorNamedValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ ColorNamedValue& ColorNamedValue::operator = (const ColorNamedValue& color)


ColorNamedValue::ColorNamedValue (const UTF8String& name, double red, double green, double blue,
const UTF8String& comment)
: DoubleTripletNamedValue (name, 0., 0., 0., comment)
const UTF8String& comment, bool overloadable, bool safeguardable)
: DoubleTripletNamedValue (name, 0., 0., 0., comment, true, safeguardable)
{
setValue (red, green, blue);
setOverloadable (overloadable);
} // ColorNamedValue::ColorNamedValue


Expand All @@ -42,6 +43,8 @@ Element* ColorNamedValue::clone ( ) const

void ColorNamedValue::setStrValue (const string& value)
{
checkForModification (true); // v 5.7.0

double red, green, blue;
char p1, p2, c1, c2;
istringstream stream (value.c_str ( ));
Expand All @@ -64,6 +67,8 @@ void ColorNamedValue::setStrValue (const string& value)

void ColorNamedValue::setValue (double red, double green, double blue)
{
checkForModification (true); // v 5.7.0

evaluateValue (red, "rouge");
evaluateValue (green, "vert");
evaluateValue (blue, "bleu");
Expand All @@ -87,8 +92,7 @@ void ColorNamedValue::evaluateValue (double value, const string& name)
return;

UTF8String errorMsg (charset);
errorMsg << "La composante " << name << " (" << value << ") de la couleur "
<< getName ( ) << " n'est pas comprise entre 0 et 1.";
errorMsg << "La composante " << name << " (" << value << ") de la couleur " << getName ( ) << " n'est pas comprise entre 0 et 1.";
throw Exception (errorMsg);
} // ColorNamedValue::evaluateValue

Expand Down
7 changes: 5 additions & 2 deletions src/PrefsCore/DoubleNamedValue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ string DoubleNamedValue::getStrValue ( ) const

void DoubleNamedValue::setStrValue (const string& value)
{
checkForModification (true); // v 5.7.0

double val;
istringstream stream (value.c_str ( ));

Expand All @@ -50,8 +52,7 @@ void DoubleNamedValue::setStrValue (const string& value)
(false == stream.eof ( )))
{
UTF8String msg (charset);
msg << "Impossible de convertir la chaine de caractères "
<< value << " en double.";
msg << "Impossible de convertir la chaine de caractères " << value << " en double.";
throw Exception (msg);
} // if ((true == stream.fail ( )) || ...

Expand All @@ -61,6 +62,8 @@ void DoubleNamedValue::setStrValue (const string& value)

void DoubleNamedValue::setValue (double value)
{
checkForModification (true); // v 5.7.0

_value = value;
} // DoubleNamedValue::setValue

Expand Down
Loading

0 comments on commit 5803530

Please sign in to comment.