##// END OF EJS Templates
Closed
Pull request !130 Created on Tue, 23 May 2017 11:10:51, by
- Mise en commentaire de omp
- Initialisation de la configuration Linux
Pull request versions not available.
ver Time Author Commit Description
latest r15:d6d94ce44ebc
Mise en commentaire de omp
latest
mperrinel
r14:5bce99742c6f
Initialisation de la configuration Linux
@@ -0,0 +1,1
1 TODO
@@ -0,0 +1,18
1 #
2 # compiler_gnu.cmake : specific configuration for GNU compilers
3 #
4
5 # Set the flag -Wall to activate all warnings
6 IF (${CMAKE_BUILD_TYPE} STREQUAL Debug)
7 SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -std=c++14")
8 SET(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -Wall")
9
10 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
11 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_DEBUG}")
12 ELSE()
13 SET(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall -O2 -std=c++14")
14 SET(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -Wall -O2")
15
16 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
17 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_RELEASE}")
18 ENDIF()
@@ -0,0 +1,104
1 /*------------------------------------------------------------------------------
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 --
5 -- This program is free software; you can redistribute it and/or modify
6 -- it under the terms of the GNU General Public License as published by
7 -- the Free Software Foundation; either version 2 of the License, or
8 -- (at your option) any later version.
9 --
10 -- This program is distributed in the hope that it will be useful,
11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 -- GNU General Public License for more details.
14 --
15 -- You should have received a copy of the GNU General Public License
16 -- along with this program; if not, write to the Free Software
17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 -------------------------------------------------------------------------------*/
19 /*-- Author : Alexis Jeandet
20 -- Mail : alexis.jeandet@member.fsf.org
21 ----------------------------------------------------------------------------*/
22 #include "mainwindow.h"
23 #include "ui_mainwindow.h"
24 #include <QAction>
25 #include <QDate>
26 #include <QDateTime>
27 #include <QDir>
28 #include <QFileDialog>
29 //#include <omp.h>
30 //#include <network/filedownloader.h>
31 //#include <qlopdatabase.h>
32 //#include <qlopsettings.h>
33 //#include <qlopgui.h>
34 //#include <spacedata.h>
35 //#include "qlopcore.h"
36 //#include "qlopcodecmanager.h"
37 //#include "cdfcodec.h"
38 //#include "amdatxtcodec.h"
39 //#include <qlopplotmanager.h>
40
41
42 MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent), ui(new Ui::MainWindow)
43 {
44 ui->setupUi(this);
45 /* QLopGUI::registerMenuBar(menuBar());
46 this->setWindowIcon(QIcon(":/sciqlopLOGO.svg"));
47 this->m_progressWidget = new QWidget();
48 this->m_progressLayout = new QVBoxLayout(this->m_progressWidget);
49 this->m_progressWidget->setLayout(this->m_progressLayout);
50 this->m_progressWidget->setWindowModality(Qt::WindowModal);
51 m_progressThreadIds = (int*) malloc(OMP_THREADS*sizeof(int));
52 for(int i=0;i<OMP_THREADS;i++)
53 {
54 this->m_progress.append(new QProgressBar(this->m_progressWidget));
55 this->m_progress.last()->setMinimum(0);
56 this->m_progress.last()->setMaximum(100);
57 this->m_progressLayout->addWidget(this->m_progress.last());
58 this->m_progressWidget->hide();
59 this->m_progressThreadIds[i] = -1;
60 }
61 this->m_progressWidget->setWindowTitle("Loading File");
62 const QList<QLopService*>ServicesToLoad=QList<QLopService*>()
63 << QLopCore::self()
64 << QLopPlotManager::self()
65 << QLopCodecManager::self()
66 << FileDownloader::self()
67 << QLopDataBase::self()
68 << SpaceData::self();
69
70 CDFCodec::registerToManager();
71 AMDATXTCodec::registerToManager();
72
73
74 for(int i=0;i<ServicesToLoad.count();i++)
75 {
76 qDebug()<<ServicesToLoad.at(i)->serviceName();
77 ServicesToLoad.at(i)->initialize(); //must be called before getGUI
78 QDockWidget* wdgt=ServicesToLoad.at(i)->getGUI();
79 if(wdgt)
80 {
81 wdgt->setAllowedAreas(Qt::AllDockWidgetAreas);
82 this->addDockWidget(Qt::TopDockWidgetArea,wdgt);
83 }
84 PythonQt::self()->getMainModule().addObject(ServicesToLoad.at(i)->serviceName(),(QObject*)ServicesToLoad.at(i));
85 }*/
86 }
87
88 MainWindow::~MainWindow()
89 {
90 delete ui;
91 }
92
93
94 void MainWindow::changeEvent(QEvent *e)
95 {
96 QMainWindow::changeEvent(e);
97 switch (e->type()) {
98 case QEvent::LanguageChange:
99 ui->retranslateUi(this);
100 break;
101 default:
102 break;
103 }
104 }
@@ -0,0 +1,56
1 <?xml version="1.0" encoding="UTF-8"?>
2 <ui version="4.0">
3 <class>MainWindow</class>
4 <widget class="QMainWindow" name="MainWindow">
5 <property name="geometry">
6 <rect>
7 <x>0</x>
8 <y>0</y>
9 <width>800</width>
10 <height>600</height>
11 </rect>
12 </property>
13 <property name="windowTitle">
14 <string>QLop</string>
15 </property>
16 <property name="dockNestingEnabled">
17 <bool>true</bool>
18 </property>
19 <widget class="QWidget" name="centralWidget">
20 <property name="enabled">
21 <bool>true</bool>
22 </property>
23 <property name="sizePolicy">
24 <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
25 <horstretch>0</horstretch>
26 <verstretch>0</verstretch>
27 </sizepolicy>
28 </property>
29 <property name="maximumSize">
30 <size>
31 <width>16777215</width>
32 <height>16777215</height>
33 </size>
34 </property>
35 </widget>
36 <widget class="QMenuBar" name="menuBar">
37 <property name="geometry">
38 <rect>
39 <x>0</x>
40 <y>0</y>
41 <width>800</width>
42 <height>45</height>
43 </rect>
44 </property>
45 </widget>
46 <widget class="QStatusBar" name="statusBar"/>
47 <action name="actionIndex_Viewer">
48 <property name="text">
49 <string>Index Viewer</string>
50 </property>
51 </action>
52 </widget>
53 <layoutdefault spacing="6" margin="11"/>
54 <resources/>
55 <connections/>
56 </ui>
@@ -1,5 +1,3
1 1 build/
2 2 CMakeLists.txt.user
3 3 /.project
4 core/src/Version.cpp
5 core/include/Version.h
@@ -1,31 +1,1
1 ![](gui/resources/icones/sciqlop2PNG_1024.png){:.some-css-class style="width: 20%"}
2
3
4 # Overview
5
6 ** SciQLOP ** (**SCI**entific **Q**t application for **L**earning from **O**bservations of **P**lasmas) aims to be an ergonomic
7 and powerful tool enabling visualization and analysis of in-situ space plasma data. This goal rises some
8 challenges either technical and in the conception and the design.
9 The time resolution allowed by nowadays measurements imply the ability to plot millions of points just for
10 one sensor with no compromise on interactivity. Plots may stay responsive even with millions of points.
11 Being able to scroll, zoom, move and export the plots with the mouse are the minimal interactions expected by the user.
12 SciQLOP may also abstract the manipulation of physic data while providing contextual features such as
13 coordinate transform, physical quantity extraction from data.
14 That said increasing graphical features usually lead to slower software and more complex GUI. Keeping
15 SciQLOP lightweight and intuitive is one of the priorities to make it usable and competitive.
16
17
18 ## How to build
19
20 ```
21 git clone https://hephaistos.lpp.polytechnique.fr/rhodecode/HG_REPOSITORIES/LPP/SciQLOP_Repos/SciQLop
22 cd SciQLop
23 mkdir build && cd build
24 cmake ../
25 make
26
27 ```
28
29 ## How to contribute
30
31 Contact sciqlop@lpp.polytechnique.fr
1 TODO No newline at end of file
@@ -1,18 +1,17
1 1 @echo off
2 2 echo Setting up environment for Qt usage...
3 3
4 4 set QT_QMAKE_PATH=C:\Qt\5.8\mingw53_32\bin
5 5 set QT_MINGW_PATH=C:\Qt\Tools\mingw530_32\bin
6 set NSIS_PATH=C:\Appli\NSIS
7 6 set LLVM_PATH=C:\Appli\LLVM\bin
8 7 set CMAKE_PATH=C:\Appli\CMake\bin
9 8 set NINJA_PATH=C:\Appli\Ninja
10 9
11 10 set PERL_SITE_PATH=C:\Perl64\site\bin
12 11 set PERL_PATH=C:\Perl64\bin
13 12 set PYTHON_PATH=C:\Appli\Python\Python36-32
14 13 set SCAN_BUILD_PATH=C:\Dev\CNRS-DEV\cfe\tools\scan-build\bin
15 14
16 15
17 set PATH=%QT_QMAKE_PATH%;%QT_MINGW_PATH%;%PERL_SITE_PATH%;%PERL_PATH%;%PYTHON_PATH%;%NSIS_PATH%;%SCAN_BUILD_PATH%;%LLVM_PATH%;%CMAKE_PATH%;%NINJA_PATH%;%PATH%
16 set PATH=%QT_QMAKE_PATH%;%QT_MINGW_PATH%;%PERL_SITE_PATH%;%PERL_PATH%;%PYTHON_PATH%;%SCAN_BUILD_PATH%;%LLVM_PATH%;%CMAKE_PATH%;%NINJA_PATH%;%PATH%
18 17 cd /D C:\Dev\CNRS-DEV\SciQlopInit
@@ -1,18 +1,20
1 1
2 QT_PATH=".../Qt/5.8/gcc_64/lib/cmake/"
3
2 4 export CC=/usr/libexec/ccc-analyzer
3 5 export CXX=/usr/libexec/c++-analyzer
4 6 export CCC_CC=clang
5 7 export CCC_CXX=clang++
6 8 export LD=clang++
7 9 export CCC_ANALYZER_VERBOSE=1
8 10
9 11 LD_LIBRARY_PATH=/usr/local/lib64
10 12 export LD_LIBRARY_PATH
11 13
12 14 rm -rf build_clang-analyzer
13 15 mkdir build_clang-analyzer
14 16 cd build_clang-analyzer
15 17
16 scan-build cmake -DCMAKE_CXX_COMPILER=clazy -DENABLE_ANALYSIS=false -DENABLE_CPPCHECK=false -DENABLE_FORMATTING=false -DENABLE_CHECKSTYLE=false -BUILD_DOCUMENTATION=false -BUILD_TESTS=false -DCMAKE_BUILD_TYPE=Debug ../../SCIQLOP-Initialisation/
18 scan-build cmake -DCMAKE_PREFIX_PATH=$QT_PATH -DCMAKE_CXX_COMPILER=clazy -DENABLE_ANALYSIS=false -DENABLE_CPPCHECK=false -DENABLE_FORMATTING=false -DENABLE_CHECKSTYLE=false -BUILD_DOCUMENTATION=false -BUILD_TESTS=false -DCMAKE_BUILD_TYPE=Debug ../../SCIQLOP-Initialisation/
17 19
18 20 scan-build -o clang-analyzer-output make -j2
@@ -1,14 +1,14
1 1 #
2 2 # compiler.cmake : configure the compilation flags
3 3 #
4 4
5 message("Compiler id: ${CMAKE_CXX_COMPILER_ID}")
5 message("Compiler id: ${CMAKE_CXX_COMPILER_ID}")
6 6 IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
7 MESSAGE("Compiler supported")
7 INCLUDE("cmake/compiler/compiler_gnu.cmake")
8 8 ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
9 MESSAGE("Compiler supported")
9 INCLUDE("cmake/compiler/compiler_gnu.cmake")
10 10 ELSEIF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
11 INCLUDE("cmake/compiler/compiler_msvc.cmake")
11 INCLUDE("cmake/compiler/compiler_msvc.cmake")
12 12 ELSE()
13 13 MESSAGE(FATAL_ERROR "Compiler not supported")
14 14 ENDIF()
@@ -1,39 +1,39
1 1 #
2 2 # sciqlop.cmake
3 3 #
4 4
5 5 #
6 6 # Update the CMAKE_MODULE_PATH to use custom FindXXX files
7 7 #
8 8 LIST( APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/CMakeModules/")
9 9
10 10 # Include the sciqlop version file
11 11 INCLUDE("cmake/sciqlop_version.cmake")
12 12
13 13 # Include the sciqlop cmake macros
14 14 INCLUDE("cmake/sciqlop_macros.cmake")
15 15
16 16 #
17 17 # Define the project parameters
18 18 #
19 19 INCLUDE("cmake/sciqlop_params.cmake")
20 20
21 21 #
22 22 # Configure the compiler
23 23 #
24 #INCLUDE("cmake/compiler/compiler.cmake")
24 INCLUDE("cmake/compiler/compiler.cmake")
25 25
26 26 #
27 27 # Find all necessary dependencies
28 28 #
29 29 INCLUDE("cmake/find_libs.cmake")
30 30
31 31 #
32 32 # Compile all applications
33 33 #
34 34 INCLUDE("cmake/sciqlop_applications.cmake")
35 35
36 36 #
37 37 # Package creation using CPack
38 38 #
39 39 INCLUDE("cmake/sciqlop_package.cmake")
@@ -1,65 +1,39
1
2 if(BUILD_TESTS)
3 INCLUDE ("cmake/sciqlop_code_coverage.cmake")
4 APPEND_COVERAGE_COMPILER_FLAGS()
5 endif(BUILD_TESTS)
6
7 1 #
8 # Compile the diffents modules
2 # Sciqlop_modules.cmake
9 3 #
10 set(sciqlop-plugin_DIR "${CMAKE_SOURCE_DIR}/plugin/cmake")
11 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${sciqlop-plugin_DIR}")
12 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/plugin")
13
14 set(sciqlop-core_DIR "${CMAKE_SOURCE_DIR}/core/cmake")
15 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${sciqlop-core_DIR}")
16 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/core")
17
18 set(sciqlop-gui_DIR "${CMAKE_SOURCE_DIR}/gui/cmake")
19 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${sciqlop-gui_DIR}")
20 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/gui")
21
22 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/app")
23
24 OPTION (BUILD_PLUGINS "Build the plugins" OFF)
25 IF(BUILD_PLUGINS)
26 set(sciqlop-mockplugin_DIR "${CMAKE_SOURCE_DIR}/plugins/mockplugin/cmake")
27 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${sciqlop-mockplugin_DIR}")
28 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/plugins/mockplugin")
4 # Set ouptut directories
5 #
6 SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist/${CMAKE_BUILD_TYPE})
7 SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist/${CMAKE_BUILD_TYPE})
29 8
30 set(sciqlop-amda_DIR "${CMAKE_SOURCE_DIR}/plugins/amda/cmake")
31 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${sciqlop-amda_DIR}")
32 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/plugins/amda")
33 9
34 # Temporary target to copy to plugins dir
35 find_package(sciqlop-mockplugin)
36 find_package(sciqlop-amda)
37 ADD_CUSTOM_TARGET(plugins
38 COMMAND ${CMAKE_COMMAND} -E copy ${SCIQLOP-MOCKPLUGIN_LIBRARIES} "${LIBRARY_OUTPUT_PATH}/plugins/${SCIQLOP-MOCKPLUGIN_LIBRARIES_NAME}"
39 COMMAND ${CMAKE_COMMAND} -E copy ${SCIQLOP-AMDA_LIBRARIES} "${LIBRARY_OUTPUT_PATH}/plugins/${SCIQLOP-AMDA_LIBRARIES_NAME}"
40 )
41 ENDIF(BUILD_PLUGINS)
10 #
11 # Compile the core
12 #
13 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/sqpcore")
42 14
43 # LOGGER
44 set(QTLOGGING_INI_FILE "${CMAKE_SOURCE_DIR}/config/QtProject/qtlogging.ini")
45 FILE(COPY ${QTLOGGING_INI_FILE} DESTINATION ${CONFIG_OUTPUT_PATH})
15 #
16 # Compile the gui
17 #
18 #ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/sqpgui")
46 19
20 #
21 # Compile the app
22 #
23 ADD_SUBDIRECTORY("${CMAKE_SOURCE_DIR}/sqpapp")
47 24
48 25 #
49 26 # Code formatting
50 27 #
51 # Vera++ exclusion files
52 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/formatting/vera-exclusions/exclusions.txt)
53 #SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
54 28 INCLUDE ("cmake/sciqlop_formatting.cmake")
55 29
56 30 #
57 31 # Documentation generation
58 32 #
59 33 INCLUDE ("cmake/sciqlop_doxygen.cmake")
60 34
61 35 #
62 36 # Source code analysis
63 37 #
64 38 INCLUDE ("cmake/sciqlop_code_analysis.cmake")
65 39 INCLUDE ("cmake/sciqlop_code_cppcheck.cmake")
@@ -1,59 +0,0
1 #
2 # Generate the source package of SciqLop.
3 #
4
5 install(DIRECTORY
6 ${EXECUTABLE_OUTPUT_PATH}
7 DESTINATION "."
8 USE_SOURCE_PERMISSIONS
9 COMPONENT CORE
10 PATTERN "*.a" EXCLUDE
11 )
12
13 set(EXECUTABLEDOTEXTENSION)
14 if(WIN32)
15 set(EXECUTABLEDOTEXTENSION ".exe")
16 endif(WIN32)
17 set (SCIQLOP_EXE_LOCATION ${EXECUTABLE_OUTPUT_PATH}/${EXECUTABLE_NAME}${EXECUTABLEDOTEXTENSION})
18
19 if(WIN32)
20 include ("cmake/sciqlop_package_qt.cmake")
21 endif(WIN32)
22
23
24 SET (CPACK_PACKAGE_VENDOR "CNRS")
25 SET (CPACK_PACKAGE_VERSION_MAJOR "${SCIQLOP_VERSION_MAJOR}")
26 SET (CPACK_PACKAGE_VERSION_MINOR "${SCIQLOP_VERSION_MINOR}")
27 SET (CPACK_PACKAGE_VERSION_PATCH "${SCIQLOP_VERSION_PATCH}${SCIQLOP_VERSION_SUFFIX}")
28 SET (CPACK_PACKAGE_VERSION "${SCIQLOP_VERSION}")
29 SET (CPACK_RESOURCE_FILE_LICENSE ${CMAKE_SOURCE_DIR}/COPYING)
30 SET (CPACK_PACKAGE_CONTACT "nicolas.aunai@lpp.polytechnique.fr")
31 SET(CPACK_PACKAGE_DESCRIPTION_FILE ${CMAKE_CURRENT_SOURCE_DIR}/README.md)
32 # SET(CPACK_RESOURCE_FILE_WELCOME ${CMAKE_CURRENT_SOURCE_DIR}/WARN.txt)
33 SET(CPACK_RESOURCE_FILE_LICENSE ${CMAKE_CURRENT_SOURCE_DIR}/COPYING)
34 # SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${PROJECT_NAME}-${PROJECT_VERSION})
35 SET(FULLBUILD ON)
36
37 SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
38 SET(CPACK_GENERATOR "NSIS")
39 SET(CPACK_MONOLITHIC_INSTALL 1)
40 #SET(CPACK_COMPONENTS_ALL sciqlop qt)
41 SET(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-Setup")
42 SET(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_NAME})
43
44 set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME})
45
46 if (WIN32)
47 SET(CPACK_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR})
48 SET(CPACK_NSIS_ENABLE_UNINSTALL_BEFORE_INSTALL ON)
49 SET(CPACK_NSIS_COMPONENT_INSTALL ON)
50 SET(CPACK_SYSTEM_NAME "MinGW32")
51 SET(CPACK_PACKAGING_INSTALL_PREFIX "")
52 #SET(CPACK_GENERATOR "NSIS")
53 SET(CPACK_NSIS_DISPLAY_NAME ${PROJECT_NAME})
54 SET(CPACK_NSIS_MUI_FINISHPAGE_RUN ${SCIQLOP_EXECUTABLE_NAME})
55 SET(CPACK_NSIS_MUI_ICON ${SCIQLOP_EXECUTABLE_ICON_LOCATION})
56 SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\${SCIQLOP_EXECUTABLE_NAME}.exe")
57 endif (WIN32)
58
59 INCLUDE(CPack)
@@ -1,128 +1,90
1 1 #
2 2 # sciqlop_params : Define compilation parameters
3 3 #
4 4 # Debug or release
5 5 #
6 6 # As the "NMake Makefiles" forces by default the CMAKE_BUILD_TYPE variable to Debug, SCIQLOP_BUILD_TYPE variable is used to be sure that the debug mode is a user choice
7 #SET(SCIQLOP_BUILD_TYPE "Release" CACHE STRING "Choose to compile in Debug or Release mode")
7 SET(SCIQLOP_BUILD_TYPE "Release" CACHE STRING "Choose to compile in Debug or Release mode")
8 8
9 IF(CMAKE_BUILD_TYPE MATCHES "Debug")
9 IF(SCIQLOP_BUILD_TYPE MATCHES "Debug")
10 MESSAGE (STATUS "Build in Debug")
11 SET (CMAKE_BUILD_TYPE "Debug")
10 12 SET (DEBUG_SUFFIX "d")
11 13 ELSE()
12 14 MESSAGE (STATUS "Build in Release")
15 SET (CMAKE_BUILD_TYPE "Release")
16 SET (SCIQLOP_BUILD_TYPE "Release")
13 17 SET (DEBUG_SUFFIX "")
14 18 ENDIF()
15 19
16 20 #
17 21 # Need to compile tests?
18 22 #
19 23 OPTION (BUILD_TESTS "Build the tests" OFF)
20 24 ENABLE_TESTING(${BUILD_TESTS})
21 25
22 26 #
23 27 # Path to the folder for sciqlop's extern libraries.
24 28 #
25 29 # When looking for an external library in sciqlop, we look to the following
26 30 # folders:
27 31 # - The specific folder for the library (generally of the form <LIBRARY>_ROOT_DIR
28 32 # - The global Sciqlop extern folder
29 33 # - The system folders.
30 34 #
31 35 # If a dependency is found in the global extern folder or a specific folder for
32 36 # the library, then it is installed with the sciqlop libraries. If it is found
33 37 # in the system folders, it is not. This behavior can be overriden with the
34 38 # <LIBRARY>_COPY_SHARED_LIBRARIES flag.
35 39 #
36 40 set(SCIQLOP_EXTERN_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/extern"
37 41 CACHE PATH "Path to the folder for sciqlop's extern libraries")
38 42 option(SCIQLOP_FORCE_UPDATE_EXT_ROOT_DIR "Force the <LIBRARY>_ROOT_DIR to be updated to the global sciqlop extern folder"
39 43 OFF)
40 44
41 45 if (SCIQLOP_FORCE_UPDATE_EXT_ROOT_DIR)
42 46 set(libRootDirForceValue FORCE)
43 47 else()
44 48 set(libRootDirForceValue)
45 49 endif()
46 50
47 #
48 # Sciqlop_modules.cmake
49 #
50 # Set ouptut directories
51 #
52 IF (UNIX)
53 # 32 or 64 bits compiler
54 IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
55 SET(defaultLib "lib64/sciqlop")
56 ELSE()
57 SET(defaultLib "lib/sciqlop")
58 ENDIF()
59 SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
60 SET (CONFIG_OUTPUT_PATH $ENV{HOME}/.config/QtProject)
61 SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/${defaultLib})
62 ELSEIF(WIN32)
63 SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
64 SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
65 SET (CONFIG_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist/app/QtProject)
66 ELSE()
67 SET (EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
68 SET (CONFIG_OUTPUT_PATH $ENV{HOME}/.config/QtProject)
69 SET (LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/dist)
70 ENDIF()
71 51
72 52
73 53 #
74 54 # Static or shared libraries
75 55 #
76 56 OPTION (BUILD_SHARED_LIBS "Build the shared libraries" ON)
77 57
78 58 # Generate position independant code (-fPIC)
79 59 SET(CMAKE_POSITION_INDEPENDENT_CODE TRUE)
80 60
81
82
83 # Configuration for make install
84
85 set(PROJECT_PLUGIN_PREFIX "SciQlop")
86
61 #
62 # Configure installation directories
63 #
87 64 IF (UNIX)
88 SET(CMAKE_INSTALL_PREFIX "/usr/local/${PROJECT_PLUGIN_PREFIX}")
89 65 SET(defaultBin "bin")
90 66 SET(defaultInc "include/sciqlop")
91 67
92 68 # 32 or 64 bits compiler
93 69 IF( CMAKE_SIZEOF_VOID_P EQUAL 8 )
94 SET(defaultLib "lib64")
95 SET(defaultPluginsLib "lib64/${PROJECT_PLUGIN_PREFIX}")
70 SET(defaultLib "lib64/sciqlop")
96 71 ELSE()
97 SET(defaultLib "lib/")
98 SET(defaultPluginsLib "lib/${PROJECT_PLUGIN_PREFIX}")
72 SET(defaultLib "lib/sciqlop")
99 73 ENDIF()
100 74
101 SET(defaultDoc "share/docs/${PROJECT_PLUGIN_PREFIX}")
75 SET(defaultDoc "share/docs/sciqlop")
102 76 ELSE()
103 77 SET(defaultBin "bin")
104 SET(defaultInc "include/${PROJECT_PLUGIN_PREFIX}")
105 SET(defaultLib "lib")
106 SET(defaultPluginsLib "lib/${PROJECT_PLUGIN_PREFIX}")
107 SET(defaultDoc "docs/${PROJECT_PLUGIN_PREFIX}")
78 SET(defaultInc "include/sciqlop")
79 SET(defaultLib "lib/sciqlop")
80 SET(defaultDoc "docs/sciqlop")
108 81 ENDIF()
109 82
110 83 SET(INSTALL_BINARY_DIR "${defaultBin}" CACHE STRING
111 84 "Installation directory for binaries")
112 85 SET(INSTALL_LIBRARY_DIR "${defaultLib}" CACHE STRING
113 86 "Installation directory for libraries")
114 SET(INSTALL_PLUGINS_LIBRARY_DIR "${defaultPluginsLib}" CACHE STRING
115 "Installation directory for libraries")
116 87 SET(INSTALL_INCLUDE_DIR "${defaultInc}" CACHE STRING
117 88 "Installation directory for headers")
118 89 SET(INSTALL_DOCUMENTATION_DIR "${defaultDoc}" CACHE STRING
119 90 "Installation directory for documentations")
120
121
122 # Set the rpath when installing
123 SET(CMAKE_SKIP_BUILD_RPATH FALSE)
124 SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
125 SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
126 SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
127
128 message("Install RPATH: ${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBRARY_DIR}")
@@ -1,138 +1,128
1 1 #
2 2 # use_clangformat.cmake
3 3 #
4 4 # The following functions are defined in this document:
5 5 #
6 6
7 7 # ADD_CLANGFORMAT_TARGETS(<globExpression> ...
8 8 # [ADD_TO_ALL]
9 9 # [NAME <name>]
10 10 # [NAME_ALL <nameall>]
11 11 # [STYLE style]
12 12 # [RECURSE])
13 13 #
14 14 # Two custom targets will be created:
15 15 # * format_reports is run as part of the build, and is not rerun unless one of
16 16 # the file formatted is modified (only created if ADD_TO_ALL is provided);
17 17 # * format must be explicitely called (make format) and is rerun even if the
18 18 # files to format have not been modified. To achieve this behavior, the commands
19 19 # used in this target pretend to produce a file without actually producing it.
20 20 # Because the output file is not there after the run, the command will be rerun
21 21 # again at the next target build.
22 22 #
23 23 # If ADD_TO_ALL is provided then a target will be added to the default build
24 24 # targets so that each time a source file is compiled, it is formatted with
25 25 # clang-format.
26 26 #
27 27 # NAME and NAME_ALL customize the name of the targets (format and format_reports
28 28 # by default respectively).
29 29 #
30 30 # STYLE sets the style used by clang-format (default to "file").
31 31 #
32 32 # RECURSE selects if the glob expressions should be applied recursively or not.
33 33 FUNCTION(ADD_CLANGFORMAT_TARGETS)
34 34 # Default values
35 35 SET(target "format")
36 36 SET(target_all "format_all")
37 37 SET(style "file")
38 38 SET(recurse OFF)
39 39 SET(addToAll OFF)
40 40 SET(globs)
41 41
42 42 # Parse the options
43 43 MATH(EXPR lastIdx "${ARGC} - 1")
44 44 SET(i 0)
45 45 WHILE(i LESS ${ARGC})
46 46 SET(arg "${ARGV${i}}")
47 47 IF("${arg}" STREQUAL "ADD_TO_ALL")
48 48 SET(addToAll ON)
49 49 ELSEIF("${arg}" STREQUAL "NAME")
50 50 clangformat_incr(i)
51 51 SET(target "${ARGV${i}}")
52 52 ELSEIF("${arg}" STREQUAL "NAME_ALL")
53 53 clangformat_incr(i)
54 54 SET(target_all "${ARGV${i}}")
55 55 ELSEIF("${arg}" STREQUAL "STYLE")
56 56 clangformat_incr(i)
57 57 SET(style "${ARGV${i}}")
58 58 ELSEIF("${arg}" STREQUAL "RECURSE")
59 59 SET(recurse ON)
60 60 ELSE()
61 61 LIST(APPEND globs ${arg})
62 62 ENDIF()
63 63 clangformat_incr(i)
64 64 ENDWHILE()
65 65
66
67 66 # Retrieve source files to format
68 67 IF(recurse)
69 68 FILE(GLOB_RECURSE srcs ${globs})
70 69 ELSE()
71 70 FILE(GLOB srcs ${globs})
72 71 ENDIF()
73 72
74 73 IF(NOT CLANGFORMAT_EXECUTABLE)
75 74 MESSAGE(FATAL_ERROR "Unable to find clang-format executable")
76 75 ENDIF()
77 76
78 77 # Format each source file with clang-format
79 78 SET(touchedFiles)
80 79 SET(fakedTouchedFiles)
81 80 SET(reportNb 0)
82 81 # Create the directory where the touched files will be saved
83 82 SET(formatDirectory "${CMAKE_CURRENT_BINARY_DIR}/format")
84 83 FILE(MAKE_DIRECTORY ${formatDirectory})
85 # STRING(REPLACE "*.ui" "" srcs ${srcs})
86 FOREACH(item ${globs})
87 STRING(REGEX MATCH ".*\.ui$" item ${item})
88 IF(item)
89 LIST(APPEND UIS ${item})
90 ENDIF(item)
91 ENDFOREACH(item ${globs})
92
93 LIST(REMOVE_ITEM srcs ${UIS})
94 84 FOREACH (s ${srcs})
95 85 SET(touchedFile ${formatDirectory}/format_touchedfile_${reportNb})
96 86 IF(addToAll)
97 87 ADD_CUSTOM_COMMAND(
98 88 OUTPUT ${touchedFile}
99 89 COMMAND ${CLANGFORMAT_EXECUTABLE}
100 90 -style="${style}"
101 91 -i
102 92 ${s}
103 93 # Create a file so that this command is executed only if the source
104 94 # file is modified
105 95 COMMAND ${CMAKE_COMMAND} -E touch ${touchedFile}
106 96 DEPENDS ${s}
107 97 COMMENT "Formatting code with clang-format of ${s}"
108 98 )
109 99 ENDIF()
110 100
111 101 SET(fakedTouchedFile ${formatDirectory}/format_fakedtouchedfile_${reportNb})
112 102 ADD_CUSTOM_COMMAND(
113 103 OUTPUT ${fakedTouchedFile}
114 104 COMMAND ${CLANGFORMAT_EXECUTABLE}
115 105 -style="${style}"
116 106 -i
117 107 ${s}
118 108 DEPENDS ${s}
119 109 COMMENT "Formatting code with clang-format of ${s}"
120 110 )
121 111
122 112 LIST(APPEND touchedFiles ${touchedFile})
123 113 LIST(APPEND fakedTouchedFiles ${fakedTouchedFile})
124 114 clangformat_incr(reportNb)
125 115 ENDFOREACH()
126 116
127 117 # Create the custom targets that will trigger the custom command created
128 118 # previously
129 119 IF(addToAll)
130 120 ADD_CUSTOM_TARGET(${target_all} ALL DEPENDS ${touchedFiles})
131 121 ENDIF()
132 122 ADD_CUSTOM_TARGET(${target} DEPENDS ${fakedTouchedFiles})
133 123
134 124 ENDFUNCTION(ADD_CLANGFORMAT_TARGETS)
135 125
136 126 macro(clangformat_incr var_name)
137 127 math(EXPR ${var_name} "${${var_name}} + 1")
138 128 endmacro()
@@ -1,157 +1,141
1 1
2 2 ## sciqlop - CMakeLists.txt
3 3 SET(EXECUTABLE_NAME "sciqlop")
4 SCIQLOP_SET_TO_PARENT_SCOPE(EXECUTABLE_NAME)
5 4 SET(SOURCES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/)
6 SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
7 SET(UI_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/ui)
5 SET(INCLUDE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/include)
6 SET(UI_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/src)
8 7 SET(RES_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/resources)
9 8
10 # Include gui directory
11 include_directories("${INCLUDES_DIR}")
12
13 9 #
14 10 # Find Qt modules
15 11 #
16 12 SCIQLOP_FIND_QT(Core Widgets)
17
18 13
19 14 #
20 15 # Find dependent libraries
21 16 # ========================
22 find_package(sciqlop-gui)
23
24 SET(LIBRARIES ${SCIQLOP-GUI_LIBRARIES})
17 SET(LIBRARIES)
18 SET(EXTERN_LIBRARIES)
25 19 SET(EXTERN_SHARED_LIBRARIES)
26 20
27 INCLUDE_DIRECTORIES(${SCIQLOP-GUI_INCLUDE_DIR})
28
29 21 # Add sqpcore to the list of libraries to use
30 22 list(APPEND LIBRARIES ${SQPCORE_LIBRARY_NAME})
31 23
32 # Include core directory
33 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../core/include")
24 # Include sqpcore directory
25 include_directories("${CMAKE_CURRENT_SOURCE_DIR}/../sqpcore/src")
34 26
35 27 # Add dependent shared libraries
36 28 list(APPEND SHARED_LIBRARIES ${SQPCORE_SHARED_LIBRARIES})
37 29
38 30 # Retrieve the location of the dynamic library to copy it to the output path
39 31 #get_property(sqpcoreLocation TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY LOCATION)
40 32 list(APPEND SHARED_LIBRARIES_FROM_TARGETS ${sqpcoreLocation})
41 33
42 # Ui files
43 FILE (GLOB_RECURSE PROJECT_FORMS ${UI_FOLDER}/*.ui)
44
45 34 #
46 35 # Compile the application
47 36 #
48 37 FILE (GLOB_RECURSE APPLICATION_SOURCES
49 ${INCLUDES_DIR}/*.h
50 ${SOURCES_DIR}/*.c
51 ${SOURCES_DIR}/*.cpp
52 ${SOURCES_DIR}/*.h
53 ${PROJECT_FORMS})
38 ${SOURCES_DIR}/*.c
39 ${SOURCES_DIR}/*.cpp
40 ${SOURCES_DIR}/*.h)
41
42 # Headers files (.h)
43 FILE (GLOB_RECURSE PROJECT_HEADERS ${INCLUDE_FOLDER}/*.h)
44
45 # Ui files
46 FILE (GLOB_RECURSE PROJECT_FORMS ${UI_FOLDER}/*.ui)
54 47
48 # Resources files
49 FILE (GLOB_RECURSE PROJECT_RESOURCES ${RES_FOLDER}/*.qrc)
50
51 # Retrieve resources files
55 52 FILE (GLOB_RECURSE APPLICATION_RESOURCES ${RES_FOLDER}/*.qrc)
56 53
57 54 QT5_ADD_RESOURCES(RCC_HDRS ${APPLICATION_RESOURCES} )
58 55
59 56 QT5_WRAP_UI(UIS_HDRS
60 57 ${PROJECT_FORMS}
61 58 )
62 59
63 60
64 61 ADD_EXECUTABLE(${EXECUTABLE_NAME} ${APPLICATION_SOURCES} ${RCC_HDRS} ${UIS_HDRS})
65 set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD 14)
66 set_property(TARGET ${EXECUTABLE_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
67 62 target_link_libraries(${EXECUTABLE_NAME}
68 63 ${LIBRARIES})
69
70 INSTALL(TARGETS ${EXECUTABLE_NAME}
71 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
72 LIBRARY DESTINATION ${INSTALL_BINARY_DIR}
73 ARCHIVE DESTINATION ${INSTALL_BINARY_DIR}
74 )
64
75 65 # Link with Qt5 modules
76 66 qt5_use_modules(${EXECUTABLE_NAME} Core Widgets)
77
78
79 add_dependencies(${EXECUTABLE_NAME} ${SQPGUI_LIBRARY_NAME} ${SQPCORE_LIBRARY_NAME})
80
81 67
82 68
83 69 # Add the files to the list of files to be analyzed
84 70 LIST(APPEND CHECKSTYLE_INPUT_FILES ${APPLICATION_SOURCES})
85 71 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
86 72 # Vera++ exclusion files
87 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
73 #LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/path/to/exclusionFiles.tcl)
88 74 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
89 75
90 76 #
91 77 # Compile the tests
92 78 #
93 79 IF(BUILD_TESTS)
94
95 80 INCLUDE_DIRECTORIES(${SOURCES_DIR})
96 81 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
97 82 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
98 SET( TEST_LIBRARIES ${LIBRARIES})
83 SET( TEST_LIBRARIES ${LIBRARIES} ${EXTERN_LIBRARIES})
99 84
100 85 FOREACH( testFile ${TESTS_SOURCES} )
101 86 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
102 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
87 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
103 88
104 89 # Add to the list of sources files all the sources in the same
105 90 # directory that aren't another test
106 91 FILE (GLOB currentTestSources
107 92 ${testDirectory}/*.c
108 93 ${testDirectory}/*.cpp
109 94 ${testDirectory}/*.h)
110 95 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
111 96 LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
112 97
113 98 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
114 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES})
99 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
115 100 qt5_use_modules(${testName} Test)
116 101
117 102 ADD_TEST( NAME ${testName} COMMAND ${testName} )
118 103
119 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName})
104 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES})
120 105 ENDFOREACH( testFile )
121 106
122 107 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
123 108 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
124 109 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
125
126 110 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
127 111 ENDIF(BUILD_TESTS)
128 112
129 113 #
130 114 # Set the files that must be formatted by clang-format.
131 115 #
132 116 LIST (APPEND FORMATTING_INPUT_FILES ${APPLICATION_SOURCES})
133 117 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
134 118
135 119 #
136 120 # Set the directories that doxygen must browse to generate the
137 121 # documentation.
138 122 #
139 123 # Source directories:
140 124 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
141 125 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
142 126 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
143 127 # Source directories to exclude from the documentation generation
144 128 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
145 129 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
146 130
147 131 #
148 132 # Set the directories with the sources to analyze and propagate the
149 133 # modification to the parent scope
150 134 #
151 135 # Source directories to analyze:
152 136 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
153 137 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
154 138 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
155 139 # Source directories to exclude from the analysis
156 140 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
157 141 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
1 NO CONTENT: file renamed from app/resources/qlopapp.qrc to sqpapp/resources/qlopapp.qrc
1 NO CONTENT: file renamed from app/resources/sciqlopLOGO.svg to sqpapp/resources/sciqlopLOGO.svg
@@ -1,80 +1,39
1 1 /*------------------------------------------------------------------------------
2 2 -- This file is a part of the QLop Software
3 3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
7 7 -- the Free Software Foundation; either version 2 of the License, or
8 8 -- (at your option) any later version.
9 9 --
10 10 -- This program is distributed in the hope that it will be useful,
11 11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 13 -- GNU General Public License for more details.
14 14 --
15 15 -- You should have received a copy of the GNU General Public License
16 16 -- along with this program; if not, write to the Free Software
17 17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18 -------------------------------------------------------------------------------*/
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 #include "MainWindow.h"
22 #include "mainwindow.h"
23 #include <QApplication>
23 24 #include <QProcessEnvironment>
24 25 #include <QThread>
25 #include <SqpApplication.h>
26 //#include <omp.h>
26 27 #include <qglobal.h>
27 28
28 #include <Plugin/PluginManager.h>
29 #include <QDir>
30
31 #include <QLoggingCategory>
32
33 Q_LOGGING_CATEGORY(LOG_Main, "Main")
34
35 namespace {
36
37 const auto PLUGIN_DIRECTORY_NAME = QStringLiteral("plugins");
38
39
40 } // namespace
41
42 29 int main(int argc, char *argv[])
43 30 {
44 SqpApplication a{argc, argv};
45 SqpApplication::setOrganizationName("LPP");
46 SqpApplication::setOrganizationDomain("lpp.fr");
47 SqpApplication::setApplicationName("SciQLop");
31 QApplication a(argc, argv);
32 QApplication::setOrganizationName("LPP");
33 QApplication::setOrganizationDomain("lpp.fr");
34 QApplication::setApplicationName("SciQLop");
48 35 MainWindow w;
49 36 w.show();
50 37
51 // Loads plugins
52 auto pluginDir = QDir{a.applicationDirPath()};
53 auto pluginLookupPath = {
54 a.applicationDirPath(),
55 a.applicationDirPath() + "/" + PLUGIN_DIRECTORY_NAME,
56 a.applicationDirPath() + "/../lib64/SciQlop",
57 a.applicationDirPath() + "/../lib64/sciqlop",
58 a.applicationDirPath() + "/../lib/SciQlop",
59 a.applicationDirPath() + "/../lib/sciqlop",
60 a.applicationDirPath() + "/../plugins",
61 };
62
63 #if _WIN32 || _WIN64
64 pluginDir.mkdir(PLUGIN_DIRECTORY_NAME);
65 pluginDir.cd(PLUGIN_DIRECTORY_NAME);
66 #endif
67
68 PluginManager pluginManager{};
69
70 for (auto &&path : pluginLookupPath) {
71 QDir directory{path};
72 if (directory.exists()) {
73 qCDebug(LOG_Main())
74 << QObject::tr("Plugin directory: %1").arg(directory.absolutePath());
75 pluginManager.loadPlugins(directory);
76 }
77 }
78
79 38 return a.exec();
80 39 }
@@ -1,65 +1,60
1 1 /*------------------------------------------------------------------------------
2 -- This file is a part of the SciQLop Software
3 -- Copyright (C) 2017, Plasma Physics Laboratory - CNRS
2 -- This file is a part of the QLop Software
3 -- Copyright (C) 2015, Plasma Physics Laboratory - CNRS
4 4 --
5 5 -- This program is free software; you can redistribute it and/or modify
6 6 -- it under the terms of the GNU General Public License as published by
7 7 -- the Free Software Foundation; either version 2 of the License, or
8 8 -- (at your option) any later version.
9 9 --
10 10 -- This program is distributed in the hope that it will be useful,
11 11 -- but WITHOUT ANY WARRANTY; without even the implied warranty of
12 12 -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 13 -- GNU General Public License for more details.
14 14 --
15 15 -- You should have received a copy of the GNU General Public License
16 16 -- along with this program; if not, write to the Free Software
17 17 -- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 18 -------------------------------------------------------------------------------*/
19 19 /*-- Author : Alexis Jeandet
20 20 -- Mail : alexis.jeandet@member.fsf.org
21 21 ----------------------------------------------------------------------------*/
22 #ifndef SCIQLOP_MAINWINDOW_H
23 #define SCIQLOP_MAINWINDOW_H
22 #ifndef MAINWINDOW_H
23 #define MAINWINDOW_H
24 24
25 25 #include <QListWidgetItem>
26 #include <QLoggingCategory>
27 26 #include <QMainWindow>
28 27 #include <QProgressBar>
29 28 #include <QProgressDialog>
30 29 #include <QThread>
31 30 #include <QVBoxLayout>
32 31 #include <QWidget>
32 //#include "../Core/qlopservice.h"
33 //#include "../Core/qlopgui.h"
33 34
34 #include <Common/spimpl.h>
35
36 #include <memory>
37
38 Q_DECLARE_LOGGING_CATEGORY(LOG_MainWindow)
39 35
40 36 namespace Ui {
41 37 class MainWindow;
42 } // namespace Ui
43
38 }
44 39
45 40 class MainWindow : public QMainWindow {
46 41 Q_OBJECT
47 42
48 43 public:
49 44 explicit MainWindow(QWidget *parent = 0);
50 virtual ~MainWindow();
45 ~MainWindow();
51 46 public slots:
52 47
53 48 protected:
54 49 void changeEvent(QEvent *e);
55 50
56 51 private:
57 std::unique_ptr<Ui::MainWindow> m_Ui;
58 // QWidget *m_progressWidget;
59 // QVBoxLayout *m_progressLayout;
52 Ui::MainWindow *ui;
53 QList<QProgressBar *> m_progress;
54 int *m_progressThreadIds;
55 QWidget *m_progressWidget;
56 QVBoxLayout *m_progressLayout;
60 57 // QList<QLopService*> m_qlopServices;
61 class MainWindowPrivate;
62 spimpl::unique_impl_ptr<MainWindowPrivate> impl;
63 58 };
64 59
65 #endif // SCIQLOP_MAINWINDOW_H
60 #endif // MAINWINDOW_H
@@ -1,156 +1,121
1 1
2 ## core - CMakeLists.txt
2 ## sqpcore - CMakeLists.txt
3 3 STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX)
4 SET(SQPCORE_LIBRARY_NAME "${LIBRARY_PREFFIX}_core${DEBUG_SUFFIX}")
4 SET(SQPCORE_LIBRARY_NAME "${LIBRARY_PREFFIX}_sqpcore${DEBUG_SUFFIX}")
5 5 SET(SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src/")
6 SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include/")
7
8 # Include core directory
9 include_directories("${INCLUDES_DIR}")
10 6
11 7 # Set a variable to display a warning in the version files.
12 8 SET(SCIQLOP_CMAKE_GENERATION_WARNING "DON'T CHANGE THIS FILE. AUTOGENERATED BY CMAKE.")
13 9 # Generate the version file from the cmake version variables. The version
14 10 # variables are defined in the cmake/sciqlop_version.cmake file.
15 11 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.h.in"
16 "${INCLUDES_DIR}/Version.h")
12 "${SOURCES_DIR}/Version.h")
17 13 CONFIGURE_FILE("${CMAKE_CURRENT_SOURCE_DIR}/resources/Version.cpp.in"
18 14 "${SOURCES_DIR}/Version.cpp")
19
20 # Find dependent modules
21 find_package(sciqlop-plugin)
22 INCLUDE_DIRECTORIES(${SCIQLOP-PLUGIN_INCLUDE_DIR})
23
15
24 16 #
25 17 # Find Qt modules
26 18 #
27 SCIQLOP_FIND_QT(Core Network)
19 SCIQLOP_FIND_QT(Core)
28 20
29 21 #
30 22 # Compile the library library
31 23 #
32
33 ADD_DEFINITIONS(-DCORE_LIB)
34
35 24 FILE (GLOB_RECURSE MODULE_SOURCES
36 ${INCLUDES_DIR}/*.h
37 ${SOURCES_DIR}/*.c
38 ${SOURCES_DIR}/*.cpp
25 ${SOURCES_DIR}/*.c
26 ${SOURCES_DIR}/*.cpp
39 27 ${SOURCES_DIR}/*.h)
40 28
41 29 ADD_LIBRARY(${SQPCORE_LIBRARY_NAME} ${MODULE_SOURCES})
42 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
43 set_property(TARGET ${SQPCORE_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
44 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME})
45 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core Network)
46
47 INSTALL(TARGETS ${SQPCORE_LIBRARY_NAME}
48 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
49 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
50 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
51 )
52
30 TARGET_LINK_LIBRARIES(${SQPCORE_LIBRARY_NAME} ${EXTERN_LIBRARIES})
31 qt5_use_modules(${SQPCORE_LIBRARY_NAME} Core)
32
53 33 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
54 34 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
55 35 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
56 36 IF(BUILD_SHARED_LIBS)
57 37 SET_TARGET_PROPERTIES(${SQPCORE_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT")
58 38 ELSE()
59 39 TARGET_COMPILE_DEFINITIONS(${SQPCORE_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES")
60 40 ENDIF()
61 41
62 42 # Set the variable to parent scope so that the other projects can copy the
63 43 # dependent shared libraries
64 44 SCIQLOP_SET_TO_PARENT_SCOPE(SQPCORE_LIBRARY_NAME)
65 45
66 46 # Copy extern shared libraries to the lib folder
67 47 SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPCORE_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES})
68 48
69 49 # Add the files to the list of files to be analyzed
70 50 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
71 51 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
72 52 # Vera++ exclusion files
73 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
53 #LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/path/to/exclusionFiles.tcl)
74 54 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
75 55
76 56 #
77 57 # Compile the tests
78 58 #
79 59 IF(BUILD_TESTS)
80 60 INCLUDE_DIRECTORIES(${SOURCES_DIR})
81 61 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
82 62 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
83 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME})
63 SET( TEST_LIBRARIES ${SQPCORE_LIBRARY_NAME} ${EXTERN_LIBRARIES})
84 64
85 SET(TARGETS_COV)
86 65 FOREACH( testFile ${TESTS_SOURCES} )
87 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
66 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
88 67 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
89 68
90 69 # Add to the list of sources files all the sources in the same
91 70 # directory that aren't another test
92 71 FILE (GLOB currentTestSources
93 72 ${testDirectory}/*.c
94 73 ${testDirectory}/*.cpp
95 ${testDirectory}/*.h)
96 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
97 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
74 ${testDirectory}/*.h)
75 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
76 LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
98 77
99 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
100 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
101 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
102 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
103 qt5_use_modules(${testName} Test)
78 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
79 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
80 qt5_use_modules(${testName} Test)
104 81
105 ADD_TEST( NAME ${testName} COMMAND ${testName} )
82 ADD_TEST( NAME ${testName} COMMAND ${testName} )
106 83
107 84 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES})
108 set(Coverage_NAME ${testName})
109 if(UNIX)
110 SETUP_TARGET_FOR_COVERAGE(TARGET ${testName}_coverage OUTPUT ${testFile}-path NAME ${testFile} EXECUTABLE ${testName})
111 LIST( APPEND TARGETS_COV ${testName}_coverage)
112 endif(UNIX)
113
114 ENDFOREACH( testFile )
115
116 add_custom_target(coverage)
117
118 FOREACH( target_cov ${TARGETS_COV} )
119 add_custom_command(TARGET coverage PRE_BUILD COMMAND make ${target_cov})
120 ENDFOREACH( target_cov )
85 ENDFOREACH( testFile )
121 86
122 87 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
123 88 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
124 89 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
125 90 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
126 91 ENDIF(BUILD_TESTS)
127 92
128 93 #
129 94 # Set the files that must be formatted by clang-format.
130 95 #
131 96 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
132 97 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
133 98
134 99 #
135 100 # Set the directories that doxygen must browse to generate the
136 101 # documentation.
137 102 #
138 103 # Source directories:
139 104 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
140 105 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
141 106 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
142 107 # Source directories to exclude from the documentation generation
143 108 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
144 109 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
145 110
146 111 #
147 112 # Set the directories with the sources to analyze and propagate the
148 113 # modification to the parent scope
149 114 #
150 115 # Source directories to analyze:
151 116 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
152 117 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
153 118 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
154 119 # Source directories to exclude from the analysis
155 120 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
156 121 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
1 NO CONTENT: file renamed from core/resources/Version.cpp.in to sqpcore/resources/Version.cpp.in
1 NO CONTENT: file renamed from core/resources/Version.h.in to sqpcore/resources/Version.h.in
@@ -1,169 +1,138
1 1
2 ## gui - CMakeLists.txt
2 ## sqpgui - CMakeLists.txt
3 3 STRING(TOLOWER ${CMAKE_PROJECT_NAME} LIBRARY_PREFFIX)
4 SET(SQPGUI_LIBRARY_NAME "${LIBRARY_PREFFIX}_gui${DEBUG_SUFFIX}")
4 SET(SQPGUI_LIBRARY_NAME "${LIBRARY_PREFFIX}_sqpgui${DEBUG_SUFFIX}")
5 5 SET(SOURCES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/src")
6 SET(INCLUDES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/include")
7 SET(UI_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/ui")
8 SET(RES_FOLDER "${CMAKE_CURRENT_SOURCE_DIR}/resources")
9
10 # Include gui directory
11 include_directories("${INCLUDES_DIR}")
12 include_directories("${CMAKE_CURRENT_BINARY_DIR}")
6 SET(INCLUDE_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/include)
7 SET(UI_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/ui)
8 SET(RES_FOLDER ${CMAKE_CURRENT_SOURCE_DIR}/resources)
13 9
14 10 # Set a variable to display a warning in the version files.
15 11 SET(SCIQLOP_CMAKE_GENERATION_WARNING "DON'T CHANGE THIS FILE. AUTOGENERATED BY CMAKE.")
16
12
17 13 #
18 14 # Find Qt modules
19 15 #
20 SCIQLOP_FIND_QT(Core Widgets PrintSupport)
16 SCIQLOP_FIND_QT(Core Widgets)
21 17
22 18 #
23 # Find dependent libraries
24 # ========================
25 find_package(sciqlop-core)
26
27 SET(LIBRARIES ${SCIQLOP-CORE_LIBRARIES})
28
29 INCLUDE_DIRECTORIES(${SCIQLOP-CORE_INCLUDE_DIR})
30
31 # Add sqpcore to the list of libraries to use
32 list(APPEND LIBRARIES ${SQPCORE_LIBRARY_NAME})
33
34 # Add dependent shared libraries
35 list(APPEND SHARED_LIBRARIES ${SQPCORE_SHARED_LIBRARIES})
19 # Compile the library library
20 #
21 FILE (GLOB_RECURSE MODULE_SOURCES
22 ${SOURCES_DIR}/*.c
23 ${SOURCES_DIR}/*.cpp
24 ${SOURCES_DIR}/*.h)
36 25
26 # Headers files (.h)
27 FILE (GLOB_RECURSE PROJECT_HEADERS ${INCLUDE_FOLDER}/*.h)
37 28
38 29 # Ui files
39 30 FILE (GLOB_RECURSE PROJECT_FORMS ${UI_FOLDER}/*.ui)
40 31
41 32 # Resources files
42 33 FILE (GLOB_RECURSE PROJECT_RESOURCES ${RES_FOLDER}/*.qrc)
43 34
44 #
45 # Compile the library library
46 #
47 FILE (GLOB_RECURSE MODULE_SOURCES
48 ${INCLUDES_DIR}/*.h
49 ${SOURCES_DIR}/*.c
50 ${SOURCES_DIR}/*.cpp
51 ${SOURCES_DIR}/*.h
52 ${PROJECT_FORMS})
53
54 35 QT5_ADD_RESOURCES(RCC_HDRS
55 36 ${PROJECT_RESOURCES}
56 37 )
57 38
58 39 QT5_WRAP_UI(UIS_HDRS
59 40 ${PROJECT_FORMS}
60 41 )
61 42
43 include_directories("${CMAKE_CURRENT_BINARY_DIR}")
44 message(CURRENT INCLUDE : ${CMAKE_CURRENT_BINARY_DIR})
62 45
63 ADD_LIBRARY(${SQPGUI_LIBRARY_NAME} ${MODULE_SOURCES} ${UIS_HDRS} ${RCC_HDRS})
64 set_property(TARGET ${SQPGUI_LIBRARY_NAME} PROPERTY CXX_STANDARD 14)
65 set_property(TARGET ${SQPGUI_LIBRARY_NAME} PROPERTY CXX_STANDARD_REQUIRED ON)
66
67 TARGET_LINK_LIBRARIES(${SQPGUI_LIBRARY_NAME} ${LIBRARIES})
68 qt5_use_modules(${SQPGUI_LIBRARY_NAME} Core Widgets PrintSupport)
69
70
71 INSTALL(TARGETS ${SQPGUI_LIBRARY_NAME}
72 RUNTIME DESTINATION ${INSTALL_BINARY_DIR}
73 LIBRARY DESTINATION ${INSTALL_LIBRARY_DIR}
74 ARCHIVE DESTINATION ${INSTALL_LIBRARY_DIR}
75 )
76 add_dependencies(${SQPGUI_LIBRARY_NAME} ${SQPCORE_LIBRARY_NAME})
77
78
46 ADD_LIBRARY(${SQPGUI_LIBRARY_NAME} ${MODULE_SOURCES} ${UIS_HDRS})
47 TARGET_LINK_LIBRARIES(${SQPGUI_LIBRARY_NAME} ${EXTERN_LIBRARIES})
48 qt5_use_modules(${SQPGUI_LIBRARY_NAME} Core Widgets)
49
79 50 # From cmake documentation: http://www.cmake.org/cmake/help/v3.0/manual/cmake-buildsystem.7.html
80 51 # Entries in the COMPILE_DEFINITIONS are prefixed with -D or /D and added to the compile line in an unspecified order.
81 52 # The DEFINE_SYMBOL target property is also added as a compile definition as a special convenience case for SHARED and MODULE library targets
82 53 IF(BUILD_SHARED_LIBS)
83 54 SET_TARGET_PROPERTIES(${SQPGUI_LIBRARY_NAME} PROPERTIES COMPILE_DEFINITIONS "SCIQLOP_EXPORT")
84 55 ELSE()
85 56 TARGET_COMPILE_DEFINITIONS(${SQPGUI_LIBRARY_NAME} PUBLIC "SCIQLOP_STATIC_LIBRARIES")
86 57 ENDIF()
87 58
88 59 # Set the variable to parent scope so that the other projects can copy the
89 60 # dependent shared libraries
90 61 SCIQLOP_SET_TO_PARENT_SCOPE(SQPGUI_LIBRARY_NAME)
91 62
92 63 # Copy extern shared libraries to the lib folder
93 SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPGUI_LIBRARY_NAME})
94
64 SCIQLOP_COPY_TO_TARGET(LIBRARY ${SQPGUI_LIBRARY_NAME} ${EXTERN_SHARED_LIBRARIES})
65
95 66 # Add the files to the list of files to be analyzed
96 67 LIST(APPEND CHECKSTYLE_INPUT_FILES ${MODULE_SOURCES})
97 68 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_INPUT_FILES)
98 69 # Vera++ exclusion files
99 LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/vera-exclusions/exclusions.txt)
70 #LIST(APPEND CHECKSTYLE_EXCLUSION_FILES ${CMAKE_CURRENT_SOURCE_DIR}/path/to/exclusionFiles.tcl)
100 71 SCIQLOP_SET_TO_PARENT_SCOPE(CHECKSTYLE_EXCLUSION_FILES)
101 72
102 73 #
103 74 # Compile the tests
104 75 #
105 76 IF(BUILD_TESTS)
106 INCLUDE_DIRECTORIES(${SOURCES_DIR})
107 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
108 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
109 SET( TEST_LIBRARIES ${SQPGUI_LIBRARY_NAME})
110
111 FOREACH( testFile ${TESTS_SOURCES} )
112 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
113 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
114
115 # Add to the list of sources files all the sources in the same
116 # directory that aren't another test
117 FILE (GLOB currentTestSources
118 ${testDirectory}/*.c
119 ${testDirectory}/*.cpp
120 ${testDirectory}/*.h)
121 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
122 # LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
123
124 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
125 set_property(TARGET ${testName} PROPERTY CXX_STANDARD 14)
126 set_property(TARGET ${testName} PROPERTY CXX_STANDARD_REQUIRED ON)
127 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
128 qt5_use_modules(${testName} Test)
129
130 ADD_TEST( NAME ${testName} COMMAND ${testName} )
77 INCLUDE_DIRECTORIES(${SOURCES_DIR})
78 FILE (GLOB_RECURSE TESTS_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/Test*.cpp)
79 FILE (GLOB_RECURSE TESTS_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/Test*.h)
80 SET( TEST_LIBRARIES ${SQPGUI_LIBRARY_NAME} ${EXTERN_LIBRARIES})
81
82 FOREACH( testFile ${TESTS_SOURCES} )
83 GET_FILENAME_COMPONENT( testDirectory ${testFile} DIRECTORY )
84 GET_FILENAME_COMPONENT( testName ${testFile} NAME_WE )
85
86 # Add to the list of sources files all the sources in the same
87 # directory that aren't another test
88 FILE (GLOB currentTestSources
89 ${testDirectory}/*.c
90 ${testDirectory}/*.cpp
91 ${testDirectory}/*.h)
92 LIST (REMOVE_ITEM currentTestSources ${TESTS_SOURCES})
93 LIST (REMOVE_ITEM currentTestSources ${TESTS_HEADERS})
94
95 ADD_EXECUTABLE(${testName} ${testFile} ${currentTestSources})
96 TARGET_LINK_LIBRARIES( ${testName} ${TEST_LIBRARIES} )
97 qt5_use_modules(${testName} Test)
98
99 ADD_TEST( NAME ${testName} COMMAND ${testName} )
131 100
132 101 SCIQLOP_COPY_TO_TARGET(RUNTIME ${testName} ${EXTERN_SHARED_LIBRARIES})
133 ENDFOREACH( testFile )
102 ENDFOREACH( testFile )
134 103
135 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
136 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
137 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
104 LIST(APPEND testFilesToFormat ${TESTS_SOURCES})
105 LIST(APPEND testFilesToFormat ${TESTS_HEADERS})
106 LIST(APPEND FORMATTING_INPUT_FILES ${testFilesToFormat})
138 107 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
139 108 ENDIF(BUILD_TESTS)
140
109
141 110 #
142 111 # Set the files that must be formatted by clang-format.
143 112 #
144 113 LIST (APPEND FORMATTING_INPUT_FILES ${MODULE_SOURCES})
145 114 SCIQLOP_SET_TO_PARENT_SCOPE(FORMATTING_INPUT_FILES)
146 115
147 #
148 # Set the directories that doxygen must browse to generate the
116 #
117 # Set the directories that doxygen must browse to generate the
149 118 # documentation.
150 #
119 #
151 120 # Source directories:
152 121 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/docs")
153 122 LIST (APPEND DOXYGEN_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
154 123 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_INPUT_DIRS)
155 124 # Source directories to exclude from the documentation generation
156 125 #LIST (APPEND DOXYGEN_EXCLUDE_PATTERNS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir/*")
157 126 SCIQLOP_SET_TO_PARENT_SCOPE(DOXYGEN_EXCLUDE_PATTERNS)
158 127
159 #
160 # Set the directories with the sources to analyze and propagate the
128 #
129 # Set the directories with the sources to analyze and propagate the
161 130 # modification to the parent scope
162 #
163 # Source directories to analyze:
131 #
132 # Source directories to analyze:
164 133 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/src")
165 134 LIST (APPEND ANALYSIS_INPUT_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/tests")
166 135 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_INPUT_DIRS)
167 136 # Source directories to exclude from the analysis
168 137 #LIST (APPEND ANALYSIS_EXCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/path/to/subdir")
169 138 SCIQLOP_SET_TO_PARENT_SCOPE(ANALYSIS_EXCLUDE_DIRS)
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (674 lines changed) Show them Hide them
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (842 lines changed) Show them Hide them
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (636 lines changed) Show them Hide them
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (7219 lines changed) Show them Hide them
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed, binary diff hidden
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (31403 lines changed) Show them Hide them
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (22288 lines changed) Show them Hide them
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (29129 lines changed) Show them Hide them
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (10802 lines changed) Show them Hide them
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
1 NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (360000 lines changed) Show them Hide them
1 NO CONTENT: file was removed
General Comments 3
Under Review
author

Auto status change to "Under Review"

Approved
author

ok

note
author

Pull request merged and closed