cmake: portability and macOS fixes
Fixes found while reviewing the cmake setup, with a focus on macOS. All
changes are either platform neutral or guarded by if (APPLE).
Portability / correctness:
* CMP0167 was guarded by 'CMAKE_VERSION GREATER_EQUAL 3.3', a *numeric*
comparison which is true on e.g. cmake 3.22. Since the policy only exists
since cmake 3.30, configuring aborted on RHEL 9 / Ubuntu 22.04, although
cmake_minimum_required allows them. Use 'if (POLICY CMP0167)'.
* CMAKE_REQUIRED_INCLUDES expects directories, not header names. Setting it
to 'math.h' injected a bogus -I<scratch>/math.h into every check_*() and
leaked into the find_package() calls. Dropped, and CMAKE_REQUIRED_LIBRARIES
is now unset after the checks. config.h is unchanged.
* The Qt3 fallback tested 'AND Qt4_FOUND' instead of 'AND NOT Qt4_FOUND'.
* NeXus regression tests were registered unconditionally and therefore failed
in a default build. They are gated on 'nexus' now, and the HDF4 based ones
additionally on HAVE_HDF4.
* HAVE_HDF4 was queried but never defined, i.e. there was no way to switch on
the HDF4 support that PNeXus/PRunDataHandler/dump_header/musrfit implement.
Added option(HAVE_HDF4), to be used together with -Dnexus=1. This is not
academic: the ISIS example data are HDF4 files and test-histo-NeXus only
passes with -DHAVE_HDF4=1.
Do not use ${ROOT_USE_FILE}:
It overwrote CMAKE_CXX_STANDARD with ROOT's value and added ROOT's include
dirs, definitions and recommended compiler flags to *every* target,
including the Qt applications which do not use ROOT at all. Replaced by an
explicit equivalent; the C++ standard is now only raised, never silently
changed. The Qt sub-trees reset flags and include dirs again, mupp/plotter
puts them back since it does use ROOT. ROOT's flags are kept wherever ROOT
headers are used, -fsigned-char and -fsized-deallocation are ABI relevant
there. Verified: the compile flags of all ROOT consuming targets are
byte-identical to before.
Homebrew header shadowing:
Boost_INCLUDE_DIRS and FFTW3_INCLUDE are both /opt/homebrew/include on a
Homebrew system, i.e. the whole 3rd party header tree, and they were passed
to target_include_directories() with BEFORE - ahead of musrfit's own
src/include. They now come from the Boost::headers and FFTW3::FFTW3
imported targets, which contribute them as SYSTEM includes after the
project's own directories.
macOS:
* mupp: do not set the VERSION property on a MACOSX_BUNDLE target. cmake then
names the binary Contents/MacOS/mupp-1.1.0 and only leaves a symlink 'mupp'
beside it, contradicting CFBundleExecutable and not surviving
zipping/codesigning. This is the reason the symlink had to be created by
hand so far. VERSION is still set for the non-APPLE build.
* All four app bundles had an empty CFBundleShortVersionString and
CFBundleVersion; set MACOSX_BUNDLE_SHORT_VERSION_STRING / _BUNDLE_VERSION.
* APPLE is UNIX, so the RPM generator was also active on macOS -> restrict to
'UNIX AND NOT APPLE'. Likewise the /usr/local/lib rpath, which on Apple
silicon should be /opt/homebrew/lib; macOS gets its own branch now.
* mupp: -fpermissive is a GCC option, hand it to GCC only.
* musredit: use VERSION_GREATER_EQUAL for the Darwin version icon switch.
Verified on macOS 26 / arm64 with ROOT 6.40.03, Qt 6.11, cmake 4.4: full
build clean in the default configuration, with -DASlibs -DBMWlibs -DBNMRlibs
-DDummyUserFcn (identical list of 55 targets), and with -Dnexus / -DHAVE_HDF4.
ctest shows no regression at any step; no maxLH test fails in any of the three
NeXus configurations.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
+80
-15
@@ -1,10 +1,13 @@
|
||||
# - musrfit --- DKS -----------------------------------------------------------
|
||||
cmake_minimum_required(VERSION 3.17)
|
||||
|
||||
# cmake: use BoostConfig.cmake instead of FindBoost
|
||||
if (CMAKE_VERSION GREATER_EQUAL "3.3")
|
||||
# cmake: use BoostConfig.cmake instead of FindBoost.
|
||||
# CMP0167 only exists since cmake 3.30, hence guard with 'if (POLICY ...)'.
|
||||
# A version comparison must not be used here: 'CMAKE_VERSION GREATER_EQUAL 3.30'
|
||||
# is a *numeric* comparison and would wrongly fire on e.g. cmake 3.20.
|
||||
if (POLICY CMP0167)
|
||||
cmake_policy(SET CMP0167 NEW)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
project(musrfit VERSION 1.12.0 LANGUAGES C CXX)
|
||||
|
||||
@@ -18,6 +21,10 @@ include(GNUInstallDirs)
|
||||
#--- musrfit specific options -------------------------------------------------
|
||||
option(dks "build musrfit with DKS (GPU/MIC) support" ON)
|
||||
option(nexus "build optional NeXus support. Needed for ISIS" OFF)
|
||||
#--- 'HAVE_HDF4' is the name the C++ sources (PNeXus, PRunDataHandler,
|
||||
#--- dump_header, musrfit) and src/external/nexus/CMakeLists.txt already use,
|
||||
#--- hence keep it for the option as well.
|
||||
option(HAVE_HDF4 "in addition to HDF5, support the older HDF4 based NeXus files. Requires -Dnexus=1" OFF)
|
||||
option(ASlibs "build optional ASlibs" OFF)
|
||||
option(BMWlibs "build optional BMWlibs" OFF)
|
||||
option(BNMRlibs "build optional beta-NMR libs" OFF)
|
||||
@@ -42,8 +49,9 @@ endif ()
|
||||
|
||||
#--- perform some checks and generate the config.h ----------------------------
|
||||
|
||||
#--- the next two lines are needed that the math functions are found ----------
|
||||
set(CMAKE_REQUIRED_INCLUDES math.h)
|
||||
#--- the next line is needed that the math functions are found ----------------
|
||||
#--- (CMAKE_REQUIRED_INCLUDES expects *directories*, not header names, hence
|
||||
#--- it must not be used here.)
|
||||
set(CMAKE_REQUIRED_LIBRARIES m)
|
||||
|
||||
include(CheckTypeSize)
|
||||
@@ -72,6 +80,9 @@ if (${LONG_DOUBLE} GREATER ${DOUBLE})
|
||||
set(HAVE_LONG_DOUBLE_WIDER 1)
|
||||
endif (${LONG_DOUBLE} GREATER ${DOUBLE})
|
||||
|
||||
#--- do not leak the check settings into the find_package() calls below --------
|
||||
unset(CMAKE_REQUIRED_LIBRARIES)
|
||||
|
||||
#--- check for all the needed packages ----------------------------------------
|
||||
|
||||
#--- add path to my own find modules and other stuff
|
||||
@@ -84,11 +95,44 @@ find_package(PkgConfig REQUIRED)
|
||||
find_package(Git REQUIRED)
|
||||
|
||||
#--- check for ROOT -----------------------------------------------------------
|
||||
find_package(ROOT 6.16 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
|
||||
if (ROOT_mathmore_FOUND)
|
||||
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
|
||||
include(${ROOT_USE_FILE})
|
||||
endif (ROOT_mathmore_FOUND)
|
||||
#--- remember the compiler flags *before* ROOT's recommended flags are added,
|
||||
#--- so that the Qt applications, which do not use ROOT at all, can go back to
|
||||
#--- them (see src/musredit_qt6/CMakeLists.txt) --------------------------------
|
||||
set(MUSRFIT_CXX_FLAGS_NO_ROOT "${CMAKE_CXX_FLAGS}")
|
||||
|
||||
find_package(ROOT 6.18 REQUIRED COMPONENTS Gui MathMore Minuit2 XMLParser)
|
||||
|
||||
#--- Deliberately NOT 'include(${ROOT_USE_FILE})' here. That file
|
||||
#--- - overwrites CMAKE_CXX_STANDARD with ROOT's value, silently discarding
|
||||
#--- the setting made at the top of this file,
|
||||
#--- - calls link_directories(), which is not needed since ROOT_LIBRARIES
|
||||
#--- holds absolute library paths, and
|
||||
#--- - adds ROOT's include dirs / flags / definitions to *every* target of
|
||||
#--- the project, including the Qt applications.
|
||||
#--- ROOT itself states that CMAKE_CXX_FLAGS should not be touched, the flags
|
||||
#--- are only a recommendation. ROOTConfig.cmake already pulls in
|
||||
#--- RootMacros.cmake, i.e. root_generate_dictionary() is available. The guard
|
||||
#--- below is only there for ROOT versions which might not do so.
|
||||
if (NOT COMMAND root_generate_dictionary)
|
||||
include("${ROOT_CMAKE_DIR}/RootMacros.cmake")
|
||||
endif ()
|
||||
|
||||
#--- ROOT headers have to be compiled with at least the C++ standard ROOT was
|
||||
#--- built with, otherwise the ABI does not match. Raise ours if needed, but
|
||||
#--- never silently lower it. --------------------------------------------------
|
||||
if (ROOT_CXX_STANDARD AND ROOT_CXX_STANDARD GREATER CMAKE_CXX_STANDARD)
|
||||
message(STATUS "ROOT was built with C++${ROOT_CXX_STANDARD}, raising CMAKE_CXX_STANDARD accordingly.")
|
||||
set(CMAKE_CXX_STANDARD ${ROOT_CXX_STANDARD})
|
||||
endif ()
|
||||
|
||||
#--- ROOT's recommended compiler flags. Some of them are ABI relevant when
|
||||
#--- ROOT headers are used, e.g. -fsigned-char (char is unsigned by default on
|
||||
#--- aarch64) and -fsized-deallocation, hence they are kept for everything that
|
||||
#--- talks to ROOT. --------------------------------------------------------
|
||||
include_directories(SYSTEM ${ROOT_INCLUDE_DIRS})
|
||||
add_definitions(${ROOT_DEFINITIONS})
|
||||
string(APPEND CMAKE_CXX_FLAGS " ${ROOT_CXX_FLAGS}")
|
||||
string(APPEND CMAKE_C_FLAGS " ${ROOT_C_FLAGS}")
|
||||
|
||||
#--- the next check is need to set a flag, since root 6.24 (minuit2) breaks
|
||||
#--- the backwards compatibility. ---------------------------------------------
|
||||
@@ -195,9 +239,9 @@ if (qt_based_tools)
|
||||
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND)
|
||||
|
||||
# if Qt6, Qt5 and Qt4 is not found try Qt3. Hopefully you never reach this point
|
||||
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND Qt4_FOUND)
|
||||
if (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND NOT Qt4_FOUND)
|
||||
find_package(Qt3)
|
||||
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND Qt4_FOUND)
|
||||
endif (NOT Qt6Core_FOUND AND NOT Qt5Core_FOUND AND NOT Qt4_FOUND)
|
||||
endif (qt_version STREQUAL AUTO)
|
||||
|
||||
# check specifically for Qt6
|
||||
@@ -246,6 +290,10 @@ if (qt_based_tools)
|
||||
endif (qt_based_tools)
|
||||
|
||||
#--- if NeXus check also for HDF4 (optional), HDF5 ----------------------------
|
||||
if (HAVE_HDF4 AND NOT nexus)
|
||||
message(WARNING "HAVE_HDF4 only has an effect together with -Dnexus=1, it will be ignored.")
|
||||
endif ()
|
||||
|
||||
if (nexus)
|
||||
find_package(HDF5 COMPONENTS CXX REQUIRED)
|
||||
if (HAVE_HDF4)
|
||||
@@ -329,10 +377,21 @@ list(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_FULL_LIBDIR}
|
||||
if("${isSystemDir}" STREQUAL "-1")
|
||||
set(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_FULL_LIBDIR}")
|
||||
endif("${isSystemDir}" STREQUAL "-1")
|
||||
if (UNIX)
|
||||
if (UNIX AND NOT APPLE)
|
||||
set(rpath ${CMAKE_INSTALL_RPATH})
|
||||
string(APPEND rpath ";/usr/local/lib")
|
||||
set(CMAKE_INSTALL_RPATH "${rpath}")
|
||||
elseif (APPLE)
|
||||
#--- on macOS the 3rd party libs typically come from Homebrew, which lives in
|
||||
#--- /opt/homebrew (Apple silicon) or /usr/local (Intel) -------------------
|
||||
set(rpath ${CMAKE_INSTALL_RPATH})
|
||||
if (EXISTS "/opt/homebrew/lib")
|
||||
string(APPEND rpath ";/opt/homebrew/lib")
|
||||
endif ()
|
||||
if (EXISTS "/usr/local/lib")
|
||||
string(APPEND rpath ";/usr/local/lib")
|
||||
endif ()
|
||||
set(CMAKE_INSTALL_RPATH "${rpath}")
|
||||
endif ()
|
||||
|
||||
#--- propagate to the sub-directories -----------------------------------------
|
||||
@@ -434,7 +493,11 @@ message(" PSI-BIN : yes")
|
||||
message(" PSI-MDU : yes")
|
||||
message(" WKM (deprecated) : yes")
|
||||
if (nexus)
|
||||
message(" NeXus : yes")
|
||||
if (HAVE_HDF4)
|
||||
message(" NeXus : yes (HDF5 and HDF4)")
|
||||
else (HAVE_HDF4)
|
||||
message(" NeXus : yes (HDF5 only, -DHAVE_HDF4=1 adds HDF4)")
|
||||
endif (HAVE_HDF4)
|
||||
else (nexus)
|
||||
message(" NeXus : no")
|
||||
endif (nexus)
|
||||
@@ -536,7 +599,9 @@ configure_file(${CMAKE_SOURCE_DIR}/cmake/CPackOptions.cmake.in ${CMAKE_CURRENT_B
|
||||
set (CPACK_PROJECT_CONFIG_FILE "${PROJECT_BINARY_DIR}/CPackOptions.cmake")
|
||||
#set (CPACK_GENERATOR TGZ) # not use ZIP on UNIX as problem with symlinks
|
||||
#set (CPACK_SOURCE_GENERATOR TGZ) # not use ZIP on UNIX as problem with symlinks
|
||||
if (UNIX)
|
||||
#--- APPLE is UNIX as well, hence it needs to be excluded explicitly here,
|
||||
#--- otherwise cpack would try to build an RPM on macOS ------------------------
|
||||
if (UNIX AND NOT APPLE)
|
||||
set (CPACK_GENERATOR ${CPACK_GENERATOR};RPM)
|
||||
endif ()
|
||||
# Include of CPack must always be last
|
||||
|
||||
+10
-22
@@ -28,7 +28,6 @@ add_executable(addRun addRun.cpp)
|
||||
target_compile_options(addRun BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(addRun
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
@@ -39,18 +38,16 @@ add_executable(any2many any2many.cpp)
|
||||
target_compile_options(any2many BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(any2many
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(any2many ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(any2many ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} Boost::headers)
|
||||
|
||||
add_executable(dump_header dump_header.cpp)
|
||||
target_compile_options(dump_header BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(dump_header
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${HDF4_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${HDF5_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
@@ -62,18 +59,17 @@ target_include_directories(dump_header
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/external/mud/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/external/nexus>
|
||||
)
|
||||
target_link_libraries(dump_header ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(dump_header ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} Boost::headers)
|
||||
|
||||
add_executable(msr2data msr2data.cpp)
|
||||
target_compile_options(msr2data BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(msr2data
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(msr2data ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(msr2data ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} Boost::headers)
|
||||
|
||||
add_executable(msr2msr msr2msr.cpp classes/PStringUtils.cpp)
|
||||
target_include_directories(msr2msr
|
||||
@@ -87,28 +83,25 @@ target_compile_options(musrfit BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_
|
||||
target_include_directories(musrfit
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${DKS_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
if (OpenMP_CXX_FOUND)
|
||||
target_link_libraries(musrfit ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} OpenMP::OpenMP_CXX)
|
||||
target_link_libraries(musrfit ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} Boost::headers OpenMP::OpenMP_CXX)
|
||||
else ()
|
||||
target_link_libraries(musrfit ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(musrfit ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} Boost::headers)
|
||||
endif (OpenMP_CXX_FOUND)
|
||||
|
||||
add_executable(musrFT musrFT.cpp)
|
||||
target_compile_options(musrFT BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(musrFT
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(musrFT FFTW3::FFTW3 ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(musrFT FFTW3::FFTW3 ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} Boost::headers)
|
||||
|
||||
add_executable(musrRootValidation musrRootValidation.cpp)
|
||||
target_compile_options(musrRootValidation BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
@@ -117,33 +110,29 @@ target_include_directories(musrRootValidation
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${LIBXML2_INCLUDE_DIR}>
|
||||
)
|
||||
target_link_libraries(musrRootValidation ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} LibXml2::LibXml2)
|
||||
target_link_libraries(musrRootValidation ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} LibXml2::LibXml2 FFTW3::FFTW3)
|
||||
|
||||
add_executable(musrt0 musrt0.cpp)
|
||||
target_compile_options(musrt0 BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(musrt0
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(musrt0 ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(musrt0 ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} Boost::headers)
|
||||
|
||||
add_executable(musrview musrview.cpp)
|
||||
target_compile_options(musrview BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(musrview
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(musrview FFTW3::FFTW3 ${ROOT_LIBRARIES} ${MUSRFIT_LIBS})
|
||||
target_link_libraries(musrview FFTW3::FFTW3 ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} Boost::headers)
|
||||
|
||||
add_executable(write_musrRoot_runHeader write_musrRoot_runHeader.cpp)
|
||||
target_compile_options(write_musrRoot_runHeader BEFORE PRIVATE "-DHAVE_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
@@ -152,11 +141,10 @@ target_include_directories(write_musrRoot_runHeader
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${LIBXML2_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/external/MusrRoot>
|
||||
)
|
||||
target_link_libraries(write_musrRoot_runHeader ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} LibXml2::LibXml2)
|
||||
target_link_libraries(write_musrRoot_runHeader ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} LibXml2::LibXml2 FFTW3::FFTW3)
|
||||
|
||||
#--- ensure git-revision.h is regenerated before compiling --------------------
|
||||
if (IS_GIT_REPO)
|
||||
|
||||
@@ -6,7 +6,11 @@ set(MUSRFIT_INC ${CMAKE_SOURCE_DIR}/src/include)
|
||||
# Hence, target_include_directories cannot be used here because, targets are
|
||||
# setup only afterwards.
|
||||
include_directories(${MUSRFIT_INC})
|
||||
include_directories(SYSTEM ${FFTW3_INCLUDE})
|
||||
#--- note: FFTW3_INCLUDE is deliberately NOT added here. On a Homebrew based
|
||||
#--- macOS it is /opt/homebrew/include, i.e. the complete 3rd party header tree,
|
||||
#--- and a global include_directories() would put it in front of the headers of
|
||||
#--- every target below. The dictionaries below get it via their OPTIONS, and
|
||||
#--- everything else via the FFTW3::FFTW3 imported target. ---------------------
|
||||
|
||||
root_generate_dictionary(
|
||||
PFourierCanvasDict
|
||||
@@ -132,8 +136,6 @@ add_library(PMusr SHARED
|
||||
target_include_directories(
|
||||
PMusr SYSTEM BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${DKS_INCLUDE_DIR}>
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${HDF4_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${HDF5_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
@@ -182,7 +184,6 @@ target_include_directories(
|
||||
|
||||
target_include_directories(
|
||||
PRgeHandler BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
PUBLIC
|
||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||
|
||||
@@ -45,7 +45,6 @@ set_target_properties(PDepthProfile
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PDepthProfile BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../inc>
|
||||
PUBLIC
|
||||
|
||||
-1
@@ -44,7 +44,6 @@ add_library(PMagProximityFitter SHARED
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PMagProximityFitter BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
PUBLIC
|
||||
|
||||
Vendored
-1
@@ -52,7 +52,6 @@ add_library(PNL_PippardFitter SHARED
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PNL_PippardFitter BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
|
||||
+1
-2
@@ -63,7 +63,6 @@ add_executable(dump_nonlocal_field dump_nonlocal_field.cpp)
|
||||
target_compile_options(dump_nonlocal_field BEFORE PRIVATE "-DHAVE_CONFIG_H" "-DHAVE_DNLF_CONFIG_H" "${HAVE_GIT_REV_H}")
|
||||
target_include_directories(dump_nonlocal_field
|
||||
BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${ROOT_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}>
|
||||
$<BUILD_INTERFACE:${CMAKE_BINARY_DIR}/src>
|
||||
@@ -72,7 +71,7 @@ target_include_directories(dump_nonlocal_field
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/include>
|
||||
)
|
||||
target_link_libraries(dump_nonlocal_field ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} PNL_PippardFitter)
|
||||
target_link_libraries(dump_nonlocal_field ${ROOT_LIBRARIES} ${MUSRFIT_LIBS} PNL_PippardFitter Boost::headers)
|
||||
|
||||
#--- installation info --------------------------------------------------------
|
||||
install(
|
||||
|
||||
+1
-2
@@ -26,7 +26,6 @@ add_library(LineProfile SHARED
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
LineProfile BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
)
|
||||
@@ -38,7 +37,7 @@ set_target_properties(LineProfile
|
||||
)
|
||||
|
||||
#--- add library dependencies -------------------------------------------------
|
||||
target_link_libraries(LineProfile ${ROOT_LIBRARIES} PUserFcnBase)
|
||||
target_link_libraries(LineProfile ${ROOT_LIBRARIES} PUserFcnBase Boost::headers FFTW3::FFTW3)
|
||||
|
||||
#--- install libLineProfile solib ----------------------------------------------------
|
||||
install(TARGETS LineProfile EXPORT musrfitTargets DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||
|
||||
@@ -48,7 +48,6 @@ set_target_properties(CalcMeanFieldsLEM
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
CalcMeanFieldsLEM BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
$<BUILD_INTERFACE:${POFB_INC}>
|
||||
|
||||
@@ -82,7 +82,6 @@ set_target_properties(FitPofB
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
FitPofB BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}/src/external/TLemRunHeader>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
|
||||
-1
@@ -47,7 +47,6 @@ set_target_properties(GapIntegrals
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
GapIntegrals BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
||||
Vendored
-1
@@ -31,7 +31,6 @@ add_library(PGbGLF SHARED
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PGbGLF BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_SOURCE_DIR}>
|
||||
PUBLIC
|
||||
|
||||
-1
@@ -46,7 +46,6 @@ set_target_properties(LFRelaxation
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
LFRelaxation BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
||||
@@ -46,7 +46,6 @@ set_target_properties(PPhotoMeissner
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PPhotoMeissner BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${GSL_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${ROOT_INCLUDE_DIRS}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
|
||||
@@ -55,7 +55,6 @@ set_target_properties(PSpinValve
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
PSpinValve BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/../include>
|
||||
PUBLIC
|
||||
|
||||
-1
@@ -46,7 +46,6 @@ set_target_properties(ZFRelaxation
|
||||
#--- make sure that the include directory is found ----------------------------
|
||||
target_include_directories(
|
||||
ZFRelaxation BEFORE PRIVATE
|
||||
$<BUILD_INTERFACE:${FFTW3_INCLUDE}>
|
||||
$<BUILD_INTERFACE:${MUSRFIT_INC}>
|
||||
$<BUILD_INTERFACE:${BMW_TOOLS_INC}>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#--- musredit_qt5 for Qt > 5.0 ------------------------------------------------
|
||||
|
||||
#--- The Qt applications do not use ROOT (with the exception of the mupp
|
||||
#--- plotter, which pulls in what it needs itself). Drop ROOT's include dirs and
|
||||
#--- recommended compiler flags for this part of the tree, so that they cannot
|
||||
#--- interfere with the Qt build. Both settings are directory scoped and are
|
||||
#--- inherited by the sub-directories added below, nothing outside is affected.
|
||||
set(CMAKE_CXX_FLAGS "${MUSRFIT_CXX_FLAGS_NO_ROOT}")
|
||||
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "")
|
||||
|
||||
#--- create musrfit-info.h ----------------------------------------------------
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/musrfit-info.h.in
|
||||
|
||||
@@ -67,12 +67,13 @@ else (IS_GIT_REPO)
|
||||
set(HAVE_GIT_REV_H "")
|
||||
endif (IS_GIT_REPO)
|
||||
|
||||
#--- compiler option to workaround a little cast problem for some
|
||||
#--- boost/compiler combinations ----------------------------------------------
|
||||
#--- compiler option to workaround a little cast problem for some
|
||||
#--- boost/compiler combinations. -fpermissive is a GCC option, clang/AppleClang
|
||||
#--- silently ignore it, hence only hand it to GCC. ----------------------------
|
||||
target_compile_options(mupp
|
||||
PRIVATE
|
||||
"-fpermissive"
|
||||
"${HAVE_GIT_REV_H}"
|
||||
"$<$<CXX_COMPILER_ID:GNU>:-fpermissive>"
|
||||
"${HAVE_GIT_REV_H}"
|
||||
)
|
||||
|
||||
#--- add the variable related sources -----------------------------------------
|
||||
@@ -95,21 +96,28 @@ if (IS_GIT_REPO)
|
||||
endif (IS_GIT_REPO)
|
||||
|
||||
#--- if macOS make an app rather than just a command line executable ----------
|
||||
set_target_properties(mupp PROPERTIES
|
||||
VERSION ${mupp_VERSION}
|
||||
)
|
||||
if (APPLE)
|
||||
#--- do NOT set the VERSION property on a MACOSX_BUNDLE target: cmake would
|
||||
#--- name the binary in Contents/MacOS 'mupp-<version>' and only leave a
|
||||
#--- symlink 'mupp' next to it, which contradicts CFBundleExecutable and does
|
||||
#--- not survive zipping/codesigning. ---------------------------------------
|
||||
set_target_properties(mupp PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "mupp"
|
||||
MACOSX_BUNDLE_INFO_STRING "mupp is used to plot parameters from musrfit collections."
|
||||
MACOSX_BUNDLE_ICON_FILE "mupp.icns"
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${mupp_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${mupp_VERSION}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${mupp_VERSION}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.mupp"
|
||||
MACOSX_FRAMEWORK_IDENTIFIER ch.psi.mupp
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE "${RESOURCE_FILES}"
|
||||
)
|
||||
else (APPLE)
|
||||
set_target_properties(mupp PROPERTIES
|
||||
VERSION ${mupp_VERSION}
|
||||
)
|
||||
endif (APPLE)
|
||||
|
||||
#--- install ------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#--- mupp_plotter -------------------------------------------------------------
|
||||
message("-- Handle the plotter part of mupp")
|
||||
|
||||
#--- unlike the rest of musredit_qt5 the plotter *does* use ROOT, hence ROOT's
|
||||
#--- include dirs and recommended compiler flags are needed again here ---------
|
||||
include_directories(SYSTEM ${ROOT_INCLUDE_DIRS})
|
||||
string(APPEND CMAKE_CXX_FLAGS " ${ROOT_CXX_FLAGS}")
|
||||
|
||||
#--- instruct cmake NOT to run moc automatically when needed anymore ----------
|
||||
set(CMAKE_AUTOMOC OFF)
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_INFO_STRING "musrfit: musrStep allows to reset/set the initial step size of a msr-files."
|
||||
MACOSX_BUNDLE_ICON_FILE "musrStep.icns"
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musrStep"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
|
||||
@@ -67,6 +67,8 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_INFO_STRING "musrfit: musrWiz allows to create input msr-files if no templates are available."
|
||||
MACOSX_BUNDLE_ICON_FILE "musrWiz.icns"
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musrWiz"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
|
||||
@@ -67,7 +67,7 @@ set(musredit_ui
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
if (${CMAKE_HOST_SYSTEM_VERSION} GREATER_EQUAL "20.3.0")
|
||||
if (${CMAKE_HOST_SYSTEM_VERSION} VERSION_GREATER_EQUAL "20.3.0")
|
||||
set(macosx_icon_name musredit-bigsur.icns)
|
||||
else()
|
||||
set(macosx_icon_name musredit.icns)
|
||||
@@ -117,6 +117,8 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_INFO_STRING "musrfit: musredit simplifies the handling of the msr-files for uSR fitting."
|
||||
MACOSX_BUNDLE_ICON_FILE "${macosx_icon_name}"
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musredit"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
|
||||
@@ -1,5 +1,13 @@
|
||||
#--- musredit_qt6 for Qt > 6.0 ------------------------------------------------
|
||||
|
||||
#--- The Qt applications do not use ROOT (with the exception of the mupp
|
||||
#--- plotter, which pulls in what it needs itself). Drop ROOT's include dirs and
|
||||
#--- recommended compiler flags for this part of the tree, so that they cannot
|
||||
#--- interfere with the Qt build. Both settings are directory scoped and are
|
||||
#--- inherited by the sub-directories added below, nothing outside is affected.
|
||||
set(CMAKE_CXX_FLAGS "${MUSRFIT_CXX_FLAGS_NO_ROOT}")
|
||||
set_property(DIRECTORY PROPERTY INCLUDE_DIRECTORIES "")
|
||||
|
||||
#--- create musrfit-info.h ----------------------------------------------------
|
||||
configure_file(
|
||||
${CMAKE_SOURCE_DIR}/cmake/musrfit-info.h.in
|
||||
|
||||
@@ -68,10 +68,11 @@ else (IS_GIT_REPO)
|
||||
endif (IS_GIT_REPO)
|
||||
|
||||
#--- compiler option to workaround a little cast problem for some
|
||||
#--- boost/compiler combinations ----------------------------------------------
|
||||
#--- boost/compiler combinations. -fpermissive is a GCC option, clang/AppleClang
|
||||
#--- silently ignore it, hence only hand it to GCC. ----------------------------
|
||||
target_compile_options(mupp
|
||||
PRIVATE
|
||||
"-fpermissive"
|
||||
"$<$<CXX_COMPILER_ID:GNU>:-fpermissive>"
|
||||
"${HAVE_GIT_REV_H}"
|
||||
)
|
||||
|
||||
@@ -106,22 +107,29 @@ if (IS_GIT_REPO)
|
||||
endif (IS_GIT_REPO)
|
||||
|
||||
#--- if macOS make an app rather than just a command line executable ----------
|
||||
set_target_properties(mupp PROPERTIES
|
||||
VERSION ${mupp_VERSION}
|
||||
)
|
||||
if (APPLE)
|
||||
#--- do NOT set the VERSION property on a MACOSX_BUNDLE target: cmake would
|
||||
#--- name the binary in Contents/MacOS 'mupp-<version>' and only leave a
|
||||
#--- symlink 'mupp' next to it, which contradicts CFBundleExecutable and does
|
||||
#--- not survive zipping/codesigning. ---------------------------------------
|
||||
set_target_properties(mupp PROPERTIES
|
||||
MACOSX_BUNDLE TRUE
|
||||
MACOSX_BUNDLE_BUNDLE_NAME "mupp"
|
||||
MACOSX_BUNDLE_INFO_STRING "mupp is used to plot parameters from musrfit collections."
|
||||
MACOSX_BUNDLE_ICON_FILE "mupp.icns"
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${mupp_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${mupp_VERSION}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${mupp_VERSION}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.mupp"
|
||||
MACOSX_FRAMEWORK_IDENTIFIER ch.psi.mupp
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE "${RESOURCE_FILES}"
|
||||
INSTALL_RPATH "${Qt6_DIR}/../.."
|
||||
)
|
||||
else (APPLE)
|
||||
set_target_properties(mupp PROPERTIES
|
||||
VERSION ${mupp_VERSION}
|
||||
)
|
||||
endif (APPLE)
|
||||
|
||||
#--- install ------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,11 @@
|
||||
#--- mupp_plotter -------------------------------------------------------------
|
||||
message("-- Handle the plotter part of mupp")
|
||||
|
||||
#--- unlike the rest of musredit_qt6 the plotter *does* use ROOT, hence ROOT's
|
||||
#--- include dirs and recommended compiler flags are needed again here ---------
|
||||
include_directories(SYSTEM ${ROOT_INCLUDE_DIRS})
|
||||
string(APPEND CMAKE_CXX_FLAGS " ${ROOT_CXX_FLAGS}")
|
||||
|
||||
#--- instruct cmake NOT to run moc automatically when needed anymore ----------
|
||||
set(CMAKE_AUTOMOC OFF)
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_INFO_STRING "musrfit: musrStep allows to reset/set the initial step size of a msr-files."
|
||||
MACOSX_BUNDLE_ICON_FILE "musrStep.icns"
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musrStep"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
|
||||
@@ -67,6 +67,8 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_INFO_STRING "musrfit: musrWiz allows to create input msr-files if no templates are available."
|
||||
MACOSX_BUNDLE_ICON_FILE "musrWiz.icns"
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musrWiz"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
|
||||
@@ -68,7 +68,7 @@ set(musredit_ui
|
||||
)
|
||||
|
||||
if (APPLE)
|
||||
if (${CMAKE_HOST_SYSTEM_VERSION} GREATER_EQUAL "20.3.0")
|
||||
if (${CMAKE_HOST_SYSTEM_VERSION} VERSION_GREATER_EQUAL "20.3.0")
|
||||
set(macosx_icon_name musredit-bigsur.icns)
|
||||
else()
|
||||
set(macosx_icon_name musredit.icns)
|
||||
@@ -117,6 +117,8 @@ if (APPLE)
|
||||
MACOSX_BUNDLE_INFO_STRING "musrfit: musredit simplifies the handling of the msr-files for uSR fitting."
|
||||
MACOSX_BUNDLE_ICON_FILE "${macosx_icon_name}"
|
||||
MACOSX_BUNDLE_LONG_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
|
||||
MACOSX_BUNDLE_GUI_IDENTIFIER "ch.psi.lmu.musredit"
|
||||
MACOSX_BUNDLE_COPYRIGHT "Andreas Suter"
|
||||
RESOURCE ${macosx_icon}
|
||||
|
||||
@@ -25,12 +25,23 @@ add_maxLH_test(test-histo-ROOT-NPP test-histo-ROOT-NPP.msr 249.12)
|
||||
add_maxLH_test(test-histo-HAL9500 test-histo-HAL9500.msr 1286509.8)
|
||||
add_maxLH_test(test-histo-HAL9500-RRF test-histo-HAL9500-RRF.msr 22187.4)
|
||||
add_maxLH_test(test-histo-muMinus test-histo-muMinus.msr 238962.6)
|
||||
add_maxLH_test(test-histo-NeXus test-histo-NeXus.msr 3273.57)
|
||||
add_maxLH_test(test-histo-NeXus2 test-histo-NeXus2.msr 4228.9)
|
||||
|
||||
# asymmetry fits (chisq)
|
||||
add_maxLH_test(test-asy-PSI-BIN test-asy-PSI-BIN.msr 566.76)
|
||||
add_maxLH_test(test-asy-MUD test-asy-MUD.msr 133.96)
|
||||
add_maxLH_test(test-asy-NeXus2 test-asy-NeXus2.msr 1159.8)
|
||||
add_maxLH_test(test-asy-HAL9500-RRF test-asy-HAL9500-RRF.msr 7402.28)
|
||||
add_maxLH_test(test-asy-LF-BaB6 test-asy-LF-BaB6.msr 1911.88)
|
||||
|
||||
#--- NeXus based tests. These can only work if musrfit was built with
|
||||
#--- -Dnexus=1, otherwise the msr-files cannot be read at all -----------------
|
||||
if (nexus)
|
||||
# NeXus IDF V2 / HDF5
|
||||
add_maxLH_test(test-histo-NeXus2 test-histo-NeXus2.msr 4228.9)
|
||||
add_maxLH_test(test-asy-NeXus2 test-asy-NeXus2.msr 1159.8)
|
||||
|
||||
# the ISIS example data of this one is an HDF4 file, hence it additionally
|
||||
# needs -DHAVE_HDF4=1
|
||||
if (HAVE_HDF4)
|
||||
add_maxLH_test(test-histo-NeXus test-histo-NeXus.msr 3273.57)
|
||||
endif (HAVE_HDF4)
|
||||
endif (nexus)
|
||||
|
||||
@@ -48,14 +48,6 @@ add_musrview_test(musrview-histo-muMinus test-histo-muMinus.msr
|
||||
add_musrview_test(musrview-histo-muMinus-fourier test-histo-muMinus.msr -f)
|
||||
add_musrview_test(musrview-histo-muMinus-fourier-avg test-histo-muMinus.msr -f -a)
|
||||
|
||||
add_musrview_test(musrview-histo-NeXus test-histo-NeXus.msr)
|
||||
add_musrview_test(musrview-histo-NeXus-fourier test-histo-NeXus.msr -f)
|
||||
add_musrview_test(musrview-histo-NeXus-fourier-avg test-histo-NeXus.msr -f -a)
|
||||
|
||||
add_musrview_test(musrview-histo-NeXus2 test-histo-NeXus2.msr)
|
||||
add_musrview_test(musrview-histo-NeXus2-fourier test-histo-NeXus2.msr -f)
|
||||
add_musrview_test(musrview-histo-NeXus2-fourier-avg test-histo-NeXus2.msr -f -a)
|
||||
|
||||
# asymmetry fits
|
||||
add_musrview_test(musrview-asy-PSI-BIN test-asy-PSI-BIN.msr)
|
||||
add_musrview_test(musrview-asy-PSI-BIN-fourier test-asy-PSI-BIN.msr -f)
|
||||
@@ -65,10 +57,6 @@ add_musrview_test(musrview-asy-MUD test-asy-MUD.msr)
|
||||
add_musrview_test(musrview-asy-MUD-fourier test-asy-MUD.msr -f)
|
||||
add_musrview_test(musrview-asy-MUD-fourier-avg test-asy-MUD.msr -f -a)
|
||||
|
||||
add_musrview_test(musrview-asy-NeXus2 test-asy-NeXus2.msr)
|
||||
add_musrview_test(musrview-asy-NeXus2-fourier test-asy-NeXus2.msr -f)
|
||||
add_musrview_test(musrview-asy-NeXus2-fourier-avg test-asy-NeXus2.msr -f -a)
|
||||
|
||||
add_musrview_test(musrview-asy-HAL9500-RRF test-asy-HAL9500-RRF.msr)
|
||||
add_musrview_test(musrview-asy-HAL9500-RRF-fourier test-asy-HAL9500-RRF.msr -f)
|
||||
add_musrview_test(musrview-asy-HAL9500-RRF-fourier-avg test-asy-HAL9500-RRF.msr -f -a)
|
||||
@@ -77,6 +65,27 @@ add_musrview_test(musrview-asy-LF-BaB6 test-asy-LF-BaB6.msr)
|
||||
add_musrview_test(musrview-asy-LF-BaB6-fourier test-asy-LF-BaB6.msr -f)
|
||||
add_musrview_test(musrview-asy-LF-BaB6-fourier-avg test-asy-LF-BaB6.msr -f -a)
|
||||
|
||||
#--- NeXus based tests. These can only work if musrfit was built with
|
||||
#--- -Dnexus=1, otherwise the msr-files cannot be read at all -----------------
|
||||
if (nexus)
|
||||
# the ISIS example data of this one is an HDF4 file, hence it additionally
|
||||
# needs -DHAVE_HDF4=1
|
||||
if (HAVE_HDF4)
|
||||
add_musrview_test(musrview-histo-NeXus test-histo-NeXus.msr)
|
||||
add_musrview_test(musrview-histo-NeXus-fourier test-histo-NeXus.msr -f)
|
||||
add_musrview_test(musrview-histo-NeXus-fourier-avg test-histo-NeXus.msr -f -a)
|
||||
endif (HAVE_HDF4)
|
||||
|
||||
# NeXus IDF V2 / HDF5
|
||||
add_musrview_test(musrview-histo-NeXus2 test-histo-NeXus2.msr)
|
||||
add_musrview_test(musrview-histo-NeXus2-fourier test-histo-NeXus2.msr -f)
|
||||
add_musrview_test(musrview-histo-NeXus2-fourier-avg test-histo-NeXus2.msr -f -a)
|
||||
|
||||
add_musrview_test(musrview-asy-NeXus2 test-asy-NeXus2.msr)
|
||||
add_musrview_test(musrview-asy-NeXus2-fourier test-asy-NeXus2.msr -f)
|
||||
add_musrview_test(musrview-asy-NeXus2-fourier-avg test-asy-NeXus2.msr -f -a)
|
||||
endif (nexus)
|
||||
|
||||
#--- doc/examples/ViewOpts tests ----------------------------------------------
|
||||
|
||||
add_musrview_test(musrview-asy-PSI-BIN-range ViewOpts/test-asy-PSI-BIN-range.msr)
|
||||
|
||||
Reference in New Issue
Block a user