Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DO NOT MERGE #4521

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 6 additions & 3 deletions .ci/ci.yml
Expand Up @@ -160,9 +160,12 @@ jobs:
strategy:
matrix:
py36:
CONDA_PY: "36"
CONDA_ENV: shogun
cmakeOptions: '-DBUILD_META_EXAMPLES=OFF'
CONDA_DEFAULT_ENV: shogun
CONDA_EXE: $(CONDA)\Scripts\conda.exe
CONDA_PREFIX: $(CONDA)\envs\shogun
CONDA_PREFIX_1: $(CONDA)
CONDA_PYTHON_EXE: $(CONDA)\python.exe
cmakeOptions: ''

variables:
clcacheDir: 'C:\\Users\\VssAdministrator\\clcache'
Expand Down
18 changes: 18 additions & 0 deletions .ci/shogun.yml
@@ -0,0 +1,18 @@
name: shogun
channels:
- conda-forge
dependencies:
- python=3.6.*
- setuptools
- numpy
- scipy
- eigen
- rxcpp
- snappy
- zlib
- ctags
- ply
- jinja2
- gtest
- mkl-devel
- swig
24 changes: 14 additions & 10 deletions .ci/windows-steps.yml
Expand Up @@ -4,14 +4,17 @@ steps:
fetchDepth: 5
submodules: true

- task: CondaEnvironment@1
- script: |
type $(Build.SourcesDirectory)\data\testsuite\meta\binary\kernel_support_vector_machine.dat
displayName: Test meta testsuite

# see: https://github.com/Microsoft/azure-pipelines-tasks/issues/8504
- script: |
echo '##vso[task.setvariable variable=PATH]$(Build.SourcesDirectory)\build\src\shogun\$(buildConfiguration);$(CONDA_PREFIX);$(CONDA_PREFIX)\Library\mingw-w64\bin;$(CONDA_PREFIX)\Library\usr\bin;$(CONDA_PREFIX)\Library\bin;$(CONDA_PREFIX)\Scripts;$(CONDA_PREFIX)\bin;$(CONDA_PREFIX_1);$(CONDA_PREFIX_1)\Library\mingw-w64\bin;$(CONDA_PREFIX_1)\Library\usr\bin;$(CONDA_PREFIX_1)\Library\bin;$(CONDA_PREFIX_1)\Scripts;$(CONDA_PREFIX_1)\bin;$(PATH)'
displayName: Add conda and build directory to PATH

- script: 'conda env create -f .ci\shogun.yml --quiet'
displayName: Install dependencies
inputs:
createCustomEnvironment: True
environmentName: shogun
packageSpecs: 'python=3.6.* setuptools numpy scipy eigen rxcpp snappy zlib ctags ply jinja2 gtest mkl-devel swig'
createOptions: '-c conda-forge'
updateConda: false

- script: |
.ci\\setup_clcache.cmd
Expand Down Expand Up @@ -41,11 +44,12 @@ steps:
inputs:
cmakeArgs: '-G "Visual Studio 15 2017 Win64" -DCMAKE_BUILD_TYPE=$(buildConfiguration) -DCMAKE_PREFIX_PATH=$(CONDA_PREFIX)\Library -DENABLE_TESTING=ON -DCMAKE_INSTALL_PREFIX=$(targetPrefix) $(cmakeOptions) -DBLAS_LIBRARIES=$(CONDA_PREFIX)/Library/lib/mkl_core_dll.lib -DLAPACK_LIBRARIES=$(CONDA_PREFIX)/Library/lib/mkl_core_dll.lib -DBLA_VENDOR=Intel ..'

- script: cmake --build . --config $(buildConfiguration) --target INSTALL -- /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /m:2
- task: CMake@1
displayName: 'Build ($(buildConfiguration) $(buildPlatform))'
workingDirectory: $(Build.SourcesDirectory)\build
inputs:
cmakeArgs: '--build . --config $(buildConfiguration) --target INSTALL -- /p:TrackFileAccess=false /p:CLToolExe=clcache.exe /m:2'

