mirror of https://github.com/YosysHQ/nextpnr.git
himbaechel: Merge all test entrypoints into one
This commit merges every main() for every uarch into asingle one. This fixes a build error when building tests for every uarch at once. Signed-off-by: gitRaiku <raraiku@proton.me>
This commit is contained in:
parent
2b560ad0cc
commit
517afc5776
|
|
@ -15,6 +15,10 @@ set(HIMBAECHEL_SOURCES
|
|||
himbaechel_helpers.h
|
||||
)
|
||||
|
||||
set(HIMBAECHEL_TEST_SOURCES
|
||||
test_main.cc
|
||||
)
|
||||
|
||||
if (HIMBAECHEL_SPLIT)
|
||||
|
||||
function(add_nextpnr_himbaechel_microarchitecture microtarget)
|
||||
|
|
@ -23,6 +27,9 @@ if (HIMBAECHEL_SPLIT)
|
|||
list(TRANSFORM arg_CORE_SOURCES PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/)
|
||||
list(TRANSFORM arg_TEST_SOURCES PREPEND ${CMAKE_CURRENT_SOURCE_DIR}/)
|
||||
|
||||
list(TRANSFORM HIMBAECHEL_TEST_SOURCES PREPEND ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/)
|
||||
list(APPEND arg_TEST_SOURCES ${HIMBAECHEL_TEST_SOURCES})
|
||||
|
||||
add_nextpnr_architecture(himbaechel-${microtarget}
|
||||
CORE_SOURCES ${HIMBAECHEL_SOURCES}
|
||||
MAIN_SOURCE main.cc
|
||||
|
|
@ -47,6 +54,9 @@ else()
|
|||
function(add_nextpnr_himbaechel_microarchitecture microtarget)
|
||||
cmake_parse_arguments(arg "" "" "CORE_SOURCES;TEST_SOURCES" ${ARGN})
|
||||
|
||||
list(TRANSFORM HIMBAECHEL_TEST_SOURCES PREPEND ${CMAKE_CURRENT_FUNCTION_LIST_DIR}/)
|
||||
list(APPEND arg_TEST_SOURCES ${HIMBAECHEL_TEST_SOURCES})
|
||||
|
||||
target_sources(nextpnr-himbaechel-core INTERFACE ${arg_CORE_SOURCES})
|
||||
|
||||
add_library(nextpnr-himbaechel-${microtarget}-bba INTERFACE EXCLUDE_FROM_ALL)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ set(SOURCES
|
|||
set(TEST_SOURCES
|
||||
tests/lut.cc
|
||||
tests/testing.cc
|
||||
tests/main.cc
|
||||
)
|
||||
|
||||
add_nextpnr_himbaechel_microarchitecture(${uarch}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,6 @@ set(SOURCES
|
|||
|
||||
set(TEST_SOURCES
|
||||
tests/lut_dff.cc
|
||||
tests/main.cc
|
||||
)
|
||||
|
||||
add_nextpnr_himbaechel_microarchitecture(${uarch}
|
||||
|
|
|
|||
|
|
@ -1,32 +0,0 @@
|
|||
/*
|
||||
* nextpnr -- Next Generation Place and Route
|
||||
*
|
||||
* Copyright (C) 2024 The Project Beyond Authors.
|
||||
*
|
||||
* Permission to use, copy, modify, and/or distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include "gtest/gtest.h"
|
||||
#include "log.h"
|
||||
|
||||
USING_NEXTPNR_NAMESPACE
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// TODO: Remove for delivery, useful while checking tests
|
||||
log_streams.push_back(std::make_pair(&std::cerr, LogLevel::LOG_MSG));
|
||||
::testing::InitGoogleTest(&argc, argv);
|
||||
return RUN_ALL_TESTS();
|
||||
}
|
||||
Loading…
Reference in New Issue