From 92701b9586a1306e8a9c3e73e57a2a77e100652c Mon Sep 17 00:00:00 2001 From: Eisuke Kawashima Date: Sat, 7 Dec 2024 02:57:32 +0900 Subject: [PATCH] build: use appropriate CMake variable --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 359a2764d..f239706f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -117,7 +117,8 @@ include_directories(${PROJECT_BINARY_DIR}) # Compiler flags if(NOT MSVC) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17 -fPIC") + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_POSITION_INDEPENDENT_CODE ON) endif() # Recurse into main project directory