use cxx_std_XX instead of CXX_STANDARD

This commit is contained in:
altalk23 2022-12-13 08:36:50 +03:00
parent 6f30e99292
commit a554f93b93
6 changed files with 6 additions and 11 deletions

View file

@ -6,9 +6,6 @@ string(STRIP "${GEODE_VERSION}" GEODE_VERSION)
project(geode-sdk VERSION ${GEODE_VERSION} LANGUAGES CXX C)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
add_library(${PROJECT_NAME} INTERFACE)
if (NOT DEFINED GEODE_DEBUG AND (CMAKE_BUILD_TYPE STREQUAL Debug OR CMAKE_BUILD_TYPE STREQUAL RelWithDebInfo))

View file

@ -1,8 +1,6 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(Codegen LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 17)
include(../cmake/CPM.cmake)
CPMAddPackage("gh:fmtlib/fmt#9.1.0")
@ -16,6 +14,7 @@ file(GLOB SOURCES
)
add_executable(${PROJECT_NAME} ${SOURCES})
target_compile_features(Codegen PUBLIC cxx_std_17)
target_link_libraries(Codegen PRIVATE fmt::fmt Broma ghc_filesystem)
target_include_directories(Codegen PRIVATE

View file

@ -73,6 +73,8 @@ endif()
add_library(${PROJECT_NAME} SHARED ${SOURCES})
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
make_directory("${GEODE_BIN_PATH}/nightly")
# Prevent SDK from activating a loader build

View file

@ -1,10 +1,9 @@
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED On)
project(GeodeChecksum VERSION 1.0)
add_executable(${PROJECT_NAME} hash.cpp)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
target_link_libraries(${PROJECT_NAME} PUBLIC ghc_filesystem)

View file

@ -1,12 +1,11 @@
cmake_minimum_required(VERSION 3.3.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PROJECT_NAME TestDependency)
project(${PROJECT_NAME} VERSION 1.0.0)
add_library(${PROJECT_NAME} SHARED main.cpp)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
add_compile_definitions(EXPORTING_MOD)

View file

@ -1,12 +1,11 @@
cmake_minimum_required(VERSION 3.3.0)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(PROJECT_NAME TestMod)
project(${PROJECT_NAME} VERSION 1.0.0)
add_library(${PROJECT_NAME} SHARED main.cpp)
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_20)
set(GEODE_LINK_SOURCE ON)
set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")