Skip to content

Commit

Permalink
common.cmake: downgrade C++ standard version
Browse files Browse the repository at this point in the history
I was testing the new version (C++20) with some existing code, and
immediately got build errors.

Apparently, now this:

    const auto s = u8"hello";

means that s has the type of const char8_t *const, where char8_t is some
batshit insanity with 0 backwards compatibility. For example, you cannot
make a std::string out of this??? Fuck that, and fuck C++ committee
morons.
  • Loading branch information
egor-tensin committed Jul 3, 2023
1 parent 0e35c67 commit 23a96df
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
# Add this to the top-level CMakeLists.txt (unless a higher version has already
# been specified):
#
# cmake_minimum_required(VERSION 3.12)
# cmake_minimum_required(VERSION 3.8)

# Without this policy set, this line:
#
Expand Down Expand Up @@ -54,7 +54,7 @@ if(parent_dir)
endif()

if(NOT DEFINED CC_CXX_STANDARD)
set(CC_CXX_STANDARD "20" CACHE STRING "C++ standard version")
set(CC_CXX_STANDARD "17" CACHE STRING "C++ standard version")
endif()
if(NOT DEFINED CC_COMMON_OPTIONS)
option(CC_COMMON_OPTIONS "Set common compiler options" "${default_value}")
Expand Down
2 changes: 1 addition & 1 deletion examples/boost/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.8)

project(example_boost)

Expand Down
2 changes: 1 addition & 1 deletion examples/dynamic/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.8)

project(example_dynamic)

Expand Down
2 changes: 1 addition & 1 deletion examples/simple/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.8)

project(example_simple)

Expand Down
2 changes: 1 addition & 1 deletion examples/static/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12)
cmake_minimum_required(VERSION 3.8)

project(example_static)

Expand Down

0 comments on commit 23a96df

Please sign in to comment.