Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
553756f
NeXus output on native HDF5, replacing the frozen napi
willend Oct 22, 2026
fe94055
Build: NeXus support needs HDF5 only, not libNeXus
willend Oct 22, 2026
0caacc3
mccode-r.h.in: drop _getcomp_type/_getcomp_rotation prototypes
willend Oct 22, 2026
cd1761b
Add NeXus output regression test (McStas and McXtrace)
willend Oct 22, 2026
1e3c367
Merge upstream main into nexus-native-hdf5
willend Oct 23, 2026
92cf64e
Merge branch 'main' into nexus-native-hdf5
willend Oct 26, 2026
04a9afd
Merge branch 'main' into nexus-native-hdf5
willend Oct 27, 2026
1318d48
Drop libNeXus from dependencies, devel tools, CI, toolchains and docs
willend Oct 27, 2026
2698430
CI: draft FreeBSD source-build workflow (McStas + McXtrace)
willend Oct 27, 2026
5fccbc8
CI freebsd: install Python modules by port origin (py311-* gone from …
willend Oct 27, 2026
620b274
CI freebsd: add py-psutil (imported by mcrun)
willend Oct 27, 2026
06445fc
CI freebsd: MCCODE_CFLAGS without -flto (mpicc links with binutils ld)
willend Oct 27, 2026
c604f34
CI freebsd: MPI via base cc + mpich paths instead of mpicc; keep defa…
willend Oct 27, 2026
9b0aaf1
CI freebsd: mcrun -y (use default instrument parameters)
willend Oct 27, 2026
15b3199
Add -D_XOPEN_SOURCE=700 to default MCCODE_CFLAGS and BSD toolchains
willend Oct 27, 2026
3a01e52
Add -D_XOPEN_SOURCE=700 to MCCODE_CFLAGS on FreeBSD only
willend Oct 27, 2026
fcc70f8
CI freebsd: basictest-style tests and artifacts
willend Oct 27, 2026
de80a74
CI freebsd: pip --user MCPL and NCrystal, re-enable their basictest i…
willend Oct 27, 2026
e434b20
CI freebsd: GSL for ISIS_CRISP; skip OpenMPI-only SIGTERM check with …
willend Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
134 changes: 134 additions & 0 deletions .github/workflows/freebsd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,134 @@
name: freebsd

# Source build of McStas/McXtrace in a FreeBSD VM, after the approach in
# mctools/mcpl and mctools/ncrystal (.github/workflows/freebsd.yml).
# Tests follow {mcstas,mcxtrace}-basictest.yml (classic cogen, no KDSource/xraylib),
# artifacts use their naming so they can sit next to the other platforms' output.
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '30 22 * * 0' # 22:30 every Sunday
workflow_dispatch:

jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- flavor: mcstas
build: BUILD_MCSTAS
mcrun: mcrun
mctest: mctest
mpilists: Tests_monitors
instr: BNL_H8,ISIS_CRISP,templateSANS_Mantid,NCrystal_example,ESS_BEER_MCPL,Test_MCPL_input,Test_MCPL_output,Masked_ESS_butterfly_image
- flavor: mcxtrace
build: BUILD_MCXTRACE
mcrun: mxrun
mctest: mxtest
mpilists: Tests
instr: JJ_SAXS,ESRF_BM29,Test_MCPL_input,Test_MCPL_output
name: freebsd.${{ matrix.flavor }}
runs-on: ubuntu-latest
env:
LABEL: ${{ matrix.flavor }}-classic.freebsd.freebsd-14.2.cc.mpich.python-pkg
steps:
- name: Checkout
uses: actions/checkout@v6
with:
path: src

- name: FreeBSD
uses: cross-platform-actions/[email protected]
with:
operating_system: freebsd
version: '14.2'
run: |
set -eux
# FreeBSD's clang does not search /usr/local, so GSL and HDF5 dirs are passed explicitly.
# mpich, not openmpi: the openmpi pkg keeps mpicc/mpirun outside PATH.
# MPI builds use base cc + mpich paths, not mpich's mpicc: mpicc links with binutils ld,
# which lacks LLVMgold.so for the -flto that cmake probed with cc/lld.
# Python modules by port origin: follows the default Python flavour (pyXYZ-) on pkg updates.
sudo pkg install -y cmake bison flex gsl hdf5 mpich python3 devel/py-pip devel/py-pyyaml devel/py-ply sysutils/py-psutil math/py-numpy science/py-h5py
# MCPL and NCrystal from PyPI (sdist builds, as in their own FreeBSD CI); McCode finds
# them at instrument compile time via mcpl-config / ncrystal-config on PATH.
python3 -mpip install --user mcpl ncrystal
PATH="$HOME/.local/bin:$PATH"
export PATH
mcpl-config --show buildflags
ncrystal-config --show buildflags
cmake -S ./src -B ./build \
-DCMAKE_INSTALL_PREFIX=$PWD/install \
-DCMAKE_BUILD_TYPE=Release \
-DMCVERSION="3.99.99" \
-DMCCODE_BUILD_CONDA_PKG=OFF \
-DMCCODE_USE_LEGACY_DESTINATIONS=OFF \
-DBUILD_SHARED_LIBS=ON \
-DCMAKE_INSTALL_LIBDIR=lib \
-D${{ matrix.build }}=ON \
-DBUILD_TOOLS=ON \
-DENABLE_COMPONENTS=ON \
-DENSURE_MCPL=OFF \
-DENSURE_NCRYSTAL=OFF \
-DENABLE_CIF2HKL=OFF \
-DENABLE_NEUTRONICS=OFF \
-DGSLFLAGS="-I/usr/local/include -Wl,-rpath,/usr/local/lib -L/usr/local/lib -lgsl -lgslcblas" \
-DNEXUSLIB=/usr/local/lib \
-DNEXUSINCLUDE=/usr/local/include \
-DMPICC=cc \
-DMPILIBDIR=/usr/local/lib \
-DMPIINCLUDEDIR=/usr/local/include
cmake --build ./build --config Release --parallel 2
cmake --install ./build --config Release
PATH="$PWD/install/bin:$PATH"
export PATH
cat install/share/${{ matrix.flavor }}/tools/Python/mccodelib/mccode_config.json
${{ matrix.flavor }} --version
# RNG test (same expected checksum as the basictests)
${{ matrix.mctest }} --verbose --noplots --instr=Test_RNG_rand01 --testdir=run_rngtest --suffix=classic_freebsd --uid=freebsd
SUM=$(find run_rngtest -name rngout.dat | xargs -n1 grep -v \# | md5 -q)
test "$SUM" = "6c203d69205b0656c1391555e6068c93"
# Basic tests
${{ matrix.mctest }} --verbose --noplots --mpi=2 --instr=${{ matrix.instr }} --testdir=run_basictests --suffix=classic_freebsd_cc_mpich --uid=freebsd
# MPI event-list, NeXus output and mcplot loader regression tests.
# No SIGTERM check: the runtime installs its sighandler with OpenMPI only (MPICH uses signals).
python3 src/${{ matrix.flavor }}-comps/examples/${{ matrix.mpilists }}/Test_Monitor_nD_list_MPI/test_mpi_lists.py --np 2 --mcrun ${{ matrix.mcrun }} --workdir run_mpilists --sigterm-ncount 0
python3 src/${{ matrix.flavor }}-comps/examples/Tests_other/Test_NeXus_output/test_nexus_output.py --np 2 --mcrun ${{ matrix.mcrun }} --workdir run_nexusoutput
python3 src/${{ matrix.flavor }}-comps/examples/Tests_other/Test_mcplot_loader/test_mcplot_loader.py --mcrun ${{ matrix.mcrun }} --workdir run_mcplotloader

# The VM syncs the work dir back to the host on teardown, also after a failure
- name: 'Tar output files'
if: always()
run: |
set -eux
ls | grep run_ | xargs -n1 ./src/devel/bin/mccode-simdir-cleanfiles -d
tar cvfz ${LABEL}_output.tgz run_*

- name: 'Upload Artifact'
uses: actions/upload-artifact@v6
if: always()
with:
name: ${{ matrix.flavor }}-artefacts-classic.freebsd.freebsd-14.2.cc.mpich.python-pkg
path: ${{ env.LABEL }}_output.tgz

- name: 'Tar logs of failed tests'
if: always()
run: |
set -eux
{ find run_* -name '*.failed' 2>/dev/null || true
grep -rl --include='*.json' --exclude='testresults_*' '"failed": true' run_* 2>/dev/null || true
} | sed 's#/[^/]*$##' | sort -u | while read -r d; do
find "$d" -maxdepth 1 -type f \( -name '*.txt' -o -name '*.failed' -o -name '*.json' \)
done > failed_logs.txt
if [ -s failed_logs.txt ]; then tar cvfz ${LABEL}_failedlogs.tgz -T failed_logs.txt; fi

- name: 'Upload failed-test logs'
uses: actions/upload-artifact@v6
if: always()
with:
name: ${{ matrix.flavor }}-failedlogs-classic.freebsd.freebsd-14.2.cc.mpich.python-pkg
path: ${{ env.LABEL }}_failedlogs.tgz
if-no-files-found: ignore
5 changes: 2 additions & 3 deletions .github/workflows/mcstas-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ jobs:
id: setup-linux
if: matrix.method == 'source' && runner.os == 'Linux'
run: |
sudo apt -y install libgsl-dev libnexus-dev
sudo apt -y install libgsl-dev libhdf5-dev

- name: Setup (macOS, source build)
id: setup-macos
if: matrix.method == 'source' && runner.os == 'macOS'
run: |
brew install bison flex gfortran gsl homebrew/science/nexusformat
brew install bison flex gfortran gsl hdf5

- name: Setup (Windows, source build)
id: setup-Windows
Expand Down Expand Up @@ -161,7 +161,6 @@ jobs:
if [ "$RUNNER_OS" == "macOS" ] && [ -f "/opt/homebrew/opt/flex/bin/flex" ]; then export HOMEBRW="/opt/homebrew/opt"; export GSLFLAGS="-lgsl -lgslcblas -L/opt/homebrew/lib -I/opt/homebrew/include"; fi
if [ "$RUNNER_OS" == "macOS" ] && [ -f "/usr/local/opt/flex/bin/flex" ]; then export HOMEBRW="/usr/local/opt"; export GSLFLAGS="-lgsl -lgslcblas -L/usr/local/lib -I/usr/local/include"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/flex/bin/flex -DCMAKE_Fortran_COMPILER=${HOMEBRW}/gfortran/bin/gfortran"; fi
if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi
if [ "$RUNNER_OS" == "Windows" ]; then export MPIINC=`cygpath -m -s "${MSMPI_INC}"`; export MPILIB=`cygpath -m -s "${MSMPI_LIB64}"`; export EXTRA_ARGS_FOR_CMAKE="-DMPILIBDIR=${MPILIB} -DMPIINCLUDEDIR=${MPIINC}"; fi
cmake \
-DCMAKE_INSTALL_PREFIX=../install_mcstas \
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/mcxtrace-basictest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
id: setup-linux
if: matrix.method == 'source' && runner.os == 'Linux'
run: |
sudo apt -y install libgsl-dev libxrl-dev libnexus-dev
sudo apt -y install libgsl-dev libxrl-dev libhdf5-dev

- name: Setup (macOS, source build)
id: setup-macos
Expand All @@ -95,7 +95,7 @@ jobs:
# cause build-issues. Will soon port basictest scripts to conda
# for Windows/Linux
run: |
brew install bison flex gfortran gsl
brew install bison flex gfortran gsl hdf5
#if [ "${{ matrix.os }}" != "macos-15" ];
#then
# brew tap tschoonj/tap
Expand Down Expand Up @@ -169,7 +169,6 @@ jobs:
if [ "$RUNNER_OS" == "macOS" ] && [ -f "/opt/homebrew/opt/flex/bin/flex" ]; then export HOMEBRW="/opt/homebrew/opt"; export GSLFLAGS="-lgsl -lgslcblas -L/opt/homebrew/lib -I/opt/homebrew/include"; export XRLFLAGS="-lxrl -L/opt/homebrew/lib -I/opt/homebrew/include"; fi
if [ "$RUNNER_OS" == "macOS" ] && [ -f "/usr/local/opt/flex/bin/flex" ]; then export HOMEBRW="/usr/local/opt"; export GSLFLAGS="-lgsl -lgslcblas -L/usr/local/lib -I/usr/local/include"; export XRLFLAGS="-lxrl -L/usr/local/lib -I/usr/local/include"; fi
if [ "$RUNNER_OS" == "macOS" ]; then export EXTRA_ARGS_FOR_CMAKE="-DBISON_EXECUTABLE=${HOMEBRW}/bison/bin/bison -DFLEX_EXECUTABLE=${HOMEBRW}/flex/bin/flex -DCMAKE_Fortran_COMPILER=${HOMEBRW}/gfortran/bin/gfortran"; fi
if [ "$RUNNER_OS" == "Linux" ]; then export EXTRA_ARGS_FOR_CMAKE="-DNEXUSLIB=/usr/lib -DNEXUSINCLUDE=/usr/include/nexus"; fi
if [ "$RUNNER_OS" == "Windows" ]; then export MPIINC=`cygpath -m -s "${MSMPI_INC}"`; export MPILIB=`cygpath -m -s "${MSMPI_LIB64}"`; export EXTRA_ARGS_FOR_CMAKE="-DMPILIBDIR=${MPILIB} -DMPIINCLUDEDIR=${MPIINC}"; fi
cmake \
-DCMAKE_INSTALL_PREFIX=../install_mcxtrace \
Expand Down
44 changes: 0 additions & 44 deletions 3rdparty/nexus-package/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion 3rdparty/nexus-package/cmake

This file was deleted.

1 change: 0 additions & 1 deletion 3rdparty/nexus-package/nexus-code

This file was deleted.

10 changes: 0 additions & 10 deletions 3rdparty/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,6 @@ else
git clone https://github.com/mctools/ncrystal.git
fi

if [ -d nexus-code ]; then
echo Updating existing NeXus clone
cd nexus-code
git pull
cd ..
else
echo Cloning NeXus
git clone https://github.com/nexusformat/code nexus-code
fi

if [ -d xraylib ]; then
echo Updating existing xraylib clone
cd xraylib
Expand Down
1 change: 0 additions & 1 deletion buildscripts/build_pkg_ghostbsd
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,4 @@ export MCINSTALL_PREFIX=/usr/local

./mkdist mcstas-ncrystal ${1} 3rdparty/ncrystal-package "" ghostbsd "" -- pkg
./mkdist mcstas-mcpl ${1} 3rdparty/mcpl-package "" ghostbsd "" -- pkg
./mkdist mcstas-nexus ${1} 3rdparty/nexus-package "" ghostbsd "" -- pkg

2 changes: 1 addition & 1 deletion cmake/Modules/InstallMCCODE.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ macro(installMCCODE)

# update definitions to match choices
if (USE_NEXUS)
AppendDef(HAVE_NEXUS="-DUSE_NEXUS -lNeXus")
AppendDef(HAVE_NEXUS="-DUSE_NEXUS -lhdf5")
AppendDef(USE_NEXUS)
endif()

Expand Down
6 changes: 0 additions & 6 deletions cmake/Modules/MCUtil.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ macro(setupMCCODE FLAVOR)
set(WINDOWS true)
endif()

# Set Nexus linking flag
if(USE_NEXUS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -lNeXus")
set(CMAKE_C_LFLAGS "${CMAKE_C_LFLAGS} -lNeXus")
endif()

# Set 32-bit flags
if(ARCH EQUAL "i386")
set(CMAKE_C_FLAGS "-m32")
Expand Down
14 changes: 9 additions & 5 deletions cmake/Modules/PlatformDefaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,17 @@ function( detect_platform_variables resultvarname )
provide_var( MPICC )


#NeXus-flags:
#NeXus-flags: NeXus output is written with HDF5 (NEXUSLIB/NEXUSINCLUDE: where libhdf5 and hdf5.h are)
if ( NOT NEXUSFLAGS )
set(NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lNeXus -lhdf5")#?? should probably have another value
set(NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lhdf5")
if ( MCCODE_BUILD_CONDA_PKG )
set( NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -I\$\{CONDA_PREFIX\}/include/nexus -I\$\{CONDA_PREFIX\}/include -Wl,-rpath,$\{CONDA_PREFIX\}/lib -L\$\{CONDA_PREFIX\}/lib -lNeXus -lhdf5" )
set( NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -I\$\{CONDA_PREFIX\}/include -Wl,-rpath,$\{CONDA_PREFIX\}/lib -L\$\{CONDA_PREFIX\}/lib -lhdf5" )
endif()
if ( WINDOWS )
if ( "${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC" )
set( NEXUSFLAGS " /DUSE_NEXUS /DNX_COMPRESSION=NX_COMP_LZW_LVL1 /DH5_BUILT_AS_DYNAMIC_LIB /I\$\{CONDA_PREFIX\}/Library/include/nexus /I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib NeXus.lib hdf5.lib" )
set( NEXUSFLAGS " /DUSE_NEXUS /DNX_COMPRESSION=NX_COMP_LZW_LVL1 /DH5_BUILT_AS_DYNAMIC_LIB /I\$\{CONDA_PREFIX\}/Library/include /link /LIBPATH:\$\{CONDA_PREFIX\}/Library/lib hdf5.lib" )
else()
set( NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -DH5_BUILT_AS_DYNAMIC_LIB -I\$\{CONDA_PREFIX\}/Library/include/nexus -I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib -lNeXus -lhdf5" )
set( NEXUSFLAGS "-DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -DH5_BUILT_AS_DYNAMIC_LIB -I\$\{CONDA_PREFIX\}/Library/include -Wl,-rpath,$\{CONDA_PREFIX\}/Library/lib -L\$\{CONDA_PREFIX\}/Library/lib -lhdf5" )
endif()
endif()
if ( NEXUSLIB )
Expand Down Expand Up @@ -261,6 +261,10 @@ function( detect_platform_variables resultvarname )
if ( DARWIN )
set(MCCODE_CFLAGS "${MCCODE_CFLAGS} -D_DARWIN_C_SOURCE")
endif()
if ( CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" )
#_POSIX_C_SOURCE (set in generated code) hides XSI, e.g. gettimeofday, on FreeBSD
set(MCCODE_CFLAGS "${MCCODE_CFLAGS} -D_XOPEN_SOURCE=700")
endif()
if ( WINDOWS )
if ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
if ( MCCODE_BUILD_CONDA_PKG )
Expand Down
6 changes: 2 additions & 4 deletions cmake/toolchains/deb32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ set(MPICC "mpicc")
set(MPILIB "mpi")
set(OACCFLAGS "-fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC")
set(MPIRUN "mpirun")
set(NEXUSLIB "/usr/lib")
set(NEXUSINCLUDE "/usr/include/nexus")
# Packages are built before libnexus-dev/libhdf5-dev are installed: set the
# Packages are built before libhdf5-dev is installed: set the
# full flags. Debian's serial HDF5 is in /usr/include/hdf5/serial, linked as libhdf5_serial
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lNeXus -lhdf5_serial -I/usr/include/nexus -I/usr/include/hdf5/serial")
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lhdf5_serial -I/usr/include/hdf5/serial")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(EDITOR "gedit")
6 changes: 2 additions & 4 deletions cmake/toolchains/deb64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ set(MPICC "mpicc")
set(OACCFLAGS "-fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC")
set(MPILIB "mpi")
set(MPIRUN "mpirun")
set(NEXUSLIB "/usr/lib")
set(NEXUSINCLUDE "/usr/include/nexus")
# Packages are built before libnexus-dev/libhdf5-dev are installed: set the
# Packages are built before libhdf5-dev is installed: set the
# full flags. Debian's serial HDF5 is in /usr/include/hdf5/serial, linked as libhdf5_serial
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lNeXus -lhdf5_serial -I/usr/include/nexus -I/usr/include/hdf5/serial")
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lhdf5_serial -I/usr/include/hdf5/serial")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(EDITOR "gedit")
6 changes: 2 additions & 4 deletions cmake/toolchains/deb64arm.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ set(MPICC "mpicc")
set(MPILIB "mpi")
set(OACCFLAGS "-fast -Minfo=accel -acc=gpu -gpu=managed -DOPENACC")
set(MPIRUN "mpirun")
set(NEXUSLIB "/usr/lib")
set(NEXUSINCLUDE "/usr/include/nexus")
# Packages are built before libnexus-dev/libhdf5-dev are installed: set the
# Packages are built before libhdf5-dev is installed: set the
# full flags. Debian's serial HDF5 is in /usr/include/hdf5/serial, linked as libhdf5_serial
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lNeXus -lhdf5_serial -I/usr/include/nexus -I/usr/include/hdf5/serial")
set(NEXUSFLAGS "-Wl,-rpath,/usr/lib -L/usr/lib -DUSE_NEXUS -DNX_COMPRESSION=NX_COMP_LZW_LVL1 -lhdf5_serial -I/usr/include/hdf5/serial")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(EDITOR "gedit")
2 changes: 1 addition & 1 deletion cmake/toolchains/freebsd32.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ set(TOOLS_CC "clang")
set(MPICC "mpicc")
set(MPILIB "mpi")
set(MPIRUN "mpirun")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -D_XOPEN_SOURCE=700 -std=c99 -lm")
set(EDITOR "gedit")
2 changes: 1 addition & 1 deletion cmake/toolchains/freebsd64.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ set(TOOLS_CC "clang")
set(MPICC "mpicc")
set(MPIRUN "mpirun")
set(MPILIB "mpi")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -D_XOPEN_SOURCE=700 -std=c99 -lm")
set(EDITOR "gedit")
2 changes: 1 addition & 1 deletion cmake/toolchains/ghostbsd.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ set(TOOLS_CC "clang")
set(MPICC "mpicc")
set(MPIRUN "mpirun")
set(MPILIB "mpi")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -std=c99 -lm")
set(MCCODE_CFLAGS "-fno-PIC -fPIE -flto -O3 -mtune=native -march=native -fno-math-errno -ftree-vectorize -g -DNDEBUG -D_POSIX_SOURCE -D_XOPEN_SOURCE=700 -std=c99 -lm")
set(EDITOR "gedit")
2 changes: 1 addition & 1 deletion cmake/toolchains/mac-silicon.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ set(XRLFLAGS "-IGETPATH(miniconda3/include) -Wl,-rpath,GETPATH(miniconda3/lib) -
set(MPIRUN "mpirun")
set(MPILIB "mpi")
set(NEXUSLIB "GETPATH(miniconda3/lib)")
set(NEXUSINCLUDE "GETPATH(miniconda3/include/nexus)")
set(NEXUSINCLUDE "GETPATH(miniconda3/include)")
set(MCCODE_CFLAGS "-g -O2 -DNDEBUG -lm -std=c99")
set(EDITOR "open")
2 changes: 1 addition & 1 deletion cmake/toolchains/mac.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@ set(XRLFLAGS "-IGETPATH(miniconda3/include) -Wl,-rpath,GETPATH(miniconda3/lib) -
set(MPIRUN "mpirun")
set(MPILIB "mpi")
set(NEXUSLIB "GETPATH(miniconda3/lib)")
set(NEXUSINCLUDE "GETPATH(miniconda3/include/nexus)")
set(NEXUSINCLUDE "GETPATH(miniconda3/include)")
set(MCCODE_CFLAGS "-g -O2 -DNDEBUG -lm -std=c99")
set(EDITOR "open")
Loading
Loading