mirror of
https://github.com/YosysHQ/yosys
synced 2026-05-28 21:06:33 +00:00
Drop YOSYS_ENABLE_HELP_SOURCE since C++20 is required.
This commit is contained in:
parent
7bf5b04df6
commit
7f3e108d12
5 changed files with 7 additions and 27 deletions
1
.github/workflows/prepare-docs.yml
vendored
1
.github/workflows/prepare-docs.yml
vendored
|
|
@ -62,7 +62,6 @@ jobs:
|
|||
echo 'set(CMAKE_CXX_COMPILER clang++ CACHE STRING "")' >> Configuration.cmake
|
||||
echo 'set(YOSYS_COMPILER_LAUNCHER ccache CACHE STRING "")' >> Configuration.cmake
|
||||
echo 'set(YOSYS_VERIFIC_DIR "/usr/local/src/verific_lib" CACHE STRING "")' >> Configuration.cmake
|
||||
echo 'set(YOSYS_ENABLE_HELP_SOURCE ON CACHE BOOL "")' >> Configuration.cmake
|
||||
|
||||
cmake -C Configuration.cmake -B build .
|
||||
cmake --build build -j$procs
|
||||
|
|
|
|||
1
.github/workflows/test-build.yml
vendored
1
.github/workflows/test-build.yml
vendored
|
|
@ -261,7 +261,6 @@ jobs:
|
|||
echo 'set(CMAKE_C_COMPILER clang CACHE STRING "")' >> Configuration.cmake
|
||||
echo 'set(CMAKE_CXX_COMPILER clang++ CACHE STRING "")' >> Configuration.cmake
|
||||
echo 'set(YOSYS_COMPILER_LAUNCHER ccache CACHE STRING "")' >> Configuration.cmake
|
||||
echo 'set(YOSYS_ENABLE_HELP_SOURCE ON CACHE BOOL "")' >> Configuration.cmake
|
||||
|
||||
cmake -C Configuration.cmake -B build .
|
||||
cmake --build build -j$procs
|
||||
|
|
|
|||
|
|
@ -290,7 +290,6 @@ condition(YOSYS_ENABLE_EDITLINE editline_FOUND AND NOT YOSYS_WITHOUT_EDITLINE AN
|
|||
condition(YOSYS_ENABLE_TCL tcl_FOUND AND libtommath_FOUND AND NOT YOSYS_WITHOUT_TCL)
|
||||
condition(YOSYS_ENABLE_PYTHON Python3Embed_FOUND AND PyosysEnv_FOUND AND YOSYS_WITH_PYTHON)
|
||||
condition(YOSYS_ENABLE_VERIFIC YOSYS_VERIFIC_DIR AND zlib_FOUND)
|
||||
condition(YOSYS_ENABLE_HELP_SOURCE NOT CMAKE_BUILD_TYPE MATCHES "^(Release|RelWithDebInfo)$")
|
||||
|
||||
# Describe dependencies and features
|
||||
# CMake 4.0 would let us use proper conditions, but that's too new for now.
|
||||
|
|
|
|||
|
|
@ -23,29 +23,13 @@
|
|||
#include "kernel/yosys_common.h"
|
||||
#include "kernel/yosys.h"
|
||||
|
||||
#ifdef YOSYS_ENABLE_HELP_SOURCE
|
||||
#include <version>
|
||||
# if __cpp_lib_source_location == 201907L
|
||||
#include <source_location>
|
||||
using std::source_location;
|
||||
#define HAS_SOURCE_LOCATION
|
||||
# elif defined(__has_include)
|
||||
# if __has_include(<experimental/source_location>)
|
||||
#include <experimental/source_location>
|
||||
using std::experimental::source_location;
|
||||
#define HAS_SOURCE_LOCATION
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HAS_SOURCE_LOCATION
|
||||
struct source_location { // dummy placeholder
|
||||
int line() const { return 0; }
|
||||
int column() const { return 0; }
|
||||
const char* file_name() const { return "unknown"; }
|
||||
const char* function_name() const { return "unknown"; }
|
||||
static const source_location current(...) { return source_location(); }
|
||||
};
|
||||
#include <version>
|
||||
#if __cpp_lib_source_location >= 201907L
|
||||
#include <source_location>
|
||||
using std::source_location;
|
||||
#else
|
||||
#include <experimental/source_location>
|
||||
using std::experimental::source_location;
|
||||
#endif
|
||||
|
||||
YOSYS_NAMESPACE_BEGIN
|
||||
|
|
|
|||
|
|
@ -17,6 +17,5 @@
|
|||
#cmakedefine YOSYS_ENABLE_TCL
|
||||
#cmakedefine YOSYS_ENABLE_PYTHON
|
||||
#cmakedefine YOSYS_ENABLE_VERIFIC
|
||||
#cmakedefine YOSYS_ENABLE_HELP_SOURCE
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue