diff --git a/cmake/hwip.cmake b/cmake/hwip.cmake index a22a2a1..dee8ff6 100644 --- a/cmake/hwip.cmake +++ b/cmake/hwip.cmake @@ -2,6 +2,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/utils/socmake_graph.cmake") include("${CMAKE_CURRENT_LIST_DIR}/utils/alias_dereference.cmake") include("${CMAKE_CURRENT_LIST_DIR}/utils/safe_get_target_property.cmake") +include("${CMAKE_CURRENT_LIST_DIR}//utils/file_paths.cmake") #[[[ # This function creates an INTERFACE library for a given IP. @@ -227,6 +228,8 @@ endfunction() # existing list. Ne source files can also be prepended with the optional keyword PREPEND. The source # files are later used to create the list of files to be compiled (e.g., by a simulator) by a tool to # execute its tasks. The source files are passed as a list after the parameters and keywords. +# +# Relative file paths are accepted and will be converted to absolute, relative to ${CMAKE_CURRENT_SOURCE_DIR} # # :param IP_LIB: The target IP library. # :type IP_LIB: string @@ -240,24 +243,27 @@ endfunction() #]] function(ip_sources IP_LIB LANGUAGE) cmake_parse_arguments(ARG "PREPEND;REPLACE" "" "" ${ARGN}) + # Delete PREPEND and REPLACE from argument list, so only sources are left + list(REMOVE_ITEM ARGN "PREPEND") + list(REMOVE_ITEM ARGN "REPLACE") check_languages(${LANGUAGE}) # If alias IP is given, dereference it (VENDOR::LIB::IP::0.0.1) -> (VENDOR__LIB__IP__0.0.1) alias_dereference(_reallib ${IP_LIB}) + # Convert all listed files to absolute paths relative to ${CMAKE_CURRENT_SOURCE_DIR} + convert_paths_to_absolute(file_list ${ARGN}) + if(NOT ARG_REPLACE) # Get the existing source files if any get_ip_sources(_sources ${_reallib} ${LANGUAGE} NO_DEPS) - else() - list(REMOVE_ITEM ARGN "REPLACE") endif() - # If the PREPEND option is passed first remove it from the list of file and prepend the new sources + # If the PREPEND option is passed prepend the new sources to the old ones if(ARG_PREPEND) - list(REMOVE_ITEM ARGN "PREPEND") - set(_sources ${ARGN} ${_sources}) + set(_sources ${file_list} ${_sources}) else() - set(_sources ${_sources} ${ARGN}) + set(_sources ${_sources} ${file_list}) endif() # Set the target property with the new list of source files set_property(TARGET ${_reallib} PROPERTY ${LANGUAGE}_SOURCES ${_sources}) @@ -316,8 +322,10 @@ function(ip_include_directories IP_LIB LANGUAGE) check_languages(${LANGUAGE}) # If alias IP is given, dereference it (VENDOR::LIB::IP::0.0.1) -> (VENDOR__LIB__IP__0.0.1) alias_dereference(_reallib ${IP_LIB}) + # Convert all listed files to absolute paths relative to ${CMAKE_CURRENT_SOURCE_DIR} + convert_paths_to_absolute(dir_list ${ARGN}) # Append the new include directories to the exsiting ones - set_property(TARGET ${_reallib} APPEND PROPERTY ${LANGUAGE}_INCLUDE_DIRECTORIES ${ARGN}) + set_property(TARGET ${_reallib} APPEND PROPERTY ${LANGUAGE}_INCLUDE_DIRECTORIES ${dir_list}) endfunction() #[[[ diff --git a/cmake/utils/file_paths.cmake b/cmake/utils/file_paths.cmake new file mode 100644 index 0000000..bf64087 --- /dev/null +++ b/cmake/utils/file_paths.cmake @@ -0,0 +1,22 @@ +#[[[ +# This function converts relative paths to absolute paths relative to ${CMAKE_CURRENT_SOURCE_DIR} +# It replicates the behaviour of target_sources() CMake Function +# +# :param OUTPUT_LIST: The variable to store the output file list +# :type OUTPUT_LIST: string +# :param ARGN: list of files to convert +# :type ARGN: path +# +#]] +function(convert_paths_to_absolute OUTPUT_LIST) + unset(output_list) + foreach(path ${ARGN}) + cmake_path(ABSOLUTE_PATH path + BASE_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} NORMALIZE + OUTPUT_VARIABLE path + ) + list(APPEND output_list ${path} ) + endforeach() + + set(${OUTPUT_LIST} ${output_list} PARENT_SCOPE) +endfunction() diff --git a/tests/tests/ip_include_directories/ip_include_directories_rel_path/ip_include_directories_rel_path.cmake b/tests/tests/ip_include_directories/ip_include_directories_rel_path/ip_include_directories_rel_path.cmake new file mode 100644 index 0000000..fedb1c2 --- /dev/null +++ b/tests/tests/ip_include_directories/ip_include_directories_rel_path/ip_include_directories_rel_path.cmake @@ -0,0 +1,15 @@ +# Test relative include directories paths, the behaviour is matching the CMake behaviour of target_include_directories(): +# Changed in version 3.13: Relative source file paths are interpreted as being relative to the current source directory (i.e. CMAKE_CURRENT_SOURCE_DIR). See policy CMP0076. + +include("${CMAKE_CURRENT_LIST_DIR}/../../../../CMakeLists.txt") +set(THIS_DIR ${CMAKE_CURRENT_LIST_DIR}) + +set(TEST_NAME ip_include_directories_rel_path) +ct_add_test(NAME ${TEST_NAME}) +function(${${TEST_NAME}}) + execute_process( + COMMAND cmake -S ${THIS_DIR}/test + -B ${CMAKE_BINARY_DIR}/${TEST_NAME}/build + COMMAND_ERROR_IS_FATAL ANY + ) +endfunction() diff --git a/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/CMakeLists.txt b/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/CMakeLists.txt new file mode 100644 index 0000000..a0a96f9 --- /dev/null +++ b/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/CMakeLists.txt @@ -0,0 +1,31 @@ +# Test relative include directories paths, the behaviour is matching the CMake behaviour of target_include_directories(): +# Changed in version 3.13: Relative source file paths are interpreted as being relative to the current source directory (i.e. CMAKE_CURRENT_SOURCE_DIR). See policy CMP0076. + +cmake_minimum_required(VERSION 3.25) +project(ip_include_directories_rel_path NONE) + +include("../../../../../SoCMakeConfig.cmake") + +add_ip(ip) + +set(SV_INCDIRS + . + justdir + ) +ip_include_directories(ip SYSTEMVERILOG + ${SV_INCDIRS} + ) + +add_subdirectory(otherdir) +include(incdir/incdir.cmake_) + +get_ip_include_directories(SV_ABS_INCDIRS ip SYSTEMVERILOG) + +foreach(abspath relpath IN ZIP_LISTS SV_ABS_INCDIRS SV_INCDIRS) + # If there is only . at the end, remove it, otherwise it wont match + string(REGEX REPLACE "\\.$" "" relpath ${relpath}) + if(NOT "${CMAKE_CURRENT_SOURCE_DIR}/${relpath}" PATH_EQUAL ${abspath}) + message(FATAL_ERROR "NOT EQUAL: ${CMAKE_CURRENT_SOURCE_DIR}/${relpath} - ${abspath}") + endif() + +endforeach() diff --git a/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/incdir/incdir.cmake_ b/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/incdir/incdir.cmake_ new file mode 100644 index 0000000..7f69874 --- /dev/null +++ b/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/incdir/incdir.cmake_ @@ -0,0 +1,10 @@ +list(APPEND SV_INCDIRS + incdir/ + incdir/incdir2 + ) +ip_include_directories(ip SYSTEMVERILOG + incdir/ + incdir/incdir2 +) + +set(SV_INCDIRS ${SV_INCDIRS} PARENT_SCOPE) diff --git a/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/otherdir/CMakeLists.txt b/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/otherdir/CMakeLists.txt new file mode 100644 index 0000000..4f146e7 --- /dev/null +++ b/tests/tests/ip_include_directories/ip_include_directories_rel_path/test/otherdir/CMakeLists.txt @@ -0,0 +1,10 @@ +list(APPEND SV_INCDIRS + otherdir/. + otherdir/incdir + ) +ip_include_directories(ip SYSTEMVERILOG + . + incdir + ) + +set(SV_INCDIRS ${SV_INCDIRS} PARENT_SCOPE) diff --git a/tests/tests/ip_link/ip_link1.cmake b/tests/tests/ip_link/ip_link1.cmake index 04d506f..7cefc88 100644 --- a/tests/tests/ip_link/ip_link1.cmake +++ b/tests/tests/ip_link/ip_link1.cmake @@ -1,4 +1,5 @@ include("${CMAKE_CURRENT_LIST_DIR}/../../../CMakeLists.txt") +set(CDIR ${CMAKE_CURRENT_LIST_DIR}) set(TEST_NAME ip_link1) @@ -28,7 +29,7 @@ function(${${TEST_NAME}}) LIBRARY lib VERSION 1.2.3 ) - ip_sources(${IP} VERILOG ip1_f1.v ip1_f2.v) + ip_sources(${IP} VERILOG ${CDIR}/ip1_f1.v ${CDIR}/ip1_f2.v) set(IP1 ${IP}) add_ip(ip2 @@ -36,7 +37,7 @@ function(${${TEST_NAME}}) LIBRARY lib VERSION 1.2.3 ) - ip_sources(${IP} VERILOG ip2_f1.v ip2_f2.v) + ip_sources(${IP} VERILOG ${CDIR}/ip2_f1.v ${CDIR}/ip2_f2.v) set(IP2 ${IP}) add_ip(ip3 @@ -44,7 +45,7 @@ function(${${TEST_NAME}}) LIBRARY lib VERSION 1.2.3 ) - ip_sources(${IP} VERILOG ip3_f1.v ip3_f2.v) + ip_sources(${IP} VERILOG ${CDIR}/ip3_f1.v ${CDIR}/ip3_f2.v) set(IP3 ${IP}) add_ip(ip4 @@ -52,7 +53,7 @@ function(${${TEST_NAME}}) LIBRARY lib VERSION 1.2.3 ) - ip_sources(${IP} VERILOG ip4_f1.v ip4_f2.v) + ip_sources(${IP} VERILOG ${CDIR}/ip4_f1.v ${CDIR}/ip4_f2.v) set(IP4 ${IP}) ip_link(${IP1} ${IP2} ${IP3}) @@ -62,17 +63,17 @@ function(${${TEST_NAME}}) get_ip_sources(V_SOURCES ${IP1} VERILOG) list(SUBLIST V_SOURCES 0 2 CURRENT_V_FILES) - ct_assert_equal(CURRENT_V_FILES "ip4_f1.v;ip4_f2.v") + ct_assert_equal(CURRENT_V_FILES "${CDIR}/ip4_f1.v;${CDIR}/ip4_f2.v") list(SUBLIST V_SOURCES 2 4 CURRENT_V_FILES) - if("${CURRENT_V_FILES}" STREQUAL "ip2_f1.v;ip2_f2.v;ip3_f1.v;ip3_f2.v") + if("${CURRENT_V_FILES}" STREQUAL "${CDIR}/ip2_f1.v;${CDIR}/ip2_f2.v;${CDIR}/ip3_f1.v;${CDIR}/ip3_f2.v") ct_assert_true(TRUE) - elseif("${CURRENT_V_FILES}" STREQUAL "ip3_f1.v;ip3_f2.v;ip3_f1.v;ip3_f2.v") + elseif("${CURRENT_V_FILES}" STREQUAL "${CDIR}/ip3_f1.v;${CDIR}/ip3_f2.v;${CDIR}/ip3_f1.v;${CDIR}/ip3_f2.v") ct_assert_true(TRUE) else() ct_assert_true(FALSE) endif() list(SUBLIST V_SOURCES 6 2 CURRENT_V_FILES) - ct_assert_equal(CURRENT_V_FILES "ip1_f1.v;ip1_f2.v") + ct_assert_equal(CURRENT_V_FILES "${CDIR}/ip1_f1.v;${CDIR}/ip1_f2.v") endfunction() diff --git a/tests/tests/ip_sources/ip_sources.cmake b/tests/tests/ip_sources/ip_sources.cmake index 4ad80e1..93fbd69 100644 --- a/tests/tests/ip_sources/ip_sources.cmake +++ b/tests/tests/ip_sources/ip_sources.cmake @@ -1,6 +1,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/../../../CMakeLists.txt") set(TEST_NAME ip_sources) +set(CDIR ${CMAKE_CURRENT_LIST_DIR}) ct_add_test(NAME ${TEST_NAME}) function(${${TEST_NAME}}) @@ -11,48 +12,48 @@ function(${${TEST_NAME}}) ) ip_sources(${IP} SYSTEMVERILOG - svfile1.sv - svfile2.sv + ${CDIR}/svfile1.sv + ${CDIR}/svfile2.sv ) ip_sources(${IP} VERILOG - vfile1.v - vfile2.v + ${CDIR}/vfile1.v + ${CDIR}/vfile2.v ) # TEST SYSTEMVERILOG include directories get_ip_sources(SV_SOURCES ${IP} SYSTEMVERILOG) ct_assert_list(SV_SOURCES) - ct_assert_equal(SV_SOURCES "svfile1.sv;svfile2.sv") + ct_assert_equal(SV_SOURCES "${CDIR}/svfile1.sv;${CDIR}/svfile2.sv") ip_sources(${IP} SYSTEMVERILOG - svfile3.sv - svfile4.sv + ${CDIR}/svfile3.sv + ${CDIR}/svfile4.sv ) get_ip_sources(SV_SOURCES ${IP} SYSTEMVERILOG) ct_assert_list(SV_SOURCES) - ct_assert_equal(SV_SOURCES "svfile1.sv;svfile2.sv;svfile3.sv;svfile4.sv") + ct_assert_equal(SV_SOURCES "${CDIR}/svfile1.sv;${CDIR}/svfile2.sv;${CDIR}/svfile3.sv;${CDIR}/svfile4.sv") # TEST VERILOG include directories get_ip_sources(V_SOURCES ${IP} VERILOG) ct_assert_list(V_SOURCES) - ct_assert_equal(V_SOURCES "vfile1.v;vfile2.v") + ct_assert_equal(V_SOURCES "${CDIR}/vfile1.v;${CDIR}/vfile2.v") ip_sources(${IP} VERILOG - vfile3.v - vfile4.v + ${CDIR}/vfile3.v + ${CDIR}/vfile4.v ) get_ip_sources(V_SOURCES ${IP} VERILOG) ct_assert_list(V_SOURCES) - ct_assert_equal(V_SOURCES "vfile1.v;vfile2.v;vfile3.v;vfile4.v") + ct_assert_equal(V_SOURCES "${CDIR}/vfile1.v;${CDIR}/vfile2.v;${CDIR}/vfile3.v;${CDIR}/vfile4.v") # TEST Warning asserted on unknown language ip_sources(${IP} FAKELANG - fakelang.fake + ${CDIR}/fakelang.fake ) ct_assert_prints("Language not supported: FAKELANG") diff --git a/tests/tests/ip_sources/ip_sources_get_multilang.cmake b/tests/tests/ip_sources/ip_sources_get_multilang.cmake index 8ca7d25..7ee769b 100644 --- a/tests/tests/ip_sources/ip_sources_get_multilang.cmake +++ b/tests/tests/ip_sources/ip_sources_get_multilang.cmake @@ -1,6 +1,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/../../../CMakeLists.txt") set(TEST_NAME ip_sources_get_multilang) +set(CDIR ${CMAKE_CURRENT_LIST_DIR}) ct_add_test(NAME ${TEST_NAME}) function(${${TEST_NAME}}) @@ -11,31 +12,31 @@ function(${${TEST_NAME}}) ) ip_sources(${IP} SYSTEMVERILOG - svfile1.sv - svfile2.sv + ${CDIR}/svfile1.sv + ${CDIR}/svfile2.sv ) ip_sources(${IP} VERILOG - vfile1.v - vfile2.v + ${CDIR}/vfile1.v + ${CDIR}/vfile2.v ) ip_sources(${IP} VHDL - vhdlfile1.vhdl - vhdlfile2.vhdl + ${CDIR}/vhdlfile1.vhdl + ${CDIR}/vhdlfile2.vhdl ) get_ip_sources(SOURCES ${IP} VERILOG SYSTEMVERILOG) ct_assert_list(SOURCES) - ct_assert_equal(SOURCES "vfile1.v;vfile2.v;svfile1.sv;svfile2.sv") + ct_assert_equal(SOURCES "${CDIR}/vfile1.v;${CDIR}/vfile2.v;${CDIR}/svfile1.sv;${CDIR}/svfile2.sv") get_ip_sources(SOURCES ${IP} VHDL SYSTEMVERILOG) ct_assert_list(SOURCES) - ct_assert_equal(SOURCES "vhdlfile1.vhdl;vhdlfile2.vhdl;svfile1.sv;svfile2.sv") + ct_assert_equal(SOURCES "${CDIR}/vhdlfile1.vhdl;${CDIR}/vhdlfile2.vhdl;${CDIR}/svfile1.sv;${CDIR}/svfile2.sv") get_ip_sources(SOURCES ${IP} VERILOG VHDL) ct_assert_list(SOURCES) - ct_assert_equal(SOURCES "vfile1.v;vfile2.v;vhdlfile1.vhdl;vhdlfile2.vhdl") + ct_assert_equal(SOURCES "${CDIR}/vfile1.v;${CDIR}/vfile2.v;${CDIR}/vhdlfile1.vhdl;${CDIR}/vhdlfile2.vhdl") add_ip(ip2 VENDOR vendor @@ -44,23 +45,23 @@ function(${${TEST_NAME}}) ) ip_sources(${IP} VERILOG - vfile3.v - vfile4.v + ${CDIR}/vfile3.v + ${CDIR}/vfile4.v ) ip_sources(${IP} VHDL - vhdlfile3.vhdl - vhdlfile4.vhdl + ${CDIR}/vhdlfile3.vhdl + ${CDIR}/vhdlfile4.vhdl ) ip_link(vendor::lib::ip::1.2.3 vendor::lib::ip2::1.2.4) get_ip_sources(SOURCES vendor::lib::ip::1.2.3 VERILOG VHDL SYSTEMVERILOG) ct_assert_list(SOURCES) - ct_assert_equal(SOURCES "vfile3.v;vfile4.v;vfile1.v;vfile2.v;vhdlfile3.vhdl;vhdlfile4.vhdl;vhdlfile1.vhdl;vhdlfile2.vhdl;svfile1.sv;svfile2.sv") + ct_assert_equal(SOURCES "${CDIR}/vfile3.v;${CDIR}/vfile4.v;${CDIR}/vfile1.v;${CDIR}/vfile2.v;${CDIR}/vhdlfile3.vhdl;${CDIR}/vhdlfile4.vhdl;${CDIR}/vhdlfile1.vhdl;${CDIR}/vhdlfile2.vhdl;${CDIR}/svfile1.sv;${CDIR}/svfile2.sv") get_ip_sources(SOURCES vendor::lib::ip::1.2.3 VERILOG VHDL SYSTEMVERILOG NO_DEPS) ct_assert_list(SOURCES) - ct_assert_equal(SOURCES "vfile1.v;vfile2.v;vhdlfile1.vhdl;vhdlfile2.vhdl;svfile1.sv;svfile2.sv") + ct_assert_equal(SOURCES "${CDIR}/vfile1.v;${CDIR}/vfile2.v;${CDIR}/vhdlfile1.vhdl;${CDIR}/vhdlfile2.vhdl;${CDIR}/svfile1.sv;${CDIR}/svfile2.sv") endfunction() diff --git a/tests/tests/ip_sources/ip_sources_rel_path/ip_sources_rel_path.cmake b/tests/tests/ip_sources/ip_sources_rel_path/ip_sources_rel_path.cmake new file mode 100644 index 0000000..f63416f --- /dev/null +++ b/tests/tests/ip_sources/ip_sources_rel_path/ip_sources_rel_path.cmake @@ -0,0 +1,15 @@ +# Test relative source file paths, the behaviour is matching the CMake behaviour of target_sources: +# Changed in version 3.13: Relative source file paths are interpreted as being relative to the current source directory (i.e. CMAKE_CURRENT_SOURCE_DIR). See policy CMP0076. + +include("${CMAKE_CURRENT_LIST_DIR}/../../../../CMakeLists.txt") +set(THIS_DIR ${CMAKE_CURRENT_LIST_DIR}) + +set(TEST_NAME ip_sources_rel_path) +ct_add_test(NAME ${TEST_NAME}) +function(${${TEST_NAME}}) + execute_process( + COMMAND cmake -S ${THIS_DIR}/test + -B ${CMAKE_BINARY_DIR}/${TEST_NAME}/build + COMMAND_ERROR_IS_FATAL ANY + ) +endfunction() diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/CMakeLists.txt b/tests/tests/ip_sources/ip_sources_rel_path/test/CMakeLists.txt new file mode 100644 index 0000000..acd0779 --- /dev/null +++ b/tests/tests/ip_sources/ip_sources_rel_path/test/CMakeLists.txt @@ -0,0 +1,44 @@ +# Test relative source file paths, the behaviour is matching the CMake behaviour of target_sources: +# Changed in version 3.13: Relative source file paths are interpreted as being relative to the current source directory (i.e. CMAKE_CURRENT_SOURCE_DIR). See policy CMP0076. + +cmake_minimum_required(VERSION 3.25) +project(ip_sources_rel_path NONE) + +include("../../../../../SoCMakeConfig.cmake") + +add_ip(ip) + +set(SV_SOURCES + file.sv + file2.sv + justdir/file3.sv + ) + +ip_sources(ip SYSTEMVERILOG + ${SV_SOURCES} + ) + +set(VHDL_SOURCES + file.vhdl + file2.vhdl + justdir/file3.vhdl + ) +ip_sources(ip VHDL + ${VHDL_SOURCES} + ) + +add_subdirectory(otherdir) +include(incdir/incdir.cmake_) + +get_ip_sources(SV_ABS_SOURCES ip SYSTEMVERILOG) +get_ip_sources(VHDL_ABS_SOURCES ip VHDL) + +set(LANGS "SV;VHDL") +foreach(lang ${LANGS}) + foreach(abspath relpath IN ZIP_LISTS ${lang}_ABS_SOURCES ${lang}_SOURCES) + if(NOT "${CMAKE_CURRENT_SOURCE_DIR}/${relpath}" PATH_EQUAL ${abspath}) + message(FATAL_ERROR "NOT EQUAL: ${relpath} - ${abspath}") + endif() + + endforeach() +endforeach() diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/file.sv b/tests/tests/ip_sources/ip_sources_rel_path/test/file.sv new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/file.vhdl b/tests/tests/ip_sources/ip_sources_rel_path/test/file.vhdl new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/file1.sv b/tests/tests/ip_sources/ip_sources_rel_path/test/file1.sv new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/file1.vhdl b/tests/tests/ip_sources/ip_sources_rel_path/test/file1.vhdl new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/incdir/incdir.cmake_ b/tests/tests/ip_sources/ip_sources_rel_path/test/incdir/incdir.cmake_ new file mode 100644 index 0000000..e64928c --- /dev/null +++ b/tests/tests/ip_sources/ip_sources_rel_path/test/incdir/incdir.cmake_ @@ -0,0 +1,10 @@ + +ip_sources(ip SYSTEMVERILOG + incdir/incdir_file.sv) + +list(APPEND SV_SOURCES incdir/incdir_file.sv) + +ip_sources(ip VHDL + incdir/incdir_file.vhdl) + +list(APPEND VHDL_SOURCES incdir/incdir_file.vhdl) diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/incdir/incdir_file.sv b/tests/tests/ip_sources/ip_sources_rel_path/test/incdir/incdir_file.sv new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/incdir/incdir_file.vhdl b/tests/tests/ip_sources/ip_sources_rel_path/test/incdir/incdir_file.vhdl new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/justdir/file3.sv b/tests/tests/ip_sources/ip_sources_rel_path/test/justdir/file3.sv new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/justdir/file3.vhdl b/tests/tests/ip_sources/ip_sources_rel_path/test/justdir/file3.vhdl new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/CMakeLists.txt b/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/CMakeLists.txt new file mode 100644 index 0000000..b515927 --- /dev/null +++ b/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/CMakeLists.txt @@ -0,0 +1,21 @@ + + +ip_sources(ip SYSTEMVERILOG + otherdir_file1.sv + otherdir_file2.sv + ) +list(APPEND SV_SOURCES + otherdir/otherdir_file1.sv + otherdir/otherdir_file2.sv + ) +set(SV_SOURCES ${SV_SOURCES} PARENT_SCOPE) + +ip_sources(ip VHDL + otherdir_file1.vhdl + otherdir_file2.vhdl + ) +list(APPEND VHDL_SOURCES + otherdir/otherdir_file1.vhdl + otherdir/otherdir_file2.vhdl + ) +set(VHDL_SOURCES ${VHDL_SOURCES} PARENT_SCOPE) diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/otherdir_file1.sv b/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/otherdir_file1.sv new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/otherdir_file1.vhdl b/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/otherdir_file1.vhdl new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/otherdir_file2.sv b/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/otherdir_file2.sv new file mode 100644 index 0000000..e69de29 diff --git a/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/otherdir_file2.vhdl b/tests/tests/ip_sources/ip_sources_rel_path/test/otherdir/otherdir_file2.vhdl new file mode 100644 index 0000000..e69de29