Remove file globs from CMakeLists
Fix build
This commit is contained in:
@@ -38,16 +38,18 @@
|
||||
|
||||
project(DRAMSys_Configuration)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
|
||||
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
|
||||
add_library(${PROJECT_NAME}
|
||||
DRAMSys/config/DRAMSysConfiguration.cpp
|
||||
DRAMSys/config/memspec/MemArchitectureSpec.cpp
|
||||
DRAMSys/config/memspec/MemPowerSpec.cpp
|
||||
DRAMSys/config/memspec/MemTimingSpec.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
DRAMSys::util
|
||||
nlohmann_json::nlohmann_json
|
||||
)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
@@ -56,5 +58,3 @@ target_compile_definitions(${PROJECT_NAME}
|
||||
)
|
||||
|
||||
add_library(DRAMSys::config ALIAS ${PROJECT_NAME})
|
||||
|
||||
build_source_group()
|
||||
|
||||
@@ -34,18 +34,17 @@
|
||||
* Derek Christ
|
||||
*/
|
||||
|
||||
#ifndef DRAMSYS_UTIL_JSON_H
|
||||
#define DRAMSYS_UTIL_JSON_H
|
||||
#ifndef DRAMSYSCONFIGURATION_JSON_H
|
||||
#define DRAMSYSCONFIGURATION_JSON_H
|
||||
|
||||
#include "nlohmann/json.hpp"
|
||||
#include <nlohmann/json.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <variant>
|
||||
|
||||
using json_t = nlohmann::json;
|
||||
|
||||
namespace DRAMSys::util
|
||||
namespace DRAMSys::Config
|
||||
{
|
||||
// See https://www.kdab.com/jsonify-with-nlohmann-json/
|
||||
// Try to set the value of type T into the variant data if it fails, do nothing
|
||||
@@ -98,7 +97,7 @@ template <typename T> void extended_from_json(const char* key, const nlohmann::j
|
||||
j.at(key).get_to(value);
|
||||
}
|
||||
|
||||
} // namespace DRAMSys::util
|
||||
} // namespace DRAMSys::Config
|
||||
|
||||
NLOHMANN_JSON_NAMESPACE_BEGIN
|
||||
|
||||
@@ -112,7 +111,7 @@ template <typename... Ts> struct adl_serializer<std::variant<Ts...>>
|
||||
static void from_json(const nlohmann::json& j, std::variant<Ts...>& data)
|
||||
{
|
||||
// Call variant_from_json for all types, only one will succeed
|
||||
(DRAMSys::util::variant_from_json<Ts>(j, data), ...);
|
||||
(DRAMSys::Config::variant_from_json<Ts>(j, data), ...);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -148,9 +147,9 @@ NLOHMANN_JSON_NAMESPACE_END
|
||||
// NOLINTBEGIN(cppcoreguidelines-macro-usage)
|
||||
|
||||
#define EXTEND_JSON_TO(v1) \
|
||||
DRAMSys::util::extended_to_json(#v1, nlohmann_json_j, nlohmann_json_t.v1);
|
||||
DRAMSys::Config::extended_to_json(#v1, nlohmann_json_j, nlohmann_json_t.v1);
|
||||
#define EXTEND_JSON_FROM(v1) \
|
||||
DRAMSys::util::extended_from_json(#v1, nlohmann_json_j, nlohmann_json_t.v1);
|
||||
DRAMSys::Config::extended_from_json(#v1, nlohmann_json_j, nlohmann_json_t.v1);
|
||||
|
||||
#define NLOHMANN_JSONIFY_ALL_THINGS(Type, ...) \
|
||||
inline void to_json(nlohmann::json& nlohmann_json_j, const Type& nlohmann_json_t) \
|
||||
@@ -164,4 +163,4 @@ NLOHMANN_JSON_NAMESPACE_END
|
||||
|
||||
// NOLINTEND(cppcoreguidelines-macro-usage)
|
||||
|
||||
#endif // DRAMSYS_UTIL_JSON_H
|
||||
#endif // DRAMSYSCONFIGURATION_JSON_H
|
||||
@@ -38,17 +38,69 @@
|
||||
|
||||
project(DRAMSys_libdramsys)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
|
||||
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
|
||||
add_library(${PROJECT_NAME}
|
||||
DRAMSys/common/DebugManager.cpp
|
||||
DRAMSys/common/TlmRecorder.cpp
|
||||
DRAMSys/common/dramExtensions.cpp
|
||||
DRAMSys/common/utils.cpp
|
||||
DRAMSys/configuration/memspec/MemSpec.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecDDR3.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecDDR4.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecGDDR5.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecGDDR5X.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecGDDR6.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecHBM2.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecLPDDR4.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecSTTMRAM.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecWideIO.cpp
|
||||
DRAMSys/configuration/memspec/MemSpecWideIO2.cpp
|
||||
DRAMSys/controller/BankMachine.cpp
|
||||
DRAMSys/controller/Command.cpp
|
||||
DRAMSys/controller/Controller.cpp
|
||||
DRAMSys/controller/ControllerRecordable.cpp
|
||||
DRAMSys/controller/McConfig.cpp
|
||||
DRAMSys/controller/checker/CheckerDDR3.cpp
|
||||
DRAMSys/controller/checker/CheckerDDR4.cpp
|
||||
DRAMSys/controller/checker/CheckerGDDR5.cpp
|
||||
DRAMSys/controller/checker/CheckerGDDR5X.cpp
|
||||
DRAMSys/controller/checker/CheckerGDDR6.cpp
|
||||
DRAMSys/controller/checker/CheckerHBM2.cpp
|
||||
DRAMSys/controller/checker/CheckerLPDDR4.cpp
|
||||
DRAMSys/controller/checker/CheckerSTTMRAM.cpp
|
||||
DRAMSys/controller/checker/CheckerWideIO.cpp
|
||||
DRAMSys/controller/checker/CheckerWideIO2.cpp
|
||||
DRAMSys/controller/cmdmux/CmdMuxOldest.cpp
|
||||
DRAMSys/controller/cmdmux/CmdMuxStrict.cpp
|
||||
DRAMSys/controller/powerdown/PowerDownManagerDummy.cpp
|
||||
DRAMSys/controller/powerdown/PowerDownManagerStaggered.cpp
|
||||
DRAMSys/controller/refresh/RefreshManagerAllBank.cpp
|
||||
DRAMSys/controller/refresh/RefreshManagerDummy.cpp
|
||||
DRAMSys/controller/refresh/RefreshManagerPer2Bank.cpp
|
||||
DRAMSys/controller/refresh/RefreshManagerPerBank.cpp
|
||||
DRAMSys/controller/refresh/RefreshManagerSameBank.cpp
|
||||
DRAMSys/controller/respqueue/RespQueueFifo.cpp
|
||||
DRAMSys/controller/respqueue/RespQueueReorder.cpp
|
||||
DRAMSys/controller/scheduler/BufferCounterBankwise.cpp
|
||||
DRAMSys/controller/scheduler/BufferCounterReadWrite.cpp
|
||||
DRAMSys/controller/scheduler/BufferCounterShared.cpp
|
||||
DRAMSys/controller/scheduler/SchedulerFifo.cpp
|
||||
DRAMSys/controller/scheduler/SchedulerFrFcfs.cpp
|
||||
DRAMSys/controller/scheduler/SchedulerFrFcfsGrp.cpp
|
||||
DRAMSys/controller/scheduler/SchedulerGrpFrFcfs.cpp
|
||||
DRAMSys/controller/scheduler/SchedulerGrpFrFcfsWm.cpp
|
||||
DRAMSys/simulation/AddressDecoder.cpp
|
||||
DRAMSys/simulation/Arbiter.cpp
|
||||
DRAMSys/simulation/DRAMSys.cpp
|
||||
DRAMSys/simulation/Dram.cpp
|
||||
DRAMSys/simulation/DramRecordable.cpp
|
||||
DRAMSys/simulation/SimConfig.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
SystemC::systemc
|
||||
DRAMSys::util
|
||||
DRAMSys::config
|
||||
sqlite3::sqlite3
|
||||
)
|
||||
@@ -59,5 +111,3 @@ if (DRAMSYS_WITH_DRAMPOWER)
|
||||
endif ()
|
||||
|
||||
add_library(DRAMSys::libdramsys ALIAS ${PROJECT_NAME})
|
||||
|
||||
build_source_group()
|
||||
|
||||
@@ -40,12 +40,19 @@
|
||||
|
||||
project(DRAMSys_Simulator)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
|
||||
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
|
||||
|
||||
list(FILTER SOURCE_FILES EXCLUDE REGEX "main.cpp")
|
||||
|
||||
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
|
||||
add_library(${PROJECT_NAME}
|
||||
simulator/Cache.cpp
|
||||
simulator/EccModule.cpp
|
||||
simulator/MemoryManager.cpp
|
||||
simulator/Simulator.cpp
|
||||
simulator/generator/RandomProducer.cpp
|
||||
simulator/generator/SequentialProducer.cpp
|
||||
simulator/generator/TrafficGenerator.cpp
|
||||
simulator/hammer/RowHammer.cpp
|
||||
simulator/player/StlPlayer.cpp
|
||||
simulator/request/RequestIssuer.cpp
|
||||
simulator/util.cpp
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
@@ -65,5 +72,3 @@ target_link_libraries(DRAMSys
|
||||
PRIVATE
|
||||
DRAMSys_Simulator
|
||||
)
|
||||
|
||||
build_source_group()
|
||||
|
||||
@@ -40,9 +40,6 @@
|
||||
|
||||
project(TraceAnalyzer)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
|
||||
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
|
||||
|
||||
# Add Python3 Dependency:
|
||||
find_package(Python3 COMPONENTS Development Interpreter)
|
||||
|
||||
@@ -76,7 +73,41 @@ set(CMAKE_AUTOUIC ON)
|
||||
set(CMAKE_AUTORCC ON)
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
add_executable(TraceAnalyzer ${SOURCE_FILES} ${HEADER_FILES})
|
||||
add_executable(TraceAnalyzer
|
||||
businessObjects/commentmodel.cpp
|
||||
businessObjects/configmodels.cpp
|
||||
businessObjects/phases/phase.cpp
|
||||
businessObjects/phases/phasefactory.cpp
|
||||
businessObjects/pythoncaller.cpp
|
||||
businessObjects/timespan.cpp
|
||||
businessObjects/traceplotlinemodel.cpp
|
||||
businessObjects/transaction.cpp
|
||||
data/tracedb.cpp
|
||||
evaluationtool.cpp
|
||||
gototimedialog.cpp
|
||||
main.cpp
|
||||
presentation/debugmessagetreewidget.cpp
|
||||
presentation/selectedtransactiontreewidget.cpp
|
||||
presentation/tracePlotMouseLabel.cpp
|
||||
presentation/tracedrawing.cpp
|
||||
presentation/tracedrawingproperties.cpp
|
||||
presentation/tracemetrictreewidget.cpp
|
||||
presentation/tracenavigator.cpp
|
||||
presentation/traceplot.cpp
|
||||
presentation/traceplotitem.cpp
|
||||
presentation/tracescroller.cpp
|
||||
presentation/transactiontreewidget.cpp
|
||||
presentation/util/clkgrid.cpp
|
||||
presentation/util/colorgenerator.cpp
|
||||
presentation/util/colorobject.cpp
|
||||
presentation/util/customlabelscaledraw.cpp
|
||||
presentation/util/testlight.cpp
|
||||
presentation/util/togglecollapsedaction.cpp
|
||||
queryeditor.cpp
|
||||
selectmetrics.cpp
|
||||
traceanalyzer.cpp
|
||||
tracefiletab.cpp
|
||||
)
|
||||
|
||||
target_include_directories(TraceAnalyzer
|
||||
PRIVATE
|
||||
@@ -90,7 +121,6 @@ target_link_libraries(TraceAnalyzer
|
||||
${QWT_LIBRARY}
|
||||
Qt5::Widgets
|
||||
Qt5::Sql
|
||||
DRAMSys::util
|
||||
DRAMSys::config
|
||||
)
|
||||
|
||||
@@ -100,5 +130,3 @@ target_compile_definitions(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
DRAMSYS_TRACE_ANALYZER_EXTENSION_DIR="${DRAMSYS_TRACE_ANALYZER_EXTENSION_DIR}"
|
||||
)
|
||||
|
||||
build_source_group()
|
||||
|
||||
@@ -1,61 +0,0 @@
|
||||
# Copyright (c) 2021, RPTU Kaiserslautern-Landau
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are
|
||||
# met:
|
||||
#
|
||||
# 1. Redistributions of source code must retain the above copyright notice,
|
||||
# this list of conditions and the following disclaimer.
|
||||
#
|
||||
# 2. Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in the
|
||||
# documentation and/or other materials provided with the distribution.
|
||||
#
|
||||
# 3. Neither the name of the copyright holder nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from
|
||||
# this software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
# PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
# Authors:
|
||||
# Derek Christ
|
||||
# Thomas Psota
|
||||
|
||||
########################################
|
||||
### DRAMSys::util ###
|
||||
########################################
|
||||
|
||||
project(DRAMSys_Util)
|
||||
|
||||
file(GLOB_RECURSE SOURCE_FILES CONFIGURE_DEPENDS *.cpp)
|
||||
file(GLOB_RECURSE HEADER_FILES CONFIGURE_DEPENDS *.h;*.hpp)
|
||||
|
||||
add_library(${PROJECT_NAME} ${SOURCE_FILES} ${HEADER_FILES})
|
||||
|
||||
target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
nlohmann_json::nlohmann_json
|
||||
)
|
||||
|
||||
target_compile_definitions(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
DRAMSYS_RESOURCE_DIR="${DRAMSYS_RESOURCE_DIR}"
|
||||
)
|
||||
|
||||
add_library(DRAMSys::util ALIAS ${PROJECT_NAME})
|
||||
|
||||
|
||||
build_source_group()
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors:
|
||||
* Thomas Psota
|
||||
*/
|
||||
|
||||
#include "util.h"
|
||||
|
||||
namespace DRAMSys::util
|
||||
{
|
||||
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021, RPTU Kaiserslautern-Landau
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are
|
||||
* met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice,
|
||||
* this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
* Authors:
|
||||
* Thomas Psota
|
||||
*/
|
||||
|
||||
#ifndef DRAMSYS_UTIL_UTIL_H
|
||||
#define DRAMSYS_UTIL_UTIL_H
|
||||
|
||||
namespace DRAMSys::util
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user