- script: ctest -j 2
- script: ctest --output-on-failure -j 2 -C $(buildConfiguration)
displayName: Test
workingDirectory: $(Build.SourcesDirectory)\build

Expand Down
2 changes: 2 additions & 0 deletions NEWS
Expand Up @@ -49,6 +49,8 @@
- json build error fix [Andrew Wildman]
- Fix segfault in ROC error message [Chinmay Kousik]
- Fix potential memory leak in GMM [Marcus Edel]
- Fix shared and static library generation
for Windows [Viktor Gal]
* Known issues:
- Ruby examples do not work with new API due to potential swig
bug, see https://github.com/shogun-toolbox/shogun/issues/4177.
Expand Down
3 changes: 1 addition & 2 deletions cmake/ShogunFindLAPACK.cmake
@@ -1,7 +1,7 @@
# Enable Eigen to use Lapack backend
OPTION(ENABLE_EIGEN_LAPACK "Enable Eigen to use detected BLAS and LAPACK backend" ON)

FIND_PACKAGE(LAPACK QUIET)
FIND_PACKAGE(LAPACK)
IF (LAPACK_FOUND)
SET(HAVE_LAPACK 1)

Expand Down Expand Up @@ -74,7 +74,6 @@ IF (LAPACK_FOUND)
MESSAGE(STATUS "Enabling MKL as BLAS/Lapack backend for Eigen.")
SET(EIGEN_USE_MKL_ALL 1)
target_include_directories(shogun PUBLIC ${MKL_INCLUDE_DIR})
target_include_directories(libshogun PRIVATE ${MKL_INCLUDE_DIR})
IF (LIBSHOGUN_BUILD_STATIC)
target_include_directories(shogun-static PUBLIC ${MKL_INCLUDE_DIR})
ENDIF()
Expand Down
6 changes: 1 addition & 5 deletions cmake/ShogunInterfaces.cmake
Expand Up @@ -43,11 +43,7 @@ SET(SWIG_MODULE_${INTERFACE_NAME}_EXTRA_DEPS ${INTERFACE_FILES})
SWIG_ADD_MODULE(${INTERFACE_TARGET} ${INTERFACE_NAME} shogun.i sg_print_functions.cpp)
SET(INTERFACE_REAL_NAME ${SWIG_MODULE_interface_${INTERFACE_NAME}_REAL_NAME})

IF (WIN32)
SWIG_LINK_LIBRARIES(${INTERFACE_TARGET} shogun::shogun-static)
ELSE ()
SWIG_LINK_LIBRARIES(${INTERFACE_TARGET} shogun::shogun)
ENDIF ()
SWIG_LINK_LIBRARIES(${INTERFACE_TARGET} shogun::shogun)
IF (NOT "${INTERFACE_LIBRARIES}" STREQUAL "NO")
SWIG_LINK_LIBRARIES(${INTERFACE_TARGET} ${INTERFACE_LIBRARIES})
ENDIF()
Expand Down
33 changes: 17 additions & 16 deletions cmake/ShogunUtils.cmake
Expand Up @@ -91,26 +91,22 @@ endfunction ()
MACRO(AddMetaIntegrationTest META_TARGET CONDITION)
IF (${CONDITION})
add_test(NAME integration_meta_${META_TARGET}-${NAME_WITH_DIR}
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND meta_example_integration_tester ${REL_DIR} ${NAME}.dat ${META_TARGET} generated_results reference_results)
set_tests_properties(
integration_meta_${META_TARGET}-${NAME_WITH_DIR}
PROPERTIES
LABELS "integration"
DEPENDS generated_${META_TARGET}-${NAME_WITH_DIR}
)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
COMMAND meta_example_integration_tester ${REL_DIR} ${NAME}.dat ${META_TARGET} ${GENERATED_RESULTS_DIR} ${REFERENCE_RESULTS_DIR})
set_tests_properties(
integration_meta_${META_TARGET}-${NAME_WITH_DIR}
PROPERTIES
LABELS "integration"
DEPENDS generated_${META_TARGET}-${NAME_WITH_DIR}
)
ENDIF()
ENDMACRO()

