Skip to content

Find systemc discovery - #347

Merged
aut0 merged 2 commits into
accellera-official:mainfrom
eactor:find_systemc_discovery
Jul 7, 2026
Merged

Find systemc discovery#347
aut0 merged 2 commits into
accellera-official:mainfrom
eactor:find_systemc_discovery

Conversation

@eactor

@eactor eactor commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

find_package(SystemCLanguage) from CCI happens in configuration/CMakeLists.txt (sub-directory) which only hardcodes /opt/systemc this will make cmake look into /opt/systemc/lib/cmake/SystemCLanguage and /opt/systemc/lib64/cmake/SystemCLanguage

It would be nice if cmake would discover SystemC installations by SYSTEMC_HOME. In addition it should still discover it, if custom CMAKE_INSTALL_LIBDIR was used which is not /lib or /lib64. (e.g. linux64 ...)

The code therefore adds $SYSTEMC_HOME to CMAKE_PREFIX_PATH and the underlying lib dirs

  • Globs all lib* subdirs under SYSTEMC_HOME (catches lib-linux64, lib-mingw-w64, etc.) and adds them too
  • This runs before configuration/CMakeLists.txt calls find_package(SystemCLanguage), so the cmake config files will be found regardless of which platform-specific CMAKE_INSTALL_LIBDIR was used when building SystemC.

I'm not a cmake specialist but I'm currently working on cmake for SystemC AMS were needed it as well, feedback is welcome.

@aut0
aut0 merged commit 316112b into accellera-official:main Jul 7, 2026
35 checks passed
eactor added a commit to eactor/cci that referenced this pull request Aug 11, 2026
PR accellera-official#347 allows custom SystemC library directories by adding all ${SYSTEMC_HOME}/lib* directories to the search path.

When multiple variants exist, prefer ${SYSTEMC_HOME}/${CMAKE_INSTALL_LIBDIR} first. While CCI and SystemC may use different install settings, this is our best available guess and avoids relying on glob order when both use the same configuration.

The existing lib* search remains as fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants