Browse Source

Fixes to allow re-use

pull/3/head
Eyck Jentzsch 1 year ago
parent
commit
e552b4b3ca
2 changed files with 20 additions and 1 deletions
  1. 20
    0
      cmake/Common.cmake
  2. 0
    1
      incl/scc/utilities.h

+ 20
- 0
cmake/Common.cmake View File

@@ -0,0 +1,20 @@
# Function to link between sub-projects
function(add_dependent_subproject subproject_name)
#if (NOT TARGET ${subproject_name}) # target unknown
if(NOT PROJECT_${subproject_name}) # var unknown because we build only this subproject
find_package(${subproject_name} CONFIG REQUIRED)
else () # we know the target thus we are doing a build from the top directory
include_directories(../${subproject_name}/incl)
endif ()
endfunction(add_dependent_subproject)

# Make sure we tell the topdir CMakeLists that we exist (if build from topdir)
get_directory_property(hasParent PARENT_DIRECTORY)
if(hasParent)
set(PROJECT_${PROJECT_NAME} true PARENT_SCOPE)
endif()

# Function to link between sub-projects
function(add_dependent_header subproject_name)
include_directories(../${subproject_name}/incl)
endfunction(add_dependent_header)

+ 0
- 1
incl/scc/utilities.h View File

@@ -23,7 +23,6 @@
#ifndef _SYSC_UTILITIES_H_
#define _SYSC_UTILITIES_H_

#include "traceable.h"
#include <memory>

// pragmas to disable the deprecated warnings for SystemC headers

Loading…
Cancel
Save