aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2022-04-04 11:00:52 +0200
committerHampusM <hampus@hampusmat.com>2022-06-13 17:56:58 +0200
commit9e61e23ad2ac72030f14ea59e502c19d52995f3a (patch)
treef213cad8eb3b5b134ebea608934098708fdc6359
parent40c828455d094854d9e531fc7dd0d1a0244957b7 (diff)
build: use libc++
-rw-r--r--CMakeLists.txt1
-rw-r--r--src/CMakeLists.txt6
2 files changed, 4 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1dfce91..5afa219 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.2.0)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
set(CMAKE_CXX_STANDARD 20)
+set(CMAKE_CXX_EXTENSIONS off)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6daeadb..679949b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -51,7 +51,7 @@ target_compile_options(
-Wsign-conversion -Wsign-promo
-Wstrict-overflow=5 -Wswitch-default
-Wundef -Werror
- -pedantic -fsanitize=address -fno-exceptions
+ -pedantic -fsanitize=address -fno-exceptions -stdlib=libc++
)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
@@ -64,6 +64,6 @@ endif()
target_include_directories(${PROJECT_NAME} PRIVATE .)
-target_link_libraries_system(${PROJECT_NAME} ctre fmt GSL)
+target_link_libraries_system(${PROJECT_NAME} ctre fmt::fmt-header-only GSL)
-target_link_options(${PROJECT_NAME} PRIVATE -fsanitize=address)
+target_link_options(${PROJECT_NAME} PRIVATE -fsanitize=address -stdlib=libc++)