Skip to content

Commit

Permalink
Merge pull request chipsalliance#3813 from hzeller/20230829-include-c…
Browse files Browse the repository at this point in the history
…onfig

Include config.h where needed.
  • Loading branch information
hzeller authored Aug 29, 2023
2 parents c9a12ac + 3f6fd5f commit 61cbbe1
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 13 deletions.
8 changes: 0 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,6 @@ option(
option(
SURELOG_WITH_TCMALLOC
"Use tcmalloc if installed" ON)
option(
SURELOG_SYMBOLID_DEBUG_ENABLED
"Enable SymbolId debugging" OFF)
option(
SURELOG_PATHID_DEBUG_ENABLED
"Enable PathId debugging" OFF)
Expand All @@ -59,11 +56,6 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

# Make sure both SURELOG_SYMBOLID_DEBUG_ENABLED & UHDM_SYMBOLID_DEBUG_ENABLED
# are set the same
set(UHDM_SYMBOLID_DEBUG_ENABLED ${SURELOG_SYMBOLID_DEBUG_ENABLED}
CACHE BOOL "Enforcing" FORCE)

# Setup code generation directory
set(GENDIR ${CMAKE_CURRENT_BINARY_DIR}/generated)

Expand Down
2 changes: 2 additions & 0 deletions include/Surelog/Common/PathId.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
#define SURELOG_PATHID_H
#pragma once

#include "Surelog/config.h"

#include <Surelog/Common/SymbolId.h>

#include <cstdint>
Expand Down
1 change: 0 additions & 1 deletion include/Surelog/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

#include <uhdm/config.h>

#cmakedefine01 SURELOG_SYMBOLID_DEBUG_ENABLED
#cmakedefine01 SURELOG_PATHID_DEBUG_ENABLED

#if defined(_MSC_VER)
Expand Down
5 changes: 1 addition & 4 deletions shell.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ pkgs.mkShell {
];
shellHook = ''
export CMAKE_CXX_COMPILER_LAUNCHER=ccache
export ADDITIONAL_CMAKE_OPTIONS="-DSURELOG_USE_HOST_GTEST=On -DSURELOG_USE_HOST_ANTLR=On -DANTLR_JAR_LOCATION=${pkgs.antlr4.jarLocation}"
# For the UHDM dependency: tell it to use local capnp
export ADDITIONAL_CMAKE_OPTIONS="$ADDITIONAL_CMAKE_OPTIONS -DUHDM_USE_HOST_CAPNP=On"
export ADDITIONAL_CMAKE_OPTIONS="-DSURELOG_USE_HOST_GTEST=On -DSURELOG_USE_HOST_CAPNP=On -DSURELOG_USE_HOST_ANTLR=On -DANTLR_JAR_LOCATION=${pkgs.antlr4.jarLocation}"
'';
}
2 changes: 2 additions & 0 deletions src/Cache/PPCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@
#include <sys/stat.h>
#include <sys/types.h>

#include "Surelog/config.h"

#if defined(_MSC_VER)
#include <io.h>
#else
Expand Down
2 changes: 2 additions & 0 deletions src/Cache/ParseCache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
#include <sys/stat.h>
#include <sys/types.h>

#include "Surelog/config.h"

#if defined(_MSC_VER)
#include <io.h>
#else
Expand Down

0 comments on commit 61cbbe1

Please sign in to comment.