Skip to content

Commit

Permalink
feat: finally prepared for c++20 or c++17
Browse files Browse the repository at this point in the history
  • Loading branch information
igormcoelho committed Oct 18, 2023
1 parent c96b6f5 commit 734c7c0
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
build --cxxopt='-std=c++20'
build --cxxopt='-std=c++17'
build --cxxopt='-Wno-macro-redefined'
build --cxxopt='-Wno-builtin-macro-redefined'
#### https://github.com/llvm/llvm-project/issues/56709
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ If you want to help, please see instructions on [Development.md](./Development.m

### Advice for online environments

OptFrame now supports both `c++17` and `c++20`.

Before installing optframe online (such as google colab), check C++ compiler (typically GCC) version:

`x86_64-linux-gnu-gcc -v`
Expand Down
2 changes: 1 addition & 1 deletion docs/source/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Installing `optframe` package in Python is quite easy with pip.
python -m pip install optframe
.. warning::
The standard configuration will require a modern c++ compiler with C++20 support.
The standard configuration will require a modern c++ compiler with C++17 support, or maybe C++20.
Note that, by 2022, this is already standard on recent MacOS software and Ubuntu 22.04 (g++ v11 is recommended... g++ v9 will not work!).
On Windows/WSL environment, it is possible to upgrade WSL and g++.
Native Windows C++ compiler has not been tested yet... please try WSL first.
Expand Down
10 changes: 3 additions & 7 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def run(self):
# git fetch
# git checkout origin/master -ft
subprocess.check_call(
['git', 'clone', '--depth', '1', '--branch', '5.0.14', 'https://github.com/optframe/optframe', 'optframe-git'])
['git', 'clone', '--depth', '1', '--branch', '5.0.15', 'https://github.com/optframe/optframe', 'optframe-git'])
# ===== check that clone() was done fine ======
# subprocess.check_call(
# ['ls', '-la', 'optframe-git'])
Expand Down Expand Up @@ -94,12 +94,8 @@ def get_ext_filename(self, ext_name):
this_directory, "./optframe-git/include")],
#
# ====================================================
# TODO: we should start using c++20 ASAP...
# Are Ubuntu / Windows / WSL2 users ready?
#
extra_compile_args=['--std=c++20']
# IF ONLY C++17 IS SUPPORTED, ON GCC, USE THIS (WE NEED CONCEPTS):
# extra_compile_args=['--std=c++17', '-fconcepts']
# In the future, try c++20. For now, too early.
extra_compile_args=['--std=c++17']
),
],
# package_data includes data from 'src/' folder, by default
Expand Down
2 changes: 1 addition & 1 deletion thirdparty/optframe-external

0 comments on commit 734c7c0

Please sign in to comment.