-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
48 changed files
with
864 additions
and
782 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,26 @@ | ||
## Authors: Alexander Van Craen, Marcel Breyer | ||
## Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
## License: This file is part of the PLSSVM project which is released under the MIT license. | ||
## See the LICENSE.md file in the project root for full license information. | ||
# Authors: Alexander Van Craen, Marcel Breyer | ||
# Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
# License: This file is part of the PLSSVM project which is released under the MIT license. | ||
# See the LICENSE.md file in the project root for full license information. | ||
######################################################################################################################## | ||
|
||
include(CMakeDependentOption) | ||
|
||
list(APPEND CMAKE_MESSAGE_INDENT "Bindings: ") | ||
|
||
# enable Python langauge bindings | ||
cmake_dependent_option(PLSSVM_ENABLE_PYTHON_BINDINGS "Build langauge bindings for Python." ON "PLSSVM_ENABLE_LANGUAGE_BINDINGS" OFF) | ||
cmake_dependent_option( | ||
PLSSVM_ENABLE_PYTHON_BINDINGS | ||
"Build langauge bindings for Python." | ||
ON | ||
"PLSSVM_ENABLE_LANGUAGE_BINDINGS" | ||
OFF | ||
) | ||
if (PLSSVM_ENABLE_PYTHON_BINDINGS) | ||
add_subdirectory(Python) | ||
endif () | ||
|
||
# explicitly update install targets in parent scope | ||
set(PLSSVM_TARGETS_TO_INSTALL "${PLSSVM_TARGETS_TO_INSTALL}" PARENT_SCOPE) | ||
|
||
list(POP_BACK CMAKE_MESSAGE_INDENT) | ||
list(POP_BACK CMAKE_MESSAGE_INDENT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,30 @@ | ||
## Authors: Alexander Van Craen, Marcel Breyer | ||
## Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
## License: This file is part of the PLSSVM project which is released under the MIT license. | ||
## See the LICENSE.md file in the project root for full license information. | ||
# Authors: Alexander Van Craen, Marcel Breyer | ||
# Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
# License: This file is part of the PLSSVM project which is released under the MIT license. | ||
# See the LICENSE.md file in the project root for full license information. | ||
######################################################################################################################## | ||
|
||
## add new coverage build type | ||
SET(CMAKE_CXX_FLAGS_COVERAGE | ||
"${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage" | ||
CACHE STRING "Flags used by the C++ compiler during coverage builds." | ||
FORCE) | ||
SET(CMAKE_C_FLAGS_COVERAGE | ||
"${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage" | ||
CACHE STRING "Flags used by the C compiler during coverage builds." | ||
FORCE) | ||
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE | ||
"${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov" | ||
CACHE STRING "Flags used for linking binaries during coverage builds." | ||
FORCE) | ||
SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE | ||
"${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov" | ||
CACHE STRING "Flags used by the shared libraries linker during coverage builds." | ||
FORCE) | ||
MARK_AS_ADVANCED( | ||
CMAKE_CXX_FLAGS_COVERAGE | ||
CMAKE_C_FLAGS_COVERAGE | ||
CMAKE_EXE_LINKER_FLAGS_COVERAGE | ||
CMAKE_SHARED_LINKER_FLAGS_COVERAGE) | ||
# add new coverage build type | ||
set(CMAKE_CXX_FLAGS_COVERAGE "${CMAKE_CXX_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage" CACHE STRING "Flags used by the C++ compiler during coverage builds." | ||
FORCE | ||
) | ||
set(CMAKE_C_FLAGS_COVERAGE "${CMAKE_C_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage" CACHE STRING "Flags used by the C compiler during coverage builds." FORCE) | ||
set(CMAKE_EXE_LINKER_FLAGS_COVERAGE "${CMAKE_EXE_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov" | ||
CACHE STRING "Flags used for linking binaries during coverage builds." FORCE | ||
) | ||
set(CMAKE_SHARED_LINKER_FLAGS_COVERAGE "${CMAKE_SHARED_LINKER_FLAGS_DEBUG} -fprofile-arcs -ftest-coverage -lgcov" | ||
CACHE STRING "Flags used by the shared libraries linker during coverage builds." FORCE | ||
) | ||
mark_as_advanced(CMAKE_CXX_FLAGS_COVERAGE CMAKE_C_FLAGS_COVERAGE CMAKE_EXE_LINKER_FLAGS_COVERAGE CMAKE_SHARED_LINKER_FLAGS_COVERAGE) | ||
|
||
# update the documentation string of CMAKE_BUILD_TYPE for GUIs | ||
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING | ||
"Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage." | ||
FORCE) | ||
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS | ||
"Debug" "Release" "RelWithDebInfo" "MinSizeRel" "Coverage") | ||
set(CMAKE_BUILD_TYPE "${CMAKE_BUILD_TYPE}" CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel Coverage." FORCE) | ||
set_property( | ||
CACHE CMAKE_BUILD_TYPE | ||
PROPERTY STRINGS | ||
"Debug" | ||
"Release" | ||
"RelWithDebInfo" | ||
"MinSizeRel" | ||
"Coverage" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,20 @@ | ||
## Authors: Alexander Van Craen, Marcel Breyer | ||
## Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
## License: This file is part of the PLSSVM project which is released under the MIT license. | ||
## See the LICENSE.md file in the project root for full license information. | ||
# Authors: Alexander Van Craen, Marcel Breyer | ||
# Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
# License: This file is part of the PLSSVM project which is released under the MIT license. | ||
# See the LICENSE.md file in the project root for full license information. | ||
######################################################################################################################## | ||
|
||
function(check_python_libs required_libraries error_string) | ||
function (check_python_libs required_libraries error_string) | ||
foreach (PLSSVM_PYTHON_LIB ${required_libraries}) | ||
# search for Python package | ||
execute_process( | ||
COMMAND ${Python3_EXECUTABLE} -c "import ${PLSSVM_PYTHON_LIB}" | ||
RESULT_VARIABLE PLSSVM_PYTHON_LIB_EXIT_CODE | ||
OUTPUT_QUIET) | ||
|
||
execute_process(COMMAND ${Python3_EXECUTABLE} -c "import ${PLSSVM_PYTHON_LIB}" RESULT_VARIABLE PLSSVM_PYTHON_LIB_EXIT_CODE OUTPUT_QUIET) | ||
|
||
# emit error if package couldn't be found | ||
if (NOT ${PLSSVM_PYTHON_LIB_EXIT_CODE} EQUAL 0) | ||
message(FATAL_ERROR | ||
"The '${PLSSVM_PYTHON_LIB}' Python3 package is not installed. " | ||
"Please install it using the following command: '${Python3_EXECUTABLE} -m pip install ${PLSSVM_PYTHON_LIB}'\n " | ||
"${error_string}" | ||
message(FATAL_ERROR "The '${PLSSVM_PYTHON_LIB}' Python3 package is not installed. " | ||
"Please install it using the following command: '${Python3_EXECUTABLE} -m pip install ${PLSSVM_PYTHON_LIB}'\n " | ||
"${error_string}" | ||
) | ||
endif () | ||
endforeach () | ||
endfunction() | ||
endfunction () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
## Authors: Alexander Van Craen, Marcel Breyer | ||
## Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
## License: This file is part of the PLSSVM project which is released under the MIT license. | ||
## See the LICENSE.md file in the project root for full license information. | ||
# Authors: Alexander Van Craen, Marcel Breyer | ||
# Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
# License: This file is part of the PLSSVM project which is released under the MIT license. | ||
# See the LICENSE.md file in the project root for full license information. | ||
######################################################################################################################## | ||
|
||
file(WRITE documentation.html "<meta http-equiv=\"REFRESH\" content=\"0;URL=html/index.html\">") | ||
file(WRITE documentation.html "<meta http-equiv=\"REFRESH\" content=\"0;URL=html/index.html\">") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
## Authors: Alexander Van Craen, Marcel Breyer | ||
## Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
## License: This file is part of the PLSSVM project which is released under the MIT license. | ||
## See the LICENSE.md file in the project root for full license information. | ||
# Authors: Alexander Van Craen, Marcel Breyer | ||
# Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
# License: This file is part of the PLSSVM project which is released under the MIT license. | ||
# See the LICENSE.md file in the project root for full license information. | ||
######################################################################################################################## | ||
|
||
file(GLOB_RECURSE PLSSVM_COVERAGE_GCDA_FILES ${CMAKE_BINARY_DIR}/*.gcda) | ||
file(REMOVE ${PLSSVM_COVERAGE_GCDA_FILES}) | ||
file(GLOB_RECURSE PLSSVM_COVERAGE_GCNO_FILES ${CMAKE_BINARY_DIR}/*.gcno) | ||
file(REMOVE ${PLSSVM_COVERAGE_GCNO_FILES}) | ||
file(REMOVE ${PLSSVM_COVERAGE_GCNO_FILES}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,28 @@ | ||
## Authors: Alexander Van Craen, Marcel Breyer | ||
## Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
## License: This file is part of the PLSSVM project which is released under the MIT license. | ||
## See the LICENSE.md file in the project root for full license information. | ||
# Authors: Alexander Van Craen, Marcel Breyer | ||
# Copyright (C): 2018-today The PLSSVM project - All Rights Reserved | ||
# License: This file is part of the PLSSVM project which is released under the MIT license. | ||
# See the LICENSE.md file in the project root for full license information. | ||
######################################################################################################################## | ||
|
||
function(discover_tests_with_death_test_filter test_executable_name) | ||
function (discover_tests_with_death_test_filter test_executable_name) | ||
if (PLSSVM_ENABLE_DEATH_TESTS) | ||
# assertions are enabled -> enable Google death tests | ||
gtest_discover_tests(${test_executable_name} PROPERTIES | ||
DISCOVERY_TIMEOUT 600 | ||
DISCOVERY_MODE PRE_TEST | ||
WORKING_DIRECTORY $<TARGET_FILE_DIR:${test_executable_name}>) | ||
gtest_discover_tests( | ||
${test_executable_name} PROPERTIES DISCOVERY_TIMEOUT 600 DISCOVERY_MODE PRE_TEST WORKING_DIRECTORY $<TARGET_FILE_DIR:${test_executable_name}> | ||
) | ||
else () | ||
# assertions are disabled -> disable Google death tests | ||
gtest_discover_tests(${test_executable_name} TEST_FILTER -*DeathTest* PROPERTIES | ||
DISCOVERY_TIMEOUT 600 | ||
DISCOVERY_MODE PRE_TEST | ||
WORKING_DIRECTORY $<TARGET_FILE_DIR:${test_executable_name}>) | ||
gtest_discover_tests( | ||
${test_executable_name} TEST_FILTER -*DeathTest* PROPERTIES DISCOVERY_TIMEOUT 600 DISCOVERY_MODE PRE_TEST | ||
WORKING_DIRECTORY $<TARGET_FILE_DIR:${test_executable_name}> | ||
) | ||
endif () | ||
if (WIN32) | ||
add_custom_command( | ||
TARGET ${test_executable_name} | ||
POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:${test_executable_name}> $<TARGET_FILE_DIR:${test_executable_name}> | ||
COMMAND_EXPAND_LISTS | ||
TARGET ${test_executable_name} | ||
POST_BUILD | ||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_RUNTIME_DLLS:${test_executable_name}> $<TARGET_FILE_DIR:${test_executable_name}> | ||
COMMAND_EXPAND_LISTS | ||
) | ||
endif () | ||
endfunction() | ||
endfunction () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -359,4 +359,4 @@ endfunction() | |
# And off we go... | ||
Main() | ||
|
||
# cmake-format: on | ||
# cmake-format: on |
Oops, something went wrong.