-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* CMake: Generate cpp stubs, smooth out API for dependent projects * Remove old stubs and scripts * CMake: Ensure correct MSVC runtime by default * Correct variable setting logic in macro
- Loading branch information
Showing
145 changed files
with
153 additions
and
2,581 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) | ||
# Copyright 2017-2019 University of Huddersfield. | ||
# Licensed under the BSD-3 License. | ||
# See license.md file in the project root for full license information. | ||
# This project has received funding from the European Research Council (ERC) | ||
# under the European Union’s Horizon 2020 research and innovation programme | ||
# (grant agreement No 725899). | ||
|
||
cmake_minimum_required(VERSION 3.18) | ||
|
||
macro(add_ref_target platform comment) | ||
string(TOUPPER ${platform} platform_uc) | ||
string(TOLOWER ${platform} platform_lc) | ||
|
||
set(FLUID_${platform_uc}_REF_TARGET MAKE_${platform_uc}_REF) | ||
set(FLUID_${platform_uc}_REF_PATH "${CMAKE_BINARY_DIR}/${platform_lc}_ref") | ||
|
||
get_property(DOC_ROOT GLOBAL PROPERTY FLUID_DOCS_ROOT) | ||
|
||
set(FLUID_GENERATED_DOC "${CMAKE_BINARY_DIR}/json") | ||
set(FLUID_HUMAN_DOC "${DOC_ROOT}/doc") | ||
set(FLIUD_JINJA_TEMPLATES "${DOC_ROOT}/flucoma/doc/templates") | ||
|
||
add_custom_target(MAKE_${platform_uc}_REF | ||
COMMAND ${CMAKE_COMMAND} -E make_directory "${${platform_uc}_DOC_OUT}" | ||
COMMAND ${PYTHON_3} "-mflucoma.MakeRef" "${platform_lc}" ${FLUID_GENERATED_DOC} ${FLUID_HUMAN_DOC} "${${platform_uc}_DOC_OUT}" ${FLIUD_JINJA_TEMPLATES} | ||
WORKING_DIRECTORY ${DOC_ROOT} | ||
COMMENT ${comment} | ||
# DEPENDS ${json_files} | ||
VERBATIM | ||
) | ||
add_dependencies(MAKE_${platform_uc}_REF DumpParams) | ||
endmacro() |
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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
# Part of the Fluid Corpus Manipulation Project (http://www.flucoma.org/) | ||
# Copyright 2017-2019 University of Huddersfield. | ||
# Licensed under the BSD-3 License. | ||
# See license.md file in the project root for full license information. | ||
# This project has received funding from the European Research Council (ERC) | ||
# under the European Union’s Horizon 2020 research and innovation programme | ||
# (grant agreement No 725899). | ||
|
||
cmake_minimum_required(VERSION 3.18) | ||
|
||
include(FLuidClientStub) | ||
|
||
function(add_doc_gen name source) | ||
|
||
add_executable(${name} ${source}) | ||
|
||
target_link_libraries(${name} PRIVATE | ||
FLUID_DECOMPOSITION FLUID_DUMP | ||
) | ||
|
||
target_include_directories ( | ||
${name} | ||
PRIVATE | ||
"${CMAKE_CURRENT_SOURCE_DIR}/../../../include" | ||
"${CMAKE_CURRENT_SOURCE_DIR}/../../../thirdparty" | ||
) | ||
|
||
if(APPLE) | ||
set_target_properties(${name} PROPERTIES | ||
XCODE_GENERATE_SCHEME ON | ||
) | ||
#If we target 10.7 (actually < 10.9), we have to manually include this: | ||
target_compile_options(${name} PRIVATE -stdlib=libc++) | ||
endif() | ||
|
||
if(MSVC) | ||
target_compile_options(${name} PRIVATE /W3) | ||
else() | ||
target_compile_options(${name} PRIVATE -Wall -Wextra -Wpedantic -Wno-return-type -Wno-c++11-narrowing) | ||
endif() | ||
|
||
get_property(HEADERS TARGET FLUID_DECOMPOSITION PROPERTY INTERFACE_SOURCES) | ||
source_group(TREE "${flucoma-core_SOURCE_DIR}/include" FILES ${HEADERS}) | ||
|
||
endfunction() | ||
|
||
function(make_external_name client header var) | ||
set(${var} ${client} PARENT_SCOPE) | ||
endfunction() | ||
|
||
function(generate_doc_exe) | ||
# # Define the supported set of keywords | ||
set(noValues "") | ||
set(singleValues FILENAME EXTERNALS_OUT FILE_OUT) | ||
set(multiValues CLIENTS HEADERS CLASSES) | ||
# # Process the arguments passed in | ||
include(CMakeParseArguments) | ||
cmake_parse_arguments(ARG | ||
"${noValues}" | ||
"${singleValues}" | ||
"${multiValues}" | ||
${ARGN}) | ||
|
||
if(ARG_FILENAME) | ||
set(external_name ${ARG_FILENAME}) | ||
else() | ||
list(GET ARG_CLIENTS 0 external_name) | ||
endif() | ||
|
||
set(ENTRY_POINT "int main(int argc, char *argv[])") | ||
set(WRAPPER_TEMPLATE [=[ParameterDump<${class}>::dump("${external}", argv[1]);]=]) | ||
set(CCE_WRAPPER "#include \"FluidParameterDump.hpp\"") | ||
|
||
generate_source(${ARGN} EXTERNALS_OUT external FILE_OUT outfile) | ||
|
||
message(STATUS "Generating: ${external_name}") | ||
add_doc_gen(${external_name} ${outfile}) | ||
|
||
endfunction() |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.