CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
# Enable CTest
# Must be on the top-level CMakeLists.txt
enable_testing()
# todo: this shouldn't be here - instead only the subdirs define projects
project(CedaSamples VERSION 0.8.0 LANGUAGES CXX)
set (CEDA_USE_PYTHON3 OFF)
set(CEDA_LIBFFI_WORKS True)
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
if (CMAKE_SIZEOF_VOID_P EQUAL 4)
# Currently on Windows x86, we aren't using libffi correctly so generate_jni.py cannot be used
set(CEDA_LIBFFI_WORKS False)
endif()
endif()
message("CMAKE_HOST_SYSTEM_NAME = ${CMAKE_HOST_SYSTEM_NAME}")
message("CMAKE_SIZEOF_VOID_P = ${CMAKE_SIZEOF_VOID_P}")
message("CEDA_LIBFFI_WORKS = ${CEDA_LIBFFI_WORKS}")
# todo: this shouldn't be here - unfortunately errors are generated otherwise
find_package(Ceda REQUIRED)
###################################################################################################
# Prepare test directory
if (DEFINED ENV{CEDA_TEST_DIR})
set(TEST_DIR $ENV{CEDA_TEST_DIR})
else()
set(TEST_DIR ${CMAKE_BINARY_DIR}/tests)
file(MAKE_DIRECTORY ${TEST_DIR})
endif()
message("Test directory : ${TEST_DIR}")
###################################################################################################
message("--------------- Adding sub directory CedaExamples")
add_subdirectory(CedaExamples)
message("--------------- Adding sub directory MyCompany")
add_subdirectory(MyCompany)
#add_subdirectory(Test)
cedaRunXcppOnWorkspace()