Allow builds without MPI with -DUSE_MPI=OFF
This commit is contained in:
parent
6eead7e28e
commit
171e439bd4
@ -21,6 +21,13 @@ build:rt-tests:
|
|||||||
script:
|
script:
|
||||||
- nix build -L --tarball-ttl 0 --file nix/rt.nix bsc.ovni-rt
|
- nix build -L --tarball-ttl 0 --file nix/rt.nix bsc.ovni-rt
|
||||||
|
|
||||||
|
build:no-mpi:
|
||||||
|
stage: build
|
||||||
|
tags:
|
||||||
|
- nix
|
||||||
|
script:
|
||||||
|
- nix build -L --tarball-ttl 0 --file nix/rt.nix bsc.ovni-nompi
|
||||||
|
|
||||||
build:old-gcc:
|
build:old-gcc:
|
||||||
stage: build
|
stage: build
|
||||||
tags:
|
tags:
|
||||||
|
@ -155,6 +155,12 @@ let
|
|||||||
export NODES_HOME="${last.nodes}"
|
export NODES_HOME="${last.nodes}"
|
||||||
'';
|
'';
|
||||||
});
|
});
|
||||||
|
|
||||||
|
ovni-nompi = last.ovni.overrideAttrs (old: {
|
||||||
|
buildInputs = pkgs.lib.filter (x: x != last.mpi ) old.buildInputs;
|
||||||
|
cmakeFlags = old.cmakeFlags ++ [ "-DUSE_MPI=OFF" ];
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
in
|
in
|
||||||
|
@ -66,14 +66,19 @@ target_link_libraries(ovnidump emu parson-static ovni-static)
|
|||||||
add_executable(ovnisort ovnisort.c)
|
add_executable(ovnisort ovnisort.c)
|
||||||
target_link_libraries(ovnisort emu parson-static ovni-static)
|
target_link_libraries(ovnisort emu parson-static ovni-static)
|
||||||
|
|
||||||
|
set(USE_MPI ON CACHE BOOL "Use MPI (required by ovnisync)")
|
||||||
|
if(USE_MPI)
|
||||||
# Use <PackageName>_ROOT variables if available, commonly used by MPI
|
# Use <PackageName>_ROOT variables if available, commonly used by MPI
|
||||||
# installations
|
# installations
|
||||||
if(POLICY CMP0074)
|
if(POLICY CMP0074)
|
||||||
cmake_policy(SET CMP0074 NEW)
|
cmake_policy(SET CMP0074 NEW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(MPI REQUIRED)
|
find_package(MPI REQUIRED)
|
||||||
add_executable(ovnisync ovnisync.c)
|
add_executable(ovnisync ovnisync.c)
|
||||||
target_link_libraries(ovnisync m MPI::MPI_C)
|
target_link_libraries(ovnisync m MPI::MPI_C)
|
||||||
|
install(TARGETS ovnisync RUNTIME DESTINATION bin)
|
||||||
|
else()
|
||||||
|
message(STATUS "Disabling ovnisync as MPI is disabled")
|
||||||
|
endif()
|
||||||
|
|
||||||
install(TARGETS ovniemu ovnidump ovnisync ovnisort RUNTIME DESTINATION bin)
|
install(TARGETS ovniemu ovnidump ovnisort RUNTIME DESTINATION bin)
|
||||||
|
Loading…
Reference in New Issue
Block a user