Modified CMAKE files for WIN32
This commit is contained in:
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -11,3 +11,6 @@
|
||||
[submodule "DRAMSys/library/src/common/third_party/systemc"]
|
||||
path = DRAMSys/library/src/common/third_party/systemc
|
||||
url = https://github.com/accellera-official/systemc.git
|
||||
[submodule "DRAMSys/library/src/common/third_party/sqlite-amalgamation"]
|
||||
path = DRAMSys/library/src/common/third_party/sqlite-amalgamation
|
||||
url = https://github.com/azadkuh/sqlite-amalgamation.git
|
||||
|
||||
@@ -37,9 +37,12 @@ project(DRAMSys)
|
||||
|
||||
# Configuration:
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ Version")
|
||||
set(DCMAKE_SH "CMAKE_SH-NOTFOUND" CACHE STRING "Ignore sh.exe error on Windows")
|
||||
|
||||
# Add sqlite3 Dependency:
|
||||
find_library(SQLITE3_LIBRARY NAMES sqlite3)
|
||||
set(BUILD_ENABLE_RTREE ON CACHE BOOL "Enable R-Tree Feature")
|
||||
set(BUILD_ENABLE_RTREE ON)
|
||||
add_subdirectory(library/src/common/third_party/sqlite-amalgamation)
|
||||
|
||||
# Add DRAMSysLibrary:
|
||||
add_subdirectory(library)
|
||||
@@ -49,6 +52,9 @@ add_subdirectory(traceAnalyzer)
|
||||
|
||||
# Build:
|
||||
add_executable(DRAMSys simulator/main.cpp)
|
||||
target_include_directories(DRAMSys PUBLIC DRAMSysLibrary library/src/simulation)
|
||||
target_link_libraries(DRAMSys systemc sqlite3 DRAMSysLibrary)
|
||||
target_include_directories(DRAMSys
|
||||
PUBLIC library/src/simulation/
|
||||
PUBLIC library/src/common/third_party/sqlite-amalgamation/
|
||||
)
|
||||
target_link_libraries(DRAMSys sqlite3::sqlite3 systemc DRAMSysLibrary)
|
||||
|
||||
|
||||
@@ -35,9 +35,6 @@ cmake_minimum_required(VERSION 3.10)
|
||||
# Project Name
|
||||
project(DRAMSysLibrary)
|
||||
|
||||
#set (CMAKE_CXX_STANDARD 11)
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ Version")
|
||||
|
||||
# Add DRAMPower:
|
||||
add_subdirectory(src/common/third_party/DRAMPower)
|
||||
|
||||
@@ -46,6 +43,9 @@ set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build Shared Libs")
|
||||
add_subdirectory(src/common/third_party/systemc)
|
||||
|
||||
# Configuration:
|
||||
set(CMAKE_CXX_STANDARD 11 CACHE STRING "C++ Version")
|
||||
set(DCMAKE_SH="CMAKE_SH-NOTFOUND")
|
||||
|
||||
include_directories(
|
||||
src/simulation
|
||||
src/simulation/dram
|
||||
@@ -134,6 +134,13 @@ add_library(DRAMSysLibrary
|
||||
)
|
||||
|
||||
# Build:
|
||||
target_include_directories(DRAMSysLibrary PUBLIC src/common/third_party/DRAMPower/src)
|
||||
target_link_libraries(DRAMSysLibrary SystemC::systemc DRAMPower)
|
||||
target_include_directories(DRAMSysLibrary
|
||||
PUBLIC src/common/third_party/DRAMPower/src
|
||||
PUBLIC src/common/third_party/sqlite-amalgamation/
|
||||
)
|
||||
target_link_libraries(DRAMSysLibrary
|
||||
SystemC::systemc
|
||||
sqlite3::sqlite3
|
||||
DRAMPower
|
||||
)
|
||||
|
||||
|
||||
1
DRAMSys/library/src/common/third_party/sqlite-amalgamation
vendored
Submodule
1
DRAMSys/library/src/common/third_party/sqlite-amalgamation
vendored
Submodule
Submodule DRAMSys/library/src/common/third_party/sqlite-amalgamation added at 9be05e1340
@@ -39,7 +39,11 @@
|
||||
|
||||
#include "Dram.h"
|
||||
|
||||
#include <sys/mman.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
#include <tlm.h>
|
||||
#include <systemc.h>
|
||||
#include <tlm_utils/simple_target_socket.h>
|
||||
@@ -78,7 +82,12 @@ Dram::Dram(sc_module_name name) : sc_module(name), tSocket("socket")
|
||||
else
|
||||
{
|
||||
// allocate and model storage of one DRAM channel using memory map
|
||||
memory = (unsigned char *)mmap(NULL, memorySize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -1, 0);
|
||||
#ifdef _WIN32
|
||||
SC_REPORT_FATAL("Dram", "On Windows Storage is not yet supported");
|
||||
memory = 0; // FIXME
|
||||
#else
|
||||
memory = (unsigned char *)mmap(NULL, memorySize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, -1, 0);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,13 @@ find_package(PythonLibs REQUIRED)
|
||||
|
||||
# Add QWT Dependency:
|
||||
find_library(QWT_LIBRARY NAMES "qwt-qt5" "qwt")
|
||||
find_path (QWT_INCLUDE_DIRS NAMES "qwt_plot.h" PATHS "/usr/include/qwt-qt5" "/usr/include/qwt")
|
||||
find_path (QWT_INCLUDE_DIRS NAMES "qwt_plot.h" PATHS
|
||||
"/usr/include/qwt-qt5"
|
||||
"/usr/include/qwt"
|
||||
"C:\\Qwt\\"
|
||||
"C:\\Qwt-6.1.4\\"
|
||||
"C:\\Users\\jung\\Zeugs\\qwt\\qwt-614-install\\include"
|
||||
)
|
||||
|
||||
# Add QT Library:
|
||||
find_package(Qt5 COMPONENTS Core Gui Widgets Sql REQUIRED)
|
||||
@@ -54,6 +60,7 @@ set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
|
||||
# Configure:
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
set(DCMAKE_SH="CMAKE_SH-NOTFOUND")
|
||||
|
||||
include_directories(
|
||||
${QWT_INCLUDE_DIRS}
|
||||
|
||||
Reference in New Issue
Block a user