Skip to content
Snippets Groups Projects
Commit 64a56001 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

Merge branch 'sk1' into 'develop'

minor corrections, while cleaning up old edit scripts

See merge request !465
parents f4403b31 cce174f6
No related branches found
No related tags found
1 merge request!465minor corrections, while cleaning up old edit scripts
Pipeline #49602 passed
Showing
with 45 additions and 44 deletions
......@@ -93,14 +93,14 @@ else()
set(executable_destination DESTINATION ${destination_gui}/exec)
endif()
#message(STATUS "Executable destination is ${executable_destination}")
install (TARGETS ${executable_name} ${executable_destination} COMPONENT Applications)
install(TARGETS ${executable_name} ${executable_destination} COMPONENT Applications)
set(image_files
${CMAKE_CURRENT_SOURCE_DIR}/BornAgain.ico
${CMAKE_CURRENT_SOURCE_DIR}/BornAgain.icns
${CMAKE_SOURCE_DIR}/GUI/images/BornAgain_48x48.png
${CMAKE_SOURCE_DIR}/GUI/images/BornAgain_64x64.png)
install (FILES ${image_files} DESTINATION ${destination_images} COMPONENT Applications)
install(FILES ${image_files} DESTINATION ${destination_images} COMPONENT Applications)
# -----------------------------------------------------------------------------
# system dependent installation
......
......@@ -62,7 +62,7 @@ double erf(double arg);
// double GenerateNormalRandom(double average, double std_dev);
double GeneratePoissonRandom(double average);
} // Namespace Math
} // namespace Math
#endif // BORNAGAIN_BASE_MATH_FUNCTIONS_H
#endif // USER_API
......@@ -23,7 +23,7 @@ set(CMAKE_C_STANDARD 11)
set(CMAKE_CXX_STANDARD 17)
## Show info about generator type; set CMAKE_BUILD_TYPE if not given
if (CMAKE_CONFIGURATION_TYPES)
if(CMAKE_CONFIGURATION_TYPES)
message(STATUS "Generator type: Multi-configuration generator")
else()
message(STATUS "Generator type: Single-configuration generator")
......
......@@ -26,7 +26,7 @@ endif()
foreach(lib ${CoreComponents})
message(STATUS ${lib})
find_library (BORNAGAIN_${lib} _libBornAgain${lib}.so
find_library(BORNAGAIN_${lib} _libBornAgain${lib}.so
PATHS ${BORNAGAIN_LIBRARY_DIR}
HINTS ${BORNAGAIN_LIBRARY_DIR})
list(APPEND BORNAGAIN_LIBRARIES ${BORNAGAIN_${lib}})
......
......@@ -31,7 +31,7 @@ namespace mumufit::internal {
//! Reports results of minimization in the form of multi-line string
std::string reportToString(const MinimizerAdapter& minimizer);
}; // namespace mumufit::internal
} // namespace mumufit::internal
#endif // BORNAGAIN_FIT_ADAPTER_REPORT_H
#endif // USER_API
......@@ -68,7 +68,7 @@ target_include_directories(${library_name} PUBLIC
# --- installation ---------
install (TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries)
install(TARGETS ${library_name} DESTINATION ${destination_lib} COMPONENT Libraries)
if(WIN32)
# --- Qt ---
......@@ -104,7 +104,7 @@ if(WIN32)
install(FILES ${QT_VISTA_STYLE}
DESTINATION bin/styles COMPONENT Libraries)
else(EXISTS ${QT_VISTA_STYLE})
MESSAGE(AUTHOR_WARNING File ${QT_VISTA_STYLE} not found.)
message(AUTHOR_WARNING File ${QT_VISTA_STYLE} not found.)
endif(EXISTS ${QT_VISTA_STYLE})
unset(QT_VISTA_STYLE)
......
......@@ -28,6 +28,6 @@ void updateAxesTitle(Data1DViewItem* view_item);
std::unique_ptr<OutputData<double>> getTranslatedData(Data1DViewItem* view_item,
DataItem* data_item);
}; // namespace GUI::Model::DataViewUtils
} // namespace GUI::Model::DataViewUtils
#endif // BORNAGAIN_GUI_MODEL_DATA_DATAVIEWUTILS_H
......@@ -38,6 +38,6 @@ QStringList getFitParameterNames(FitParameterContainerItem* container);
QString getParameterItemPath(const ParameterItem* parameterItem);
ParameterItem* getParameterItem(FitParameterContainerItem* container, const QString& link);
}; // namespace FitParameterHelper
} // namespace FitParameterHelper
#endif // BORNAGAIN_GUI_MODEL_FIT_FITPARAMETERHELPER_H
......@@ -37,6 +37,6 @@ template <typename ItemType> ItemType* CreateItem(SessionItem* parent)
}
}; // namespace GUI::Model::ItemFactory
} // namespace GUI::Model::ItemFactory
#endif // BORNAGAIN_GUI_MODEL_GROUP_ITEMFACTORY_H
......@@ -31,6 +31,6 @@ namespace GUI::Model::DomainSimulationBuilder {
std::unique_ptr<ISimulation> createSimulation(const MultiLayerItem* sampleItem,
const InstrumentItem* instrumentItem,
const SimulationOptionsItem* optionsItem = nullptr);
}; // namespace GUI::Model::DomainSimulationBuilder
} // namespace GUI::Model::DomainSimulationBuilder
#endif // BORNAGAIN_GUI_MODEL_TO_DOMAINSIMULATIONBUILDER_H
......@@ -42,6 +42,6 @@ std::unique_ptr<OutputData<double>> Import2dData(const QString& fileName,
//! (or null if none selected).
QString Import1dData(RealDataItem* realDataItem, const AbstractDataLoader* selectedLoader);
}; // namespace GUI::View::ImportDataUtils
} // namespace GUI::View::ImportDataUtils
#endif // BORNAGAIN_GUI_VIEW_IMPORT_IMPORTDATAUTILS_H
......@@ -32,6 +32,6 @@ QString name(JobViewActivity activity);
QVector<JobViewFlags::Dock> activeDocks(JobViewActivity activity);
}; // namespace JobViewActivities
} // namespace JobViewActivities
#endif // BORNAGAIN_GUI_VIEW_JOB_JOBVIEWACTIVITIES_H
set(lib ba3d)
file (GLOB_RECURSE source_files *.cpp)
file(GLOB_RECURSE source_files *.cpp)
set(CMAKE_AUTORCC ON)
qt5_add_resources(RC_SHADERS shaders.qrc)
add_library (${lib} STATIC ${source_files} ${RC_SHADERS})
add_library(${lib} STATIC ${source_files} ${RC_SHADERS})
target_include_directories(${lib} PUBLIC ${CMAKE_SOURCE_DIR})
target_link_libraries (${lib} Qt5::Core Qt5::Widgets Qt5::OpenGL)
target_link_libraries(${lib} Qt5::Core Qt5::Widgets Qt5::OpenGL)
set(${lib}_LIBRARY ${lib} PARENT_SCOPE)
......@@ -13,7 +13,7 @@ target_include_directories(${test} PUBLIC
${CMAKE_SOURCE_DIR}/3rdparty/common/gtest/gtest-1.8.0/include
${CMAKE_SOURCE_DIR}/Tests/Unit/utilities)
target_link_libraries(${test} ${BornAgainCore_LIBRARY} gtest)
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
target_compile_options(${test} PUBLIC "-Wno-deprecated-copy")
endif()
......
......@@ -12,7 +12,7 @@ message(STATUS "BornAgain Platform: ${BORNAGAIN_PLATFORM}")
message(STATUS "BornAgain Architecture: ${BORNAGAIN_ARCHITECTURE}")
message(STATUS "Default compiler flags (may be changed in later CMake steps):")
if (CMAKE_CONFIGURATION_TYPES)
if(CMAKE_CONFIGURATION_TYPES)
if("Release" IN_LIST CMAKE_CONFIGURATION_TYPES)
message(" Release: ${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_RELEASE}")
endif()
......
......@@ -8,7 +8,7 @@
configure_file(${CONFIGURABLES_DIR}/CTestCustom.cmake.in ${CMAKE_BINARY_DIR}/CTestCustom.cmake)
if (WIN32)
if(WIN32)
# Necessary to provide correct slashes in BABuild.h
file(TO_CMAKE_PATH ${Python3_EXECUTABLE} Python3_EXECUTABLE)
file(TO_CMAKE_PATH ${Python3_STDLIB} Python3_STDLIB)
......
......@@ -12,7 +12,7 @@ message(STATUS "GSL found=${GSL_FOUND} libs=${GSL_LIBRARIES} inc=${GSL_INCLUDE_D
if(WIN32)
set(EIGEN3_INCLUDE_DIR ${CMAKE_INCLUDE_PATH})
message(STATUS "Eigen3 include_dir=${EIGEN3_INCLUDE_DIR} (hard-coded)")
message(STATUS "Eigen3 include_dir=${EIGEN3_INCLUDE_DIR}(hard-coded)")
else()
find_package(Eigen3 3.3 REQUIRED)
message(STATUS "Eigen3 include_dir=${EIGEN3_INCLUDE_DIR} version=${EIGEN3_VERSION_STRING}")
......@@ -159,17 +159,17 @@ if(WIN32)
message(STATUS "Installation of Boost libraries:")
set(entryShallBeSkipped false)
foreach(Boost_lib ${Boost_LIBRARIES})
if (entryShallBeSkipped)
if(entryShallBeSkipped)
set(entryShallBeSkipped false)
continue()
endif()
if (${Boost_lib} STREQUAL "debug")
if(${Boost_lib} STREQUAL "debug")
set(entryShallBeSkipped true)
continue()
endif()
if (${Boost_lib} STREQUAL "optimized")
if(${Boost_lib} STREQUAL "optimized")
set(entryShallBeSkipped false)
continue()
endif()
......@@ -210,7 +210,7 @@ if(WIN32)
get_filename_component(cerf ${Cerf_LIB} NAME_WE)
set(Cerf_DLL "${DIR}/cerfcpp.dll")
if (NOT EXISTS ${Cerf_DLL})
if(NOT EXISTS ${Cerf_DLL})
message(FATAL_ERROR "Dynamic link library ${Cerf_DLL} (needed for cerf) does not exist")
endif()
install(FILES ${Cerf_DLL} DESTINATION ${destination_lib} COMPONENT Libraries)
......@@ -229,35 +229,36 @@ if(WIN32)
endforeach()
## TIFF
if (BORNAGAIN_TIFF_SUPPORT)
if(BORNAGAIN_TIFF_SUPPORT)
## Same as for Boost above: list can contain
# mixture of debug/optimized libs
message(STATUS "Installation of TIFF:")
set(entryShallBeSkipped false)
foreach(LIB ${TIFF_LIBRARIES})
if (entryShallBeSkipped)
if(entryShallBeSkipped)
set(entryShallBeSkipped false)
continue()
endif()
if (${LIB} STREQUAL "debug")
if(${LIB} STREQUAL "debug")
set(entryShallBeSkipped true)
continue()
endif()
if (${LIB} STREQUAL "optimized")
if(${LIB} STREQUAL "optimized")
set(entryShallBeSkipped false)
continue()
endif()
get_filename_component(UTF_NAME ${LIB} NAME)
if (${UTF_NAME} STREQUAL "tiff.lib")
if(${UTF_NAME} STREQUAL "tiff.lib")
message(" No installation for ${UTF_NAME}: This is the static TIFF library")
continue()
endif()
string(REPLACE ".lib" ".dll" DLL "${LIB}")
if (NOT EXISTS ${DLL})
message(FATAL_ERROR "Dynamic link library ${DLL} (derived from ${LIB}) does not exist")
if(NOT EXISTS ${DLL})
message(FATAL_ERROR
"Dynamic link library ${DLL} (derived from ${LIB}) does not exist")
endif()
install(FILES ${DLL} COMPONENT Libraries
DESTINATION ${destination_lib}
......
set(BORNAGAIN_ARCHITECTURE macosx)
set(BORNAGAIN_PLATFORM macosx)
if (NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
if(NOT CMAKE_SYSTEM_NAME MATCHES Darwin)
message(FATAL_ERROR "Found a non-Darwin system, currently unsupported")
endif()
......@@ -33,7 +33,7 @@ string(APPEND CMAKE_C_LINK_FLAGS " -bind_at_load -m64")
string(APPEND CMAKE_CXX_LINK_FLAGS " -bind_at_load -m64")
if (CMAKE_COMPILER_IS_GNUCXX)
if(CMAKE_COMPILER_IS_GNUCXX)
message(STATUS "Found GNU compiler collection")
execute_process(COMMAND ${CMAKE_C_COMPILER} -dumpversion OUTPUT_VARIABLE GCC_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
......
......@@ -12,7 +12,7 @@ install(FILES
if(NOT BORNAGAIN_APPLE_BUNDLE AND NOT BUILD_DEBIAN)
# Create bin directory for links.
install(CODE "FILE(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${destination_bin})"
install(CODE "file(MAKE_DIRECTORY ${CMAKE_INSTALL_PREFIX}/${destination_bin})"
COMPONENT Runtime)
# Make links.
install(CODE "
......
......@@ -4,20 +4,20 @@ set(CPACK_GENERATOR DEB)
# parameters to build a debian package
set(CPACK_DEBIAN_PACKAGE_MAINTAINER <contact@bornagainproject.org>)
# Architecture: (mandatory)
IF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
# Architecture:(mandatory)
if(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
# There is no such thing as i686 architecture on debian, you should use i386 instead
# $ dpkg --print-architecture
FIND_PROGRAM(DPKG_CMD dpkg)
IF(NOT DPKG_CMD)
MESSAGE(STATUS "Can not find dpkg in your path, default to i386.")
SET(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
ENDIF(NOT DPKG_CMD)
EXECUTE_PROCESS(COMMAND ${DPKG_CMD} --print-architecture
find_program(DPKG_CMD dpkg)
if(NOT DPKG_CMD)
message(STATUS "Can not find dpkg in your path, default to i386.")
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE i386)
endif(NOT DPKG_CMD)
execute_process(COMMAND ${DPKG_CMD} --print-architecture
OUTPUT_VARIABLE CPACK_DEBIAN_PACKAGE_ARCHITECTURE
OUTPUT_STRIP_TRAILING_WHITESPACE
)
ENDIF(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
endif(NOT CPACK_DEBIAN_PACKAGE_ARCHITECTURE)
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_PRIORITY optional)
......
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