Commit 64d5f54f authored by Benjamin Heisch's avatar Benjamin Heisch
Browse files

print debug messages, to d iagnose mistake...

parent 307e8ecf
......@@ -41,12 +41,13 @@ enable_testing()
add_subdirectory(test)
endif(XPLUG_BUILD_TESTS)
add_subdirectory(formats)
if(XPLUG_BUILD_EXAMPLES)
add_subdirectory(examples)
endif(XPLUG_BUILD_EXAMPLES)
add_subdirectory(formats)
add_subdirectory(include)
add_subdirectory(src)
add_subdirectory(deps)
......
......@@ -7,10 +7,10 @@ function(EXPORT_SYMBOLS EXPORT_SYMBOLS_TARGET)
cmake_policy(SET CMP0054 NEW)
foreach(loop_var ${EXPORT_SYMBOLS_FUNCTION_NAMES})
if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang|GNU")
target_link_options(${EXPORT_SYMBOLS_TARGET} PUBLIC "LINKER:--undefined=${loop_var}")
target_link_options(${EXPORT_SYMBOLS_TARGET} INTERFACE "LINKER:--undefined=${loop_var}")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
target_link_options(${EXPORT_SYMBOLS_TARGET} PUBLIC "LINKER:--undefined=${loop_var}")
#MESSAGE("GNU") elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
#MESSAGE("GNU")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
MESSAGE("No Symbol export defined. Specify here, how to handle")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
target_link_options(${EXPORT_SYMBOLS_TARGET} INTERFACE "/EXPORT:${loop_var}")
......
......@@ -32,3 +32,37 @@ if(XPLUG_BUILD_TESTS)
RUN_LV2_TESTS(MidiForwarder)
endif(XPLUG_LV2_SUPPORT)
endif(XPLUG_BUILD_TESTS)
# Get all propreties that cmake supports
execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST)
# Convert command output into a CMake list
STRING(REGEX REPLACE ";" "\\\\;" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
STRING(REGEX REPLACE "\n" ";" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
function(print_properties)
message ("CMAKE_PROPERTY_LIST = ${CMAKE_PROPERTY_LIST}")
endfunction(print_properties)
function(print_target_properties tgt)
if(NOT TARGET ${tgt})
message("There is no target named '${tgt}'")
return()
endif()
foreach (prop ${CMAKE_PROPERTY_LIST})
string(REPLACE "<CONFIG>" "${CMAKE_BUILD_TYPE}" prop ${prop})
# Fix https://stackoverflow.com/questions/32197663/how-can-i-remove-the-the-location-property-may-not-be-read-from-target-error-i
if(prop STREQUAL "LOCATION" OR prop MATCHES "^LOCATION_" OR prop MATCHES "_LOCATION$")
continue()
endif()
# message ("Checking ${prop}")
get_property(propval TARGET ${tgt} PROPERTY ${prop} SET)
if (propval)
get_target_property(propval ${tgt} ${prop})
message ("${tgt} ${prop} = ${propval}")
endif()
endforeach(prop)
endfunction(print_target_properties)
print_target_properties(MidiForwarder)
print_target_properties(vst2)
\ No newline at end of file
......@@ -15,4 +15,37 @@ if(XPLUG_VST2_SUPPORT)
EXPORT_SYMBOLS(vst2 FUNCTION_NAMES VSTPluginMain)
install(TARGETS vst2 EXPORT XPlugExport DESTINATION lib)
add_subdirectory(tests)
# Get all propreties that cmake supports
execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST)
# Convert command output into a CMake list
STRING(REGEX REPLACE ";" "\\\\;" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
STRING(REGEX REPLACE "\n" ";" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}")
function(print_properties)
message ("CMAKE_PROPERTY_LIST = ${CMAKE_PROPERTY_LIST}")
endfunction(print_properties)
function(print_target_properties tgt)
if(NOT TARGET ${tgt})
message("There is no target named '${tgt}'")
return()
endif()
foreach (prop ${CMAKE_PROPERTY_LIST})
string(REPLACE "<CONFIG>" "${CMAKE_BUILD_TYPE}" prop ${prop})
# Fix https://stackoverflow.com/questions/32197663/how-can-i-remove-the-the-location-property-may-not-be-read-from-target-error-i
if(prop STREQUAL "LOCATION" OR prop MATCHES "^LOCATION_" OR prop MATCHES "_LOCATION$")
continue()
endif()
# message ("Checking ${prop}")
get_property(propval TARGET ${tgt} PROPERTY ${prop} SET)
if (propval)
get_target_property(propval ${tgt} ${prop})
message ("${tgt} ${prop} = ${propval}")
endif()
endforeach(prop)
endfunction(print_target_properties)
PRINT_TARGET_PROPERTIES(vst2)
endif(XPLUG_VST2_SUPPORT)
\ No newline at end of file
......@@ -25,7 +25,6 @@ add_executable(unit_tests ${CMAKE_CURRENT_BINARY_DIR}/catch_main.cpp
"base/TestPluginBases.cpp"
"TestGlobalData.cpp"
)
message("${CMAKE_CURRENT_LIST_DIR}/../test_utils LD")
target_include_directories(unit_tests PUBLIC "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}/../test_utils" "../test_utils")
if (NOT WIN32)
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment