-
Notifications
You must be signed in to change notification settings - Fork 156
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake cleanup #75
base: main
Are you sure you want to change the base?
cmake cleanup #75
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am mostly OK with the currently suggested few enhancements. Though, I am not sure whether adding the SC_
prefix to all configuration variables makes senses. IMHO, this should be only the case for variables that are also relevant for libraries/applications consuming the SystemC library.
Personally, I like the output of the configuration summary at the end of the configuration run. We can ask people reporting issues to post this summary to ensure they are using a supported configuration and facilitate reproduction of the issue on our side.
Why would you like to remove the generation of a CMake package for finding the SystemC library? I am not aware of a replacement.
documentation string. The most important variables are: | ||
|
||
BUILD_SHARED_LIBS Build shared instead of static libraries | ||
(default: ON if not targetting Windows). | ||
|
||
BUILD_SOURCE_DOCUMENTATION Build source code documentation using Doxygen | ||
(default: OFF). | ||
|
||
CMAKE_BUILD_TYPE Specifies the build type on single-configuration | ||
generators. (default: Release). | ||
|
||
CMAKE_CXX_STANDARD C++ standard to build all targets. Supported | ||
values are 98, 11, 14, and 17. (default: 98) | ||
|
||
CMAKE_CXX_STANDARD_REQUIRED The with CMAKE_CXX_STANDARD selected C++ standard | ||
is a requirement. (default: ON) | ||
|
||
CMAKE_INSTALL_PREFIX Root directory of the SystemC libraries | ||
installation (defaults to $ENV{SYSTEMC_HOME} | ||
if set to an absolute path and otherwise to either | ||
/opt/systemc/ (Unix-like platforms including | ||
CYGWIN), $ENV{ProgramFiles}/SystemC/ (on Windows | ||
systems), or ${CMAKE_INSTALL_PREFIX}/systemc. | ||
|
||
CMAKE_OSX_ARCHITECTURES Architectures for cross-compilation on Mac OS X | ||
(default: empty, i.e., only for the system | ||
processor). | ||
|
||
CMAKE_VERBOSE_MAKEFILE Generate a verbose Makefile (default: OFF). | ||
|
||
DISABLE_COPYRIGHT_MESSAGE Do not print the copyright message when starting | ||
the application. (default: OFF) | ||
|
||
DISABLE_VIRTUAL_BIND Disable the definition of bind() member | ||
functions of ports and exports as "virtual", | ||
which is incompatible with old TLM library | ||
implementations (< 2.0.2). | ||
|
||
ENABLE_ASSERTIONS Always enable the `sc_assert' expressions | ||
(default: ON) | ||
|
||
ENABLE_IMMEDIATE_SELF_NOTIFICATIONS Enable immediate self-notification of | ||
processes, which is no longer supported due to | ||
changes in IEEE Std 1666-2011 (see | ||
sc_event::notify, 5.10.6). | ||
|
||
ENABLE_PTHREADS Use POSIX threads for SystemC processes instead | ||
of QuickThreads on Unix or Fiber on Windows. | ||
|
||
SystemC_TARGET_ARCH Target architecture according to the | ||
Accellera SystemC conventions set either from | ||
$ENV{SYSTEMC_TARGET_ARCH}, $ENV{SYSTEMC_ARCH}, | ||
or detected by CMake. | ||
|
||
INSTALL_TO_LIB_BUILD_TYPE_DIR Install the libraries to lib-${CMAKE_BUILD_TYPE} | ||
to enable parallel installation of the different | ||
build variants. (default: OFF) | ||
|
||
INSTALL_TO_LIB_TARGET_ARCH_DIR Install the libraries to lib-<target-arch> | ||
to facilitate linking applications, which | ||
build systems assume to find SystemC in | ||
lib-<target-arch>. (default: OFF) | ||
|
||
INSTALL_LIB_TARGET_ARCH_SYMLINK On Unix, install a symlink lib-<target-arch> | ||
to lib-${CMAKE_BUILD_TYPE} facilitating the | ||
linking of user code, which build system assumes | ||
to find the SystemC libraries under | ||
lib-<target-arch>. (default: OFF) | ||
documentation string in the CMakeLists.txt at the top level. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change may be considered for https://github.com/OSCI-WG/systemc/pull/662 as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As a general remark: I opted to not have the SC_
prefix for configuration variables only relevant for building the SystemC library itself. The SC_
prefix for configuration variables, I used when the setting was also relevant when building libraries depending on SystemC or SystemC applications.
if (WIN32 OR CYGWIN) | ||
message (FATAL_ERROR "The compilation of SystemC as a DLL on Windows is currently not supported!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this still relevant since https://github.com/OSCI-WG/systemc/pull/597 got merged?
This is a starting point for further cleanup of the cmake flow.
More things to be discussed: