Commit cb7992b3 authored by Tobias Lasser's avatar Tobias Lasser
Browse files

fixing minor issues in CMake setup #18

parent 9aa4e345
Pipeline #169924 failed with stages
in 9 minutes and 18 seconds
...@@ -7,27 +7,29 @@ project(elsa VERSION 0.5 ...@@ -7,27 +7,29 @@ project(elsa VERSION 0.5
# ------------ elsa options ------------ # ------------ elsa options ------------
# ------------ # ------------
# detect if elsa is being bundled, disable some options based on this # detect if elsa is being as a submodule, enable/disable some options based on this
if (NOT DEFINED ELSA_MASTER_PROJECT) if(NOT DEFINED ELSA_MASTER_PROJECT)
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
set(ELSA_MASTER_PROJECT ON) set(ELSA_MASTER_PROJECT ON)
else() else()
set(ELSA_MASTER_PROJECT OFF) set(ELSA_MASTER_PROJECT OFF)
endif() endif()
endif () endif ()
option(ELSA_TESTING "Enable the unit tests of elsa" ${ELSA_MASTER_PROJECT}) option(ELSA_TESTING "Enable building the unit tests" ${ELSA_MASTER_PROJECT})
option(ELSA_INSTALL "Generate the install target" ${ELSA_MASTER_PROJECT}) option(ELSA_CREATE_JUNIT_REPORTS "Enable creating JUnit style reports when running tests" ON)
option(GIT_SUBMODULE "Check submodules during build" ${ELSA_MASTER_PROJECT}) option(ELSA_COVERAGE "Enable test coverage computation and reporting" OFF)
option(ELSA_BUILD_EXAMPLES "Build examples" ${ELSA_MASTER_PROJECT})
option(ELSA_COVERAGE "Enables test coverage reporting" OFF)
option(ELSA_BUILD_CUDA_PROJECTORS "Attempts to build CUDA projectors if set" ON) option(GIT_SUBMODULE "Enable updating the submodules during build" ${ELSA_MASTER_PROJECT})
option(ELSA_BUILD_WITH_MORE_WARNINGS "Reduce noise of warnings, but make chaning fast and easy" OFF) option(ELSA_INSTALL "Enable generating the install targets for make install" ${ELSA_MASTER_PROJECT})
option(ELSA_CREATE_JUNIT_REPORTS "Create JUnit style reports while running tests" ON) option(ELSA_BUILD_EXAMPLES "Enable building of examples" ${ELSA_MASTER_PROJECT})
option(ELSA_BUILD_CUDA_PROJECTORS "Enable building (or attempting to) the CUDA projectors" ON)
option(ELSA_BUILD_WITH_MORE_WARNINGS "Enable all and extra warnings when building (-Wall -Wextra)" OFF)
option(ELSA_SANITIZE_THREAD "Build elsa with thread sanitizers (TSAN)" OFF)
option(ELSA_SANITIZE_ADDRESS "Build elsa with address and undefined-behavior sanitizers (ASAN and UBSAN)" OFF)
option(ELSA_SANITIZE_THREAD "Build with TSAN" OFF)
option(ELSA_SANITIZE_ADDRESS "Build with ASAN and UBSAN" OFF)
# ------------ general setup ----------- # ------------ general setup -----------
# ------------ # ------------
...@@ -42,34 +44,36 @@ include(SetDefaultBuildType) ...@@ -42,34 +44,36 @@ include(SetDefaultBuildType)
# set where to install the exports/targets # set where to install the exports/targets
set(INSTALL_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/cmake) set(INSTALL_CONFIG_DIR ${CMAKE_INSTALL_LIBDIR}/cmake)
# ------------ dependencies ------------ # ------------ dependencies ------------
# ------------ # ------------
# only populate the dependencies, iff it's a standalone project! # only add the dependencies if elsa is stand-alone
if(ELSA_MASTER_PROJECT) if(ELSA_MASTER_PROJECT)
# include the git submodule update # include the git submodule update
include(UpdateGitSubmodules) include(UpdateGitSubmodules)
# find Eigen Library # setup Eigen Library
# if you're not using the submodules use set(EIGEN3_INCLUDE_DIR path/to/Eigen3) to point to the Eigen3 directory set(EIGEN3_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/thirdparty/eigen3")
find_package(Eigen3 3.3 REQUIRED) find_package(Eigen3 3.3 REQUIRED)
message(STATUS "Using eigen3 submodule at ${EIGEN3_INCLUDE_DIR}") message(STATUS "Using eigen3 submodule at ${EIGEN3_INCLUDE_DIR}")
# find spdlog Library # setup spdlog Library
# if you're not using the submodules use set(Spdlog_INCLUDE_DIR path/to/spdlog) to point to the spdlog directory set(Spdlog_INCLUDE_DIR "${PROJECT_SOURCE_DIR}/thirdparty/spdlog")
find_package(Spdlog REQUIRED) find_package(Spdlog REQUIRED)
message(STATUS "Using spdlog submodule at ${Spdlog_INCLUDE_DIR}") message(STATUS "Using spdlog submodule at ${Spdlog_INCLUDE_DIR}")
else() else()
message(STATUS " No dependencies added for elsa, as it's a subproject") message(STATUS " No dependencies added for elsa, as it is not stand-alone")
endif() endif()
# include the In stallElsaModule function # include the InstallElsaModule function
include(InstallElsaModule) include(InstallElsaModule)
# ------------ setup testing ----------- # ------------ setup testing -----------
# ------------ # ------------
# reset ELSA_TESTING to only be active, if it's a standlone project # if elsa is used as a submodule, turn testing off
if(NOT ELSA_MASTER_PROJECT) if(NOT ELSA_MASTER_PROJECT)
set(ELSA_TESTING OFF) set(ELSA_TESTING OFF)
endif(NOT ELSA_MASTER_PROJECT) endif(NOT ELSA_MASTER_PROJECT)
...@@ -82,23 +86,22 @@ if(ELSA_TESTING) ...@@ -82,23 +86,22 @@ if(ELSA_TESTING)
# add the CMake modules for automatic test discovery # add the CMake modules for automatic test discovery
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/thirdparty/Catch2/contrib" ${CMAKE_MODULE_PATH}) set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/thirdparty/Catch2/contrib" ${CMAKE_MODULE_PATH})
else(ELSA_TESTING)
message(STATUS " elsa testing is disabled")
endif(ELSA_TESTING)
# ------------ setup coverage test ----------- if(ELSA_COVERAGE)
# ------------ message(STATUS "elsa test coverage is enabled")
if(ELSA_COVERAGE)
message(STATUS "elsa coverage is enabled")
include(CodeCoverage) include(CodeCoverage)
APPEND_COVERAGE_COMPILER_FLAGS() APPEND_COVERAGE_COMPILER_FLAGS()
set(COVERAGE_LCOV_EXCLUDES '${PROJECT_SOURCE_DIR}/thirdparty/*' '/usr/*') set(COVERAGE_LCOV_EXCLUDES '${PROJECT_SOURCE_DIR}/thirdparty/*' '/usr/*')
SETUP_TARGET_FOR_COVERAGE_LCOV(NAME test_coverage EXECUTABLE ctest) SETUP_TARGET_FOR_COVERAGE_LCOV(NAME test_coverage EXECUTABLE ctest)
endif(ELSA_COVERAGE)
else(ELSA_COVERAGE)
message(STATUS "elsa test coverage is disabled")
endif(ELSA_COVERAGE)
else(ELSA_TESTING)
message(STATUS " elsa testing is disabled")
endif(ELSA_TESTING)
# ------------ add code/docs ----------- # ------------ add code/docs -----------
...@@ -115,6 +118,7 @@ if(ELSA_BUILD_EXAMPLES) ...@@ -115,6 +118,7 @@ if(ELSA_BUILD_EXAMPLES)
add_subdirectory(examples EXCLUDE_FROM_ALL) add_subdirectory(examples EXCLUDE_FROM_ALL)
endif(ELSA_BUILD_EXAMPLES) endif(ELSA_BUILD_EXAMPLES)
# ------------ setup installation ------ # ------------ setup installation ------
# ------------ # ------------
...@@ -143,7 +147,6 @@ if(ELSA_INSTALL) ...@@ -143,7 +147,6 @@ if(ELSA_INSTALL)
DESTINATION ${INSTALL_CONFIG_DIR} DESTINATION ${INSTALL_CONFIG_DIR}
) )
# this puts the local build tree into the user package repository, but not the installed version... # this puts the local build tree into the user package repository, but not the installed version...
# ...but we rely on the paths in the installed version. sigh. commented out for now. # ...but we rely on the paths in the installed version. sigh. commented out for now.
#export(PACKAGE elsa) #export(PACKAGE elsa)
......
...@@ -68,15 +68,13 @@ if(NOT Spdlog_FIND_VERSION) ...@@ -68,15 +68,13 @@ if(NOT Spdlog_FIND_VERSION)
set(Spdlog_FIND_VERSION "${SPDLOG_MAJOR_VERSION}.${SPDLOG_MINOR_VERSION}.${SPDLOG_PATCH_VERSION}") set(Spdlog_FIND_VERSION "${SPDLOG_MAJOR_VERSION}.${SPDLOG_MINOR_VERSION}.${SPDLOG_PATCH_VERSION}")
endif(NOT Spdlog_FIND_VERSION) endif(NOT Spdlog_FIND_VERSION)
find_package(PkgConfig)
if(EXISTS "${Spdlog_INCLUDE_DIR}") if(EXISTS "${Spdlog_INCLUDE_DIR}")
_spdlog_check_version() _spdlog_check_version()
set(Spdlog_FOUND ${Spdlog_VERSION_OK}) set(Spdlog_FOUND ${Spdlog_VERSION_OK})
else(EXISTS "${Spdlog_INCLUDE_DIR}") else(EXISTS "${Spdlog_INCLUDE_DIR}")
# search first if an Eigen3Config.cmake is available in the system, # search first if an SpdlogConfig.cmake is available in the system,
# if successful this would set EIGEN3_INCLUDE_DIR and the rest of # if successful this would set Spdlog_INCLUDE_DIR and the rest of
# the script will work as usual # the script will work as usual
find_package(Spdlog ${Spdlog_FIND_VERSION} NO_MODULE QUIET) find_package(Spdlog ${Spdlog_FIND_VERSION} NO_MODULE QUIET)
...@@ -93,11 +91,8 @@ else(EXISTS "${Spdlog_INCLUDE_DIR}") ...@@ -93,11 +91,8 @@ else(EXISTS "${Spdlog_INCLUDE_DIR}")
DOC "spdlog library header files" DOC "spdlog library header files"
PATH_SUFFIXES spdlog PATH_SUFFIXES spdlog
) )
message(DEBUG " spdlog dir ${Spdlog_INCLUDE_DIR}")
endif(NOT Spdlog_INCLUDE_DIR) endif(NOT Spdlog_INCLUDE_DIR)
message(DEBUG " spdlog dir ${Spdlog_INCLUDE_DIR}")
if(Spdlog_INCLUDE_DIR) if(Spdlog_INCLUDE_DIR)
_spdlog_check_version() _spdlog_check_version()
endif(Spdlog_INCLUDE_DIR) endif(Spdlog_INCLUDE_DIR)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
function(InstallElsaModule ELSA_MODULE_NAME ELSA_MODULE_TARGET_NAME ELSA_MODULE_EXPORT_TARGET) function(InstallElsaModule ELSA_MODULE_NAME ELSA_MODULE_TARGET_NAME ELSA_MODULE_EXPORT_TARGET)
if(ELSA_INSTALL) if(ELSA_INSTALL)
#This is required so that the exported target has the name core and not elsa_core # This is required so that the exported target has the name core and not elsa_core
set_target_properties(${ELSA_MODULE_TARGET_NAME} PROPERTIES EXPORT_NAME ${ELSA_MODULE_NAME}) set_target_properties(${ELSA_MODULE_TARGET_NAME} PROPERTIES EXPORT_NAME ${ELSA_MODULE_NAME})
include(GNUInstallDirs) include(GNUInstallDirs)
...@@ -16,7 +16,7 @@ function(InstallElsaModule ELSA_MODULE_NAME ELSA_MODULE_TARGET_NAME ELSA_MODULE_ ...@@ -16,7 +16,7 @@ function(InstallElsaModule ELSA_MODULE_NAME ELSA_MODULE_TARGET_NAME ELSA_MODULE_
) )
# install the header files # install the header files
install(FILES ${MODULE_HEADERS} install(FILES ${MODULE_HEADERS}
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${ELSA_MODULE_NAME} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/elsa/${ELSA_MODULE_NAME}
) )
# create the config file for the module # create the config file for the module
install(EXPORT ${ELSA_MODULE_EXPORT_TARGET} install(EXPORT ${ELSA_MODULE_EXPORT_TARGET}
......
# setup sanitizers
if(ELSA_SANITIZE_THREAD AND ELSA_SANITIZE_ADDRESS) if(ELSA_SANITIZE_THREAD AND ELSA_SANITIZE_ADDRESS)
message(FATAL_ERROR "AddressSanitizer is not compatible with ThreadSanitizer.") message(FATAL_ERROR "AddressSanitizer is not compatible with ThreadSanitizer.")
......
...@@ -10,7 +10,7 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git") ...@@ -10,7 +10,7 @@ if(GIT_FOUND AND EXISTS "${PROJECT_SOURCE_DIR}/.git")
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE GIT_SUBMODULE_RESULT) RESULT_VARIABLE GIT_SUBMODULE_RESULT)
if(NOT GIT_SUBMODULE_RESULT EQUAL "0") if(NOT GIT_SUBMODULE_RESULT EQUAL "0")
message(FATAL_ERROR "git submodule update --init failed with ${GIT_SUBMODULE_RESULT}, please check out submodules") message(WARNING "git submodule update --init failed with ${GIT_SUBMODULE_RESULT}")
endif() endif()
endif() endif()
endif() endif()
......
...@@ -2,14 +2,23 @@ ...@@ -2,14 +2,23 @@
include(CMakeFindDependencyMacro) include(CMakeFindDependencyMacro)
find_dependency(Eigen3 3.3 NO_MODULE REQUIRED) find_dependency(Eigen3 3.3 NO_MODULE REQUIRED)
find_dependency(Spdlog REQUIRED)
set(_supported_components @ELSA_REGISTERED_COMPONENTS@) set(_supported_components @ELSA_REGISTERED_COMPONENTS@)
message(STATUS "elsa components found: ${_supported_components}")
foreach(_comp ${elsa_FIND_COMPONENTS}) # if no specific components requested, include all
if(NOT elsa_FIND_COMPONENTS)
foreach(_comp ${_supported_components})
include(${CMAKE_CURRENT_LIST_DIR}/elsa_${_comp}Targets.cmake)
endforeach()
message(STATUS "elsa found, using all modules")
else()
foreach(_comp ${elsa_FIND_COMPONENTS})
if (NOT _comp IN_LIST _supported_components) if (NOT _comp IN_LIST _supported_components)
set(elsa_FOUND False) set(elsa_FOUND False)
set(elsa_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}") set(elsa_NOT_FOUND_MESSAGE "Unsupported component: ${_comp}")
endif() endif()
include(${CMAKE_CURRENT_LIST_DIR}/elsa_${_comp}Targets.cmake) include(${CMAKE_CURRENT_LIST_DIR}/elsa_${_comp}Targets.cmake)
endforeach() endforeach()
message(STATUS "elsa found, using components: ${elsa_FIND_COMPONENTS}")
endif()
...@@ -7,7 +7,7 @@ macro(registerComponent name) ...@@ -7,7 +7,7 @@ macro(registerComponent name)
endmacro() endmacro()
# macro for the unit tests # macro for the unit tests
MACRO (ELSA_TEST NAME) macro(ELSA_TEST NAME)
# create the test executable # create the test executable
add_executable(test_${NAME} test_${NAME}.cpp test_main.cpp) add_executable(test_${NAME} test_${NAME}.cpp test_main.cpp)
# add catch and the corresponding elsa library # add catch and the corresponding elsa library
...@@ -18,19 +18,21 @@ MACRO (ELSA_TEST NAME) ...@@ -18,19 +18,21 @@ MACRO (ELSA_TEST NAME)
# if we use JUnit reporter handle arguments # if we use JUnit reporter handle arguments
if(${ELSA_CREATE_JUNIT_REPORTS}) if(${ELSA_CREATE_JUNIT_REPORTS})
file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test_reports) file(MAKE_DIRECTORY ${PROJECT_BINARY_DIR}/test_reports)
set(ELSA_JUNIT_ARGUMENTS "-r junit" "-o ${PROJECT_BINARY_DIR}/test_reports/test_${NAME}.xml") set(ELSA_JUNIT_ARGUMENTS "-r junit" "-o ${PROJECT_BINARY_DIR}/test_reports/test_${NAME}.xml")
endif(${ELSA_CREATE_JUNIT_REPORTS}) endif(${ELSA_CREATE_JUNIT_REPORTS})
# let Catch discover and register all the test cases # let Catch discover and register all the test cases
catch_discover_tests(test_${NAME} TEST_SPEC ${ELSA_JUNIT_ARGUMENTS}) catch_discover_tests(test_${NAME} TEST_SPEC ${ELSA_JUNIT_ARGUMENTS})
ENDMACRO (ELSA_TEST) endmacro(ELSA_TEST)
# add sanitizers if in debug mode # add sanitizers if in debug mode
if(${CMAKE_BUILD_TYPE} MATCHES "Debug") if(${CMAKE_BUILD_TYPE} MATCHES "Debug")
include(${PROJECT_SOURCE_DIR}/cmake/Sanitizers.cmake) include(${PROJECT_SOURCE_DIR}/cmake/Sanitizers.cmake)
endif() endif()
# add a general custom target "elsa" that includes everything
add_custom_target(elsa)
# add the elsa modules # add the elsa modules
add_subdirectory(core) add_subdirectory(core)
add_subdirectory(logging) add_subdirectory(logging)
...@@ -46,22 +48,17 @@ endif(ELSA_BUILD_CUDA_PROJECTORS) ...@@ -46,22 +48,17 @@ endif(ELSA_BUILD_CUDA_PROJECTORS)
add_subdirectory(generators) add_subdirectory(generators)
#--------------------------------------------------------------------------------------- # if stand-alone and option set, turn on all warnings for all components
# Turn on compiler warnings and sanitizers for all components on, if wanted if(${ELSA_MASTER_PROJECT} AND ${ELSA_BUILD_WITH_MORE_WARNINGS})
#--------------------------------------------------------------------------------------- foreach(_component ${ELSA_REGISTERED_COMPONENTS})
if(${ELSA_MASTER_PROJECT})
foreach (_component ${ELSA_REGISTERED_COMPONENTS})
# add warnings if enabled
if(${ELSA_BUILD_WITH_MORE_WARNINGS})
if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang") if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang|AppleClang")
target_compile_options( elsa_${_component} PUBLIC -Wall -Wextra -Wconversion -pedantic -Wfatal-errors) target_compile_options(elsa_${_component} PUBLIC -Wall -Wextra -Wconversion -pedantic -Wfatal-errors)
endif() endif()
if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC") if (CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
target_compile_options( elsa_${_component} PUBLIC /W3 /WX ) target_compile_options(elsa_${_component} PUBLIC /W3 /WX)
endif() endif()
endif(${ELSA_BUILD_WITH_MORE_WARNINGS}) endforeach(_component ELSA_REGISTERED_COMPONENTS)
endforeach (_component ELSA_REGISTERED_COMPONENTS) endif()
endif(${ELSA_MASTER_PROJECT})
# propogate the variable to the parent scope # propogate the variable to the parent scope
set(ELSA_REGISTERED_COMPONENTS "${ELSA_REGISTERED_COMPONENTS};" PARENT_SCOPE) set(ELSA_REGISTERED_COMPONENTS "${ELSA_REGISTERED_COMPONENTS};" PARENT_SCOPE)
...@@ -29,27 +29,30 @@ set(MODULE_SOURCES ...@@ -29,27 +29,30 @@ set(MODULE_SOURCES
# build the module library # build the module library
add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES}) add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES})
add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME}) add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME})
add_dependencies(elsa ${ELSA_MODULE_TARGET_NAME})
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC Eigen3::Eigen)
# use OpenMP is available # use OpenMP is available
find_package(OpenMP REQUIRED) find_package(OpenMP)
if(OpenMP_CXX_FOUND) if(OpenMP_CXX_FOUND)
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PRIVATE OpenMP::OpenMP_CXX) target_link_libraries(${ELSA_MODULE_TARGET_NAME} PRIVATE OpenMP::OpenMP_CXX)
endif() endif()
target_include_directories(${ELSA_MODULE_TARGET_NAME} target_include_directories(${ELSA_MODULE_TARGET_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:include/${ELSA_MODULE_NAME}> $<INSTALL_INTERFACE:include/elsa/${ELSA_MODULE_NAME}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
) )
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC Eigen3::Eigen)
# require C++17 # require C++17
target_compile_features(${ELSA_MODULE_TARGET_NAME} PUBLIC cxx_std_17) target_compile_features(${ELSA_MODULE_TARGET_NAME} PUBLIC cxx_std_17)
# set -fPIC # set -fPIC
set_target_properties(${ELSA_MODULE_TARGET_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON) set_target_properties(${ELSA_MODULE_TARGET_NAME} PROPERTIES POSITION_INDEPENDENT_CODE ON)
# build the tests (if enabled) # build the tests (if enabled)
if(ELSA_TESTING) if(ELSA_TESTING)
add_subdirectory(tests) add_subdirectory(tests)
......
...@@ -40,12 +40,13 @@ set(MODULE_SOURCES ...@@ -40,12 +40,13 @@ set(MODULE_SOURCES
# build the module library # build the module library
add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES}) add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES})
add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME}) add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME})
add_dependencies(elsa ${ELSA_MODULE_TARGET_NAME})
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging elsa_operators) target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging elsa_operators)
target_include_directories(${ELSA_MODULE_TARGET_NAME} target_include_directories(${ELSA_MODULE_TARGET_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:include/${ELSA_MODULE_NAME}> $<INSTALL_INTERFACE:include/elsa/${ELSA_MODULE_NAME}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
) )
......
...@@ -22,12 +22,13 @@ set(MODULE_SOURCES ...@@ -22,12 +22,13 @@ set(MODULE_SOURCES
# build the module library # build the module library
add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES}) add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES})
add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME}) add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME})
add_dependencies(elsa ${ELSA_MODULE_TARGET_NAME})
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging elsa_projectors) target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging elsa_projectors)
target_include_directories(${ELSA_MODULE_TARGET_NAME} target_include_directories(${ELSA_MODULE_TARGET_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:include/${ELSA_MODULE_NAME}> $<INSTALL_INTERFACE:include/elsa/${ELSA_MODULE_NAME}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
) )
......
...@@ -22,12 +22,13 @@ set(MODULE_SOURCES ...@@ -22,12 +22,13 @@ set(MODULE_SOURCES
# build the module library # build the module library
add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES}) add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES})
add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME}) add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME})
add_dependencies(elsa ${ELSA_MODULE_TARGET_NAME})
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging) target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging)
target_include_directories(${ELSA_MODULE_TARGET_NAME} target_include_directories(${ELSA_MODULE_TARGET_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:include/${ELSA_MODULE_NAME}> $<INSTALL_INTERFACE:include/elsa/${ELSA_MODULE_NAME}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
) )
......
...@@ -22,10 +22,11 @@ set(MODULE_SOURCES ...@@ -22,10 +22,11 @@ set(MODULE_SOURCES
# build the module library # build the module library
add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES}) add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES})
add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME}) add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME})
add_dependencies(elsa ${ELSA_MODULE_TARGET_NAME})
target_include_directories(${ELSA_MODULE_TARGET_NAME} target_include_directories(${ELSA_MODULE_TARGET_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:include/${ELSA_MODULE_NAME}> $<INSTALL_INTERFACE:include/elsa/${ELSA_MODULE_NAME}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
) )
......
...@@ -22,6 +22,7 @@ set(MODULE_SOURCES ...@@ -22,6 +22,7 @@ set(MODULE_SOURCES
# build the module library # build the module library
add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES}) add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES})
add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME}) add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME})
add_dependencies(elsa ${ELSA_MODULE_TARGET_NAME})
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging) target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging)
...@@ -34,7 +35,7 @@ endif() ...@@ -34,7 +35,7 @@ endif()
target_include_directories(${ELSA_MODULE_TARGET_NAME} target_include_directories(${ELSA_MODULE_TARGET_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:include/${ELSA_MODULE_NAME}> $<INSTALL_INTERFACE:include/elsa/${ELSA_MODULE_NAME}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
) )
......
...@@ -24,12 +24,13 @@ set(MODULE_SOURCES ...@@ -24,12 +24,13 @@ set(MODULE_SOURCES
# build the module library # build the module library
add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES}) add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES})
add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME}) add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME})
add_dependencies(elsa ${ELSA_MODULE_TARGET_NAME})
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging elsa_operators elsa_functionals) target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging elsa_operators elsa_functionals)
target_include_directories(${ELSA_MODULE_TARGET_NAME} target_include_directories(${ELSA_MODULE_TARGET_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:include/${ELSA_MODULE_NAME}> $<INSTALL_INTERFACE:include/elsa/${ELSA_MODULE_NAME}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
) )
......
...@@ -32,6 +32,7 @@ set(MODULE_SOURCES ...@@ -32,6 +32,7 @@ set(MODULE_SOURCES
# build the module library # build the module library
add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES}) add_library(${ELSA_MODULE_TARGET_NAME} ${MODULE_HEADERS} ${MODULE_SOURCES})
add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME}) add_library(elsa::${ELSA_MODULE_NAME} ALIAS ${ELSA_MODULE_TARGET_NAME})
add_dependencies(elsa ${ELSA_MODULE_TARGET_NAME})
target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging) target_link_libraries(${ELSA_MODULE_TARGET_NAME} PUBLIC elsa_core elsa_logging)
...@@ -44,7 +45,7 @@ endif() ...@@ -44,7 +45,7 @@ endif()
target_include_directories(${ELSA_MODULE_TARGET_NAME} target_include_directories(${ELSA_MODULE_TARGET_NAME}
PUBLIC PUBLIC
$<INSTALL_INTERFACE:include/${ELSA_MODULE_NAME}>