Merged muonspin/musrfit:root6 into master

This commit is contained in:
Zaher Salman 2022-06-21 17:34:53 +02:00
commit 3c607768b9
5 changed files with 42 additions and 40 deletions

View File

@ -1,4 +1,4 @@
# - musrfit
# - musrfit
cmake_minimum_required(VERSION 3.9)
if (CMAKE_VERSION GREATER_EQUAL 3.12)
@ -21,7 +21,7 @@ set_property(CACHE qt_version PROPERTY STRINGS AUTO 3 4 5 6)
#--- set a default build type if none was specified ---------------------------
set(default_build_type "Release")
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "Setting build type to '${default_build_type}' as none was specified.")
set(CMAKE_BUILD_TYPE "${default_build_type}" CACHE
@ -35,7 +35,7 @@ endif ()
#--- the next two lines are needed that the math functions are found ----------
set(CMAKE_REQUIRED_INCLUDES math.h)
set(CMAKE_REQUIRED_LIBRARIES m)
set(CMAKE_REQUIRED_LIBRARIES m)
include(CheckTypeSize)
include(CheckIncludeFiles)
@ -84,17 +84,17 @@ if (ROOT_mathmore_FOUND)
endif (ROOT_mathmore_FOUND)
#--- the next check is need to set a flag, since root 6.24 (minuit2) breaks
#--- the backwards compatibility. ---------------------------------------------
#--- the backwards compatibility. ---------------------------------------------
if (ROOT_VERSION VERSION_LESS "6.23")
set(ROOT_GRTEQ_24 0)
else ()
else ()
set(ROOT_GRTEQ_24 1)
endif ()
set(ROOT_GRTEQ_24 ${ROOT_GRTEQ_24} CACHE INTERNAL "ROOT Version check")
#--- check for boost ----------------------------------------------------------
find_package(Boost REQUIRED
COMPONENTS
COMPONENTS
system
filesystem
)
@ -135,7 +135,7 @@ if (qt_based_tools)
find_package(Qt6Xml CONFIG REQUIRED)
find_package(Qt6Network CONFIG REQUIRED)
find_package(Qt6Svg CONFIG REQUIRED)
find_package(Qt6PrintSupport CONFIG REQUIRED)
find_package(Qt6PrintSupport CONFIG REQUIRED)
endif (Qt6Core_FOUND)
# try Qt5
if (NOT Qt6Core_FOUND)
@ -232,7 +232,7 @@ endif ()
#--- propagate to the sub-directories -----------------------------------------
add_subdirectory(src)
#--- write summary of the installation
#--- write summary of the installation
message("")
message("|-----------------------------------------------------------------------|")
message("| |")
@ -264,14 +264,14 @@ endif (OpenMP_FOUND)
if (nexus)
message("")
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
message(" HDF4 found in ${HDF4_INCLUDE_DIRS}")
message(" HDF5 found in ${HDF5_INCLUDE_DIRS}")
message(" NeXus found in ${NEXUS_INCLUDE_DIR}")
message(" NeXus found in ${NEXUS_INCLUDE_DIR}")
endif (nexus)
message("")
if (qt_based_tools)
if (Qt6Core_FOUND)
if (Qt6Core_FOUND)
message(" Qt found in ${Qt6Core_INCLUDE_DIRS} (Version: ${Qt6Core_VERSION})")
else (Qt6Core_FOUND)
if (Qt5Core_FOUND)
@ -363,8 +363,8 @@ message("-----------------------------------------------------------------------
message("")
#--- cpack specific info ......................................................
file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} PROJECT_SOURCE_DIR_NATIVE)
file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} PROJECT_BINARY_DIR_NATIVE)
file(TO_NATIVE_PATH ${PROJECT_SOURCE_DIR} PROJECT_SOURCE_DIR_NATIVE)
file(TO_NATIVE_PATH ${PROJECT_BINARY_DIR} PROJECT_BINARY_DIR_NATIVE)
string(REPLACE "\\" "\\\\" PROJECT_SOURCE_DIR_NATIVE_D ${PROJECT_SOURCE_DIR_NATIVE})
string(REPLACE "\\" "\\\\" PROJECT_BINARY_DIR_NATIVE_D ${PROJECT_BINARY_DIR_NATIVE})

View File