MACRO(AddLibShogunExample EXAMPLE_CPP)
STRING(REGEX REPLACE ".cpp\$" "" EXAMPLE "${EXAMPLE_CPP}")

add_executable(${EXAMPLE} EXCLUDE_FROM_ALL ${CMAKE_CURRENT_SOURCE_DIR}/${EXAMPLE_CPP})
if(WIN32)
target_link_libraries(${EXAMPLE} shogun::shogun-static ${SANITIZER_LIBRARY})
else()
target_link_libraries(${EXAMPLE} shogun::shogun ${SANITIZER_LIBRARY})
endif()
target_link_libraries(${EXAMPLE} shogun::shogun ${SANITIZER_LIBRARY})
IF(SANITIZER_FLAGS)
set_target_properties(${EXAMPLE} PROPERTIES COMPILE_FLAGS ${SANITIZER_FLAGS})
ENDIF()
Expand Down Expand Up @@ -183,7 +179,7 @@ macro(ADD_LIBRARY_DEPENDENCY)
endmacro()

macro(SHOGUN_DEPENDENCIES)
ADD_LIBRARY_DEPENDENCY(TARGETS shogun shogun-static libshogun shogun_deps ${ARGN})
ADD_LIBRARY_DEPENDENCY(TARGETS shogun shogun-static shogun_deps ${ARGN})
endmacro()

function(SHOGUN_LINK_LIBS)
Expand All @@ -197,7 +193,6 @@ endfunction()

function(SHOGUN_COMPILE_OPTS)
set(SCOPE PRIVATE)
target_compile_options(libshogun ${SCOPE} ${ARGN})
target_compile_options(shogun ${SCOPE} ${ARGN})
if (LIBSHOGUN_BUILD_STATIC)
target_compile_options(shogun-static ${SCOPE} ${ARGN})
Expand All @@ -214,7 +209,6 @@ function(SHOGUN_INCLUDE_DIRS)
if(SHOGUN_INCLUDE_DIRS_SYSTEM)
set(SYSTEM "SYSTEM")
endif()
target_include_directories(libshogun ${SYSTEM} ${SHOGUN_INCLUDE_DIRS_SCOPE} ${DIRS})
target_include_directories(shogun ${SYSTEM} ${SHOGUN_INCLUDE_DIRS_SCOPE} ${DIRS})
if (LIBSHOGUN_BUILD_STATIC)
target_include_directories(shogun-static ${SYSTEM} ${SHOGUN_INCLUDE_DIRS_SCOPE} ${DIRS})
Expand Down Expand Up @@ -315,3 +309,10 @@ function(ADD_SHOGUN_BENCHMARK REL_BENCHMARK_NAME)
set_tests_properties(${BENCHMARK_NAME} PROPERTIES ${ARGN})
endif()
endfunction()

