Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ jobs:
strategy:
matrix:
cfg:
- { os: macOS-11, xcode: Xcode_12.5.1 }
- { os: macOS-12, xcode: Xcode_13.4.1 }
- { os: macOS-13, xcode: Xcode_14.3.1 }
- { os: macOS-14, xcode: Xcode_15.3 }
Expand Down
4 changes: 0 additions & 4 deletions .gitmodules

This file was deleted.

10 changes: 2 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,12 @@
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.

cmake_minimum_required(VERSION 3.5 FATAL_ERROR)
cmake_minimum_required(VERSION 3.14 FATAL_ERROR)
project(string_theory)

# We will detect and use optional features in newer C++ standards,
# but C++11 is required at minimum
if(${CMAKE_VERSION} VERSION_GREATER "3.11.99")
set(CMAKE_CXX_STANDARD 20)
elseif(${CMAKE_VERSION} VERSION_GREATER "3.7.99")
set(CMAKE_CXX_STANDARD 17)
else()
set(CMAKE_CXX_STANDARD 14)
endif()
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED OFF)
set(CMAKE_CXX_EXTENSIONS OFF)

Expand Down
17 changes: 6 additions & 11 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,13 @@ set(gtest_hide_internal_symbols ON CACHE INTERNAL "Override gtest default")

set(BUILD_GMOCK OFF CACHE INTERNAL "Override gtest default" FORCE)
set(INSTALL_GTEST OFF CACHE INTERNAL "Override gtest default" FORCE)
add_subdirectory(gtest EXCLUDE_FROM_ALL)

if(CMAKE_COMPILER_IS_GNUCXX)
# Squash an error in gtest that surfaced in GCC 12
target_compile_options(gtest PRIVATE -Wno-restrict)
endif()
include(FetchContent)
FetchContent_Declare(gtest
GIT_REPOSITORY https://github.com/google/googletest.git
GIT_TAG v1.15.2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I seem to recall 1.14.x caused issues with one of the older compilers we were trying to support, which is why we were previously locked on 1.13.0.

Happy to use the latest, but just want to confirm that you're intentionally bumping the version up.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The submodule was actually on 1.12.1, which is the last version to support C++11 (newer versions require C++14). I guess this technically means we'd be dropping support for C++11 for testing, but I think I'm fine with that.

)
FetchContent_MakeAvailable(gtest)

add_executable(st_gtests "")
target_link_libraries(st_gtests PRIVATE gtest gtest_main string_theory)
Expand Down Expand Up @@ -124,11 +125,5 @@ if(ST_BUILD_PROFILE_TEST)
endif()

cmake_policy(PUSH)
if(${CMAKE_VERSION} VERSION_LESS "3.11" AND POLICY CMP0037)
# The "test" target is reserved when ctest is included (CMake 3.11+),
# but older versions of CMake will reserve it always, so we must
# explicitly allow older CMake versions to allow the target name
cmake_policy(SET CMP0037 OLD)
endif()
add_custom_target(test "$<TARGET_FILE:st_gtests>")
cmake_policy(POP)
1 change: 0 additions & 1 deletion test/gtest
Submodule gtest deleted from 58d77f
Loading