@ -42,18 +42,18 @@ set(GENERATED_HEADER_FILES
set_property(SOURCE mupp_version.h PROPERTY SKIP_AUTOMOC ON) # needed for cmake 3.x
set(MUPP_SOURCE_FILES
mupp.cpp
PmuppAdmin.cpp
mupp.cpp
PmuppAdmin.cpp
Pmupp.cpp
PmuppScript.cpp
PmuppScript.cpp
PmuppGui.cpp
PVarDialog.cpp
)
if (APPLE)
set(RESOURCE_FILES icons/mupp.icns)
add_executable(mupp
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
add_executable(mupp
MACOSX_BUNDLE ${GENERATED_HEADER_FILES} ${MUPP_SOURCE_FILES}
mupp.qrc ${RESOURCE_FILES}
)
else (APPLE)
@ -62,24 +62,24 @@ endif (APPLE)
#--- check if project source is repo ------------------------------------------
if (IS_GIT_REPO)
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
else (IS_GIT_REPO)
set(HAVE_GIT_REV_H "")
set(HAVE_GIT_REV_H "")
endif (IS_GIT_REPO)
#--- compiler option to workaround a little cast problem for some
#--- compiler option to workaround a little cast problem for some
#--- boost/compiler combinations ----------------------------------------------
target_compile_options(mupp
PRIVATE
"-fpermissive"
"${HAVE_GIT_REV_H}"
"${HAVE_GIT_REV_H}"
)
#--- add the variable related sources -----------------------------------------
add_subdirectory(var)
#--- add the necessary header includes ----------------------------------------
target_include_directories(mupp
target_include_directories(mupp
BEFORE PRIVATE
$<BUILD_INTERFACE:${Boost_INCLUDE_DIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/../..>
@ -104,6 +104,7 @@ if (APPLE)
MACOSX_FRAMEWORK_IDENTIFIER ch.psi.mupp
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
RESOURCE "${RESOURCE_FILES}"
INSTALL_RPATH "${Qt6_DIR}/../.."
)
endif (APPLE)

View File

@ -2,9 +2,9 @@
#--- check if project source is repo ------------------------------------------
if (IS_GIT_REPO)
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
else (IS_GIT_REPO)
set(HAVE_GIT_REV_H "")
set(HAVE_GIT_REV_H "")
endif (IS_GIT_REPO)
#--- instruct CMake to run moc automatically when needed ----------------------
@ -29,7 +29,7 @@ if (APPLE)
${macosx_icon}
)
else (APPLE)
add_executable(musrStep
add_executable(musrStep
${musrStep_src}
musrStep.qrc
)
@ -46,7 +46,7 @@ target_include_directories(musrStep
target_compile_options(musrStep
PRIVATE
"${HAVE_GIT_REV_H}"
"${HAVE_GIT_REV_H}"
)
target_link_libraries(musrStep PRIVATE ${qt_libs})
@ -62,6 +62,7 @@ if (APPLE)
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musrStep"
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
RESOURCE ${macosx_icon}
INSTALL_RPATH "${Qt6_DIR}/../.."
)
endif (APPLE)
@ -74,4 +75,3 @@ else (APPLE)
RUNTIME DESTINATION bin
)
endif (APPLE)

View File

@ -2,9 +2,9 @@
#--- check if project source is repo ------------------------------------------
if (IS_GIT_REPO)
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
else (IS_GIT_REPO)
set(HAVE_GIT_REV_H "")
set(HAVE_GIT_REV_H "")
endif (IS_GIT_REPO)
#--- instruct CMake to run moc automatically when needed ----------------------
@ -30,10 +30,10 @@ if (APPLE)
add_executable(musrWiz MACOSX_BUNDLE
${musrWiz_src}
musrWiz.qrc
${macosx_icon}
${macosx_icon}
)
else (APPLE)
add_executable(musrWiz
add_executable(musrWiz
${musrWiz_src}
musrWiz.qrc
)
@ -50,7 +50,7 @@ target_include_directories(musrWiz
target_compile_options(musrWiz
PRIVATE
"${HAVE_GIT_REV_H}"
"${HAVE_GIT_REV_H}"
)
target_link_libraries(musrWiz PRIVATE ${qt_libs})
@ -66,6 +66,7 @@ if (APPLE)
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musrWiz"
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
RESOURCE ${macosx_icon}
INSTALL_RPATH "${Qt6_DIR}/../.."
)
endif (APPLE)

View File

@ -2,9 +2,9 @@
#--- check if project source is repo ------------------------------------------
if (IS_GIT_REPO)
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
set(HAVE_GIT_REV_H "-DHAVE_GIT_REV_H")
else (IS_GIT_REPO)
set(HAVE_GIT_REV_H "")
set(HAVE_GIT_REV_H "")
endif (IS_GIT_REPO)
#--- instruct CMake to run moc automatically when needed ----------------------
@ -63,7 +63,7 @@ set(musredit_ui
forms/PGetFourierBlockDialog.ui
forms/PGetPlotBlockDialog.ui
forms/PMsr2DataDialog.ui
forms/PChangeDefaultPathsDialog.ui
forms/PChangeDefaultPathsDialog.ui
)
if (APPLE)
@ -72,7 +72,7 @@ if (APPLE)
else()
set(macosx_icon_name musredit.icns)
endif()
set(macosx_icon "icons/${macosx_icon_name}")
set(macosx_icon "icons/${macosx_icon_name}")
add_executable(musredit MACOSX_BUNDLE
${musredit_src}
${musredit_ui}
@ -80,7 +80,7 @@ if (APPLE)
${macosx_icon}
)
else (APPLE)
add_executable(musredit
add_executable(musredit
${musredit_src}
${musredit_ui}
musredit.qrc
@ -99,7 +99,7 @@ target_include_directories(musredit
target_compile_options(musredit
PRIVATE
"${HAVE_GIT_REV_H}"
"${HAVE_GIT_REV_H}"
)
target_link_libraries(musredit PRIVATE ${qt_libs})
@ -115,6 +115,7 @@ if (APPLE)
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musredit"
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
RESOURCE ${macosx_icon}
INSTALL_RPATH "${Qt6_DIR}/../.."
)
endif (APPLE)
@ -138,4 +139,3 @@ install(
${CMAKE_INSTALL_PREFIX}/share/doc/musrfit
MESSAGE_NEVER
)