macro(ADD_SHOGUN_DEPENDENCY DEPENDENT)
add_dependencies(shogun ${DEPENDENT})
if (LIBSHOGUN_BUILD_STATIC)
add_dependencies(shogun-static ${DEPENDENT})
endif()
endmacro()
3 changes: 2 additions & 1 deletion cmake/external/ARPREC.cmake
Expand Up @@ -12,4 +12,5 @@ ExternalProject_Add(

SET(ARPREC_INCLUDE_DIR ${THIRD_PARTY_DIR}/include/arprec)
SET(ARPREC_LIBRARIES ${THIRD_PARTY_DIR}/libs/arprec/libarprec.a)
LIST(APPEND SHOGUN_DEPENDS ARPREC)
ADD_SHOGUN_DEPENDENCY(ARPREC)

2 changes: 1 addition & 1 deletion cmake/external/ColPack.cmake
Expand Up @@ -11,4 +11,4 @@ ExternalProject_Add(
SET(COLPACK_INCLUDE_DIRS ${THIRD_PARTY_DIR}/include/ColPack)
SET(COLPACK_LDFLAGS ${THIRD_PARTY_DIR}/libs/ColPack/libColPack.a)

LIST(APPEND SHOGUN_DEPENDS COLPACK)
ADD_SHOGUN_DEPENDENCY(COLPACK)
60 changes: 55 additions & 5 deletions cmake/external/GoogleTestNMock.cmake
@@ -1,9 +1,19 @@
MergeCFLAGS()
find_package(Threads)
include(ExternalProject)

set(GTEST_PREFIX
"${CMAKE_BINARY_DIR}/GoogleMock")
set(BUILD_DIR
"${GTEST_PREFIX}/src/GoogleMock-build")
set(GTEST_DIR
"${BUILD_DIR}/googlemock/gtest")
set(GMOCK_DIR
"${BUILD_DIR}/googlemock")

IF (MSVC)
SET (CUSTOM_CMAKE_ARGS -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${THIRD_PARTY_DIR}/libs/gmock
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${THIRD_PARTY_DIR}/libs/gmock
SET (CUSTOM_CMAKE_ARGS
-DINSTALL_GTEST=OFF
-DCMAKE_CXX_FLAGS:STRING=${CMAKE_CXX_FLAGS}${CMAKE_DEFINITIONS}
-DCMAKE_CXX_FLAGS_RELEASE:STRING=${CMAKE_CXX_FLAGS_RELEASE}
-DCMAKE_CXX_FLAGS_DISTRIBUTION:STRING=${CMAKE_CXX_FLAGS_DISTRIBUTION}
Expand All @@ -13,15 +23,15 @@ IF (MSVC)
)
ELSE ()
SET(MERGED_CXX_FLAGS "${MERGED_CXX_FLAGS} -fPIC")
SET (CUSTOM_CMAKE_ARGS -DCMAKE_ARCHIVE_OUTPUT_DIRECTORY:PATH=${THIRD_PARTY_DIR}/libs/gmock
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY:PATH=${THIRD_PARTY_DIR}/libs/gmock
SET (CUSTOM_CMAKE_ARGS
-DINSTALL_GTEST=OFF
-DCMAKE_CXX_FLAGS:STRING=${MERGED_CXX_FLAGS}${CMAKE_DEFINITIONS}
-DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER}
)
ENDIF()

IF(EXISTS /usr/src/googletest)
IF (EXISTS /usr/src/googletest)
ExternalProject_Add(
GoogleMock
DOWNLOAD_COMMAND ""
Expand All @@ -30,6 +40,9 @@ IF(EXISTS /usr/src/googletest)
INSTALL_COMMAND ""
CMAKE_ARGS ${CUSTOM_CMAKE_ARGS}
)

set(GTEST_INCLUDE_DIR "/usr/src/googletest/googletest/include")
set(GMOCK_INCLUDE_DIR "/usr/src/googletest/googlemock/include")
ELSE()
ExternalProject_Add(
GoogleMock
Expand All @@ -41,4 +54,41 @@ ELSE()
INSTALL_COMMAND ""
CMAKE_ARGS ${CUSTOM_CMAKE_ARGS}
)

set(GTEST_INCLUDE_DIR
"${GTEST_PREFIX}/src/GoogleMock/googletest/include")
set(GMOCK_INCLUDE_DIR
"${GTEST_PREFIX}/src/GoogleMock/googlemock/include")

file(MAKE_DIRECTORY ${GTEST_INCLUDE_DIR})
file(MAKE_DIRECTORY ${GMOCK_INCLUDE_DIR})
ENDIF()

add_library(gtest IMPORTED STATIC GLOBAL)
set_target_properties(gtest PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${GTEST_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
if(CMAKE_GENERATOR MATCHES "Visual Studio.*" OR CMAKE_GENERATOR STREQUAL Xcode)
set_target_properties(gtest PROPERTIES
IMPORTED_LOCATION_DEBUG "${GTEST_DIR}/Debug/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LOCATION_RELEASE "${GTEST_DIR}/Release/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
else()
set_target_properties(gtest PROPERTIES
IMPORTED_LOCATION "${GTEST_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gtest${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif()

add_library(gmock IMPORTED STATIC GLOBAL)
set_target_properties(gmock PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${GMOCK_INCLUDE_DIR}"
IMPORTED_LINK_INTERFACE_LIBRARIES "${CMAKE_THREAD_LIBS_INIT}")
if(CMAKE_GENERATOR MATCHES "Visual Studio.*" OR CMAKE_GENERATOR STREQUAL Xcode)
set_target_properties(gmock PROPERTIES
IMPORTED_LOCATION_DEBUG "${GMOCK_DIR}/Debug/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}"
IMPORTED_LOCATION_RELEASE "${GMOCK_DIR}/Release/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}")
else()
set_target_properties(gmock PROPERTIES
IMPORTED_LOCATION "${GMOCK_DIR}/${CMAKE_STATIC_LIBRARY_PREFIX}gmock${CMAKE_STATIC_LIBRARY_SUFFIX}")
endif()

add_dependencies(gtest GoogleMock)
add_dependencies(gmock GoogleMock)
2 changes: 1 addition & 1 deletion cmake/external/Jemalloc.cmake
Expand Up @@ -12,4 +12,4 @@ ExternalProject_Add(

SET(Jemalloc_INCLUDE_DIR ${THIRD_PARTY_DIR}/include/jemalloc)
SET(Jemalloc_LIBRARIES ${THIRD_PARTY_DIR}/libs/jemalloc/libjemalloc_pic.a)
add_dependencies(libshogun Jemalloc)
ADD_SHOGUN_DEPENDENCY(Jemalloc)
2 changes: 1 addition & 1 deletion cmake/external/MSDirent.cmake
Expand Up @@ -13,4 +13,4 @@ ExternalProject_Add(

ExternalProject_Get_Property(MSDirent SOURCE_DIR)
SET(MSDIRENT_INCLUDE_DIR ${SOURCE_DIR}/include)
add_dependencies(libshogun MSDirent)
ADD_SHOGUN_DEPENDENCY(MSDirent)
2 changes: 1 addition & 1 deletion cmake/external/MSIntTypes.cmake
Expand Up @@ -17,4 +17,4 @@ ExternalProject_Add(

ExternalProject_Get_Property(MSIntTypes SOURCE_DIR)
SET(MSINTTYPES_INCLUDE_DIR ${SOURCE_DIR})
add_dependencies(libshogun MSIntTypes)
ADD_SHOGUN_DEPENDENCY(MSIntTypes)
2 changes: 1 addition & 1 deletion cmake/external/NLopt.cmake
Expand Up @@ -12,4 +12,4 @@ ExternalProject_Add(

SET(NLOPT_INCLUDE_DIR ${THIRD_PARTY_DIR}/include/nlopt)
SET(NLOPT_LIBRARIES ${THIRD_PARTY_DIR}/libs/nlopt/libnlopt.a)
LIST(APPEND SHOGUN_DEPENDS NLopt)
ADD_SHOGUN_DEPENDENCY(NLopt)
2 changes: 1 addition & 1 deletion cmake/external/StanMath.cmake
Expand Up @@ -18,4 +18,4 @@ ExternalProject_Add(
&& ${CMAKE_COMMAND} -E copy_directory ${STAN_INCLUDE_DIR_EIGEN} ${THIRD_PARTY_INCLUDE_DIR}/eigen
LOG_DOWNLOAD ON
)
add_dependencies(libshogun StanMath)
ADD_SHOGUN_DEPENDENCY(StanMath)
2 changes: 1 addition & 1 deletion cmake/external/TCMalloc.cmake
Expand Up @@ -12,4 +12,4 @@ ExternalProject_Add(

SET(TCMalloc_INCLUDE_DIR ${THIRD_PARTY_DIR}/include/tcmalloc)
SET(TCMalloc_LIBRARIES ${THIRD_PARTY_DIR}/libs/tcmalloc/libtcmalloc_minimal.a)
add_dependencies(libshogun TCMalloc)
ADD_SHOGUN_DEPENDENCY(TCMalloc)
2 changes: 1 addition & 1 deletion cmake/external/TFLogger.cmake
Expand Up @@ -11,7 +11,7 @@ ExternalProject_Add(
BUILD_COMMAND ""
)

add_dependencies(libshogun tflogger)
ADD_SHOGUN_DEPENDENCY(tflogger)

set(TFLogger_INCLUDE_DIR ${THIRD_PARTY_INCLUDE_DIR})

Expand Down
3 changes: 1 addition & 2 deletions cmake/external/rxcpp.cmake
Expand Up @@ -11,6 +11,5 @@ ExternalProject_Add(
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${RXCPP_SOURCE_DIR}/src/Rx/v2/src/ ${THIRD_PARTY_INCLUDE_DIR}/
)

add_dependencies(libshogun rxcpp)

set(rxcpp_INCLUDE_DIR ${THIRD_PARTY_INCLUDE_DIR})
ADD_SHOGUN_DEPENDENCY(rxcpp)
2 changes: 1 addition & 1 deletion cmake/external/variant.cmake
Expand Up @@ -13,4 +13,4 @@ ExternalProject_Add(
INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_if_different ${VARIANT_SOURCE_DIR}/${VARIANT_RELEASE_VERSION}/variant.hpp ${VARIANT_INCLUDE_DIR}/variant.hpp
)

add_dependencies(libshogun variant)
ADD_SHOGUN_DEPENDENCY(variant)
2 changes: 1 addition & 1 deletion examples/meta/CMakeLists.txt
Expand Up @@ -118,7 +118,7 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/cpp

IF (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/data)
# copy data symlink to cmake binary dir so that we can execute meta examples in there
CREATE_DATA_SYMLINK(${CMAKE_CURRENT_SOURCE_DIR}/data ${CMAKE_CURRENT_BINARY_DIR}/data)
CREATE_DATA_SYMLINK(${CMAKE_SOURCE_DIR}/data/toy ${CMAKE_CURRENT_BINARY_DIR}/data)
ENDIF()

# c++
Expand Down
10 changes: 2 additions & 8 deletions examples/meta/cpp/CMakeLists.txt
Expand Up @@ -6,12 +6,6 @@ FOREACH(META_EXAMPLE ${META_EXAMPLES})
# assume a structure <target_language>/<category>/listing.sg
GET_META_EXAMPLE_VARS(${META_EXAMPLE} EXAMPLE_NAME EXAMPLE_REL_DIR EXAMPLE_NAME_WITH_DIR)

if(WIN32)
SET(SHOGUN_LIBRARY shogun::shogun-static)
else()
SET(SHOGUN_LIBRARY shogun::shogun)
endif()

# meta examples have to be generated before executable and test is added
SET(GENERATED_CPP ${EXAMPLE_REL_DIR}/${EXAMPLE_NAME}.cpp)
SET(GENERATED_CPP_BINARY cpp-${EXAMPLE_REL_DIR}-${EXAMPLE_NAME})
Expand All @@ -20,10 +14,10 @@ FOREACH(META_EXAMPLE ${META_EXAMPLES})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${EXAMPLE_REL_DIR})

ADD_EXECUTABLE(${GENERATED_CPP_BINARY} ${GENERATED_CPP})
ADD_DEPENDENCIES(${GENERATED_CPP_BINARY} meta_examples ${SHOGUN_LIBRARY})
ADD_DEPENDENCIES(${GENERATED_CPP_BINARY} meta_examples shogun::shogun)
SET_SOURCE_FILES_PROPERTIES(${GENERATED_CPP} PROPERTIES GENERATED 1)

TARGET_LINK_LIBRARIES(${GENERATED_CPP_BINARY} ${SHOGUN_LIBRARY} ${SANITIZER_LIBRARY})
TARGET_LINK_LIBRARIES(${GENERATED_CPP_BINARY} shogun::shogun ${SANITIZER_LIBRARY})

# Suppress unused variable warnings
# if we are not testing the meta_examples
Expand Down
2 changes: 1 addition & 1 deletion src/gpl