From e501cf2193162bafcc13dc998c5755de594cdd61 Mon Sep 17 00:00:00 2001 From: Gary Talent Date: Sat, 7 Nov 2020 17:59:17 -0600 Subject: [PATCH] [ox] Fix MSVC build (synced from 40f3c4ecb5e807470819fca2826280602308d9ca) --- src/CMakeLists.txt | 2 -- src/ox/clargs/CMakeLists.txt | 2 +- src/ox/fs/CMakeLists.txt | 2 +- src/ox/oc/CMakeLists.txt | 4 +++- src/ox/std/CMakeLists.txt | 4 +++- src/ox/std/test/CMakeLists.txt | 2 +- 6 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 81ecf2438..cf390447a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,3 +1 @@ -cmake_minimum_required(VERSION 2.8) - add_subdirectory(ox) diff --git a/src/ox/clargs/CMakeLists.txt b/src/ox/clargs/CMakeLists.txt index 9dde56029..d0471a8e7 100644 --- a/src/ox/clargs/CMakeLists.txt +++ b/src/ox/clargs/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.10) add_library( OxClArgs diff --git a/src/ox/fs/CMakeLists.txt b/src/ox/fs/CMakeLists.txt index 9c912535b..029f7889c 100644 --- a/src/ox/fs/CMakeLists.txt +++ b/src/ox/fs/CMakeLists.txt @@ -10,7 +10,7 @@ add_library( ) if(NOT OX_BARE_METAL) - if(NOT APPLE) + if(NOT APPLE AND NOT MSVC) target_link_libraries( OxFS PUBLIC stdc++fs diff --git a/src/ox/oc/CMakeLists.txt b/src/ox/oc/CMakeLists.txt index 6a621aaa9..653a5a200 100644 --- a/src/ox/oc/CMakeLists.txt +++ b/src/ox/oc/CMakeLists.txt @@ -6,7 +6,9 @@ add_library( find_package(jsoncpp REQUIRED) -target_compile_options(OxOrganicClaw PRIVATE -Wsign-conversion) +if(NOT MSVC) + target_compile_options(OxOrganicClaw PRIVATE -Wsign-conversion) +endif() target_link_libraries( OxOrganicClaw PUBLIC diff --git a/src/ox/std/CMakeLists.txt b/src/ox/std/CMakeLists.txt index c4ced4798..9414f99e3 100644 --- a/src/ox/std/CMakeLists.txt +++ b/src/ox/std/CMakeLists.txt @@ -14,7 +14,9 @@ add_library( trace.cpp ) -target_compile_options(OxStd PRIVATE -Wsign-conversion) +if(NOT MSVC) + target_compile_options(OxStd PRIVATE -Wsign-conversion) +endif() if(NOT OX_BARE_METAL) set_property( diff --git a/src/ox/std/test/CMakeLists.txt b/src/ox/std/test/CMakeLists.txt index b38ded6e1..6924c4c61 100644 --- a/src/ox/std/test/CMakeLists.txt +++ b/src/ox/std/test/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.10) add_executable( StdTest