Move sources to src
This commit is contained in:
parent
177429fabc
commit
ca6d46698f
@ -61,71 +61,11 @@ if (NOT HAVE_CLOCK_GETTIME)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(ovni SHARED
|
add_subdirectory(src)
|
||||||
ovni.c
|
|
||||||
parson.c
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(ovni PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
|
||||||
|
|
||||||
add_executable(ovniemu
|
|
||||||
chan.c
|
|
||||||
emu.c
|
|
||||||
emu_nosv.c
|
|
||||||
emu_openmp.c
|
|
||||||
emu_ovni.c
|
|
||||||
emu_tampi.c
|
|
||||||
emu_nodes.c
|
|
||||||
emu_kernel.c
|
|
||||||
emu_nanos6.c
|
|
||||||
emu_task.c
|
|
||||||
trace.c
|
|
||||||
ovni.c
|
|
||||||
parson.c
|
|
||||||
pcf.c
|
|
||||||
prv.c
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(ovnidump
|
|
||||||
dump.c
|
|
||||||
ovni.c
|
|
||||||
trace.c
|
|
||||||
parson.c
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(ovni2prv
|
|
||||||
ovni2prv.c
|
|
||||||
ovni.c
|
|
||||||
trace.c
|
|
||||||
parson.c
|
|
||||||
)
|
|
||||||
|
|
||||||
add_executable(ovnisort
|
|
||||||
sort.c
|
|
||||||
ovni.c
|
|
||||||
trace.c
|
|
||||||
parson.c
|
|
||||||
)
|
|
||||||
|
|
||||||
# Use <PackageName>_ROOT variables if available, commonly used by MPI
|
|
||||||
# installations
|
|
||||||
if(POLICY CMP0074)
|
|
||||||
cmake_policy(SET CMP0074 NEW)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package(MPI REQUIRED)
|
|
||||||
add_executable(ovnisync ovnisync.c)
|
|
||||||
target_link_libraries(ovnisync m MPI::MPI_C)
|
|
||||||
|
|
||||||
if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
|
|
||||||
include(CTest)
|
include(CTest)
|
||||||
|
|
||||||
if(BUILD_TESTING)
|
if(BUILD_TESTING)
|
||||||
add_subdirectory(test)
|
add_subdirectory(test)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
install(TARGETS ovni LIBRARY DESTINATION lib)
|
|
||||||
install(TARGETS ovniemu ovnidump ovni2prv ovnisync ovnisort RUNTIME DESTINATION bin)
|
|
||||||
install(FILES ovni.h DESTINATION include)
|
|
||||||
install(DIRECTORY cfg/ DESTINATION share/ovni)
|
install(DIRECTORY cfg/ DESTINATION share/ovni)
|
||||||
|
62
src/CMakeLists.txt
Normal file
62
src/CMakeLists.txt
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
# Copyright (c) 2021-2022 Barcelona Supercomputing Center (BSC)
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
add_library(ovni SHARED
|
||||||
|
ovni.c
|
||||||
|
parson.c
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(ovni PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
|
add_executable(ovniemu
|
||||||
|
chan.c
|
||||||
|
emu.c
|
||||||
|
emu_nosv.c
|
||||||
|
emu_openmp.c
|
||||||
|
emu_ovni.c
|
||||||
|
emu_tampi.c
|
||||||
|
emu_nodes.c
|
||||||
|
emu_kernel.c
|
||||||
|
emu_nanos6.c
|
||||||
|
emu_task.c
|
||||||
|
trace.c
|
||||||
|
ovni.c
|
||||||
|
parson.c
|
||||||
|
pcf.c
|
||||||
|
prv.c
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(ovnidump
|
||||||
|
dump.c
|
||||||
|
ovni.c
|
||||||
|
trace.c
|
||||||
|
parson.c
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(ovni2prv
|
||||||
|
ovni2prv.c
|
||||||
|
ovni.c
|
||||||
|
trace.c
|
||||||
|
parson.c
|
||||||
|
)
|
||||||
|
|
||||||
|
add_executable(ovnisort
|
||||||
|
sort.c
|
||||||
|
ovni.c
|
||||||
|
trace.c
|
||||||
|
parson.c
|
||||||
|
)
|
||||||
|
|
||||||
|
# Use <PackageName>_ROOT variables if available, commonly used by MPI
|
||||||
|
# installations
|
||||||
|
if(POLICY CMP0074)
|
||||||
|
cmake_policy(SET CMP0074 NEW)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
find_package(MPI REQUIRED)
|
||||||
|
add_executable(ovnisync ovnisync.c)
|
||||||
|
target_link_libraries(ovnisync m MPI::MPI_C)
|
||||||
|
|
||||||
|
install(TARGETS ovni LIBRARY DESTINATION lib)
|
||||||
|
install(TARGETS ovniemu ovnidump ovni2prv ovnisync ovnisort RUNTIME DESTINATION bin)
|
||||||
|
install(FILES ovni.h DESTINATION include)
|
@ -41,7 +41,7 @@ function(ovni_test source)
|
|||||||
"OVNI_NPROCS=${OVNI_TEST_NPROC}")
|
"OVNI_NPROCS=${OVNI_TEST_NPROC}")
|
||||||
|
|
||||||
list(APPEND OVNI_TEST_ENV
|
list(APPEND OVNI_TEST_ENV
|
||||||
"OVNI_BUILD_DIR=${CMAKE_BINARY_DIR}")
|
"OVNI_BUILD_DIR=${CMAKE_BINARY_DIR}/src")
|
||||||
|
|
||||||
list(APPEND OVNI_TEST_ENV
|
list(APPEND OVNI_TEST_ENV
|
||||||
"OVNI_CURRENT_DIR=${CMAKE_CURRENT_BINARY_DIR}")
|
"OVNI_CURRENT_DIR=${CMAKE_CURRENT_BINARY_DIR}")
|
||||||
|
Loading…
Reference in New Issue
Block a user