From 3d95d30518e03b3f79225a34ae41adb4d12e29c4 Mon Sep 17 00:00:00 2001 From: Oliver Lemke Date: Wed, 18 Sep 2024 08:43:32 +0200 Subject: [PATCH 1/3] Don't enable LGPL on Windows --- CMakePresets.json | 1 - 1 file changed, 1 deletion(-) diff --git a/CMakePresets.json b/CMakePresets.json index a6514b78c0..48b96d56fa 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -51,7 +51,6 @@ "CMAKE_C_COMPILER": "cl.exe", "CMAKE_CXX_COMPILER": "cl.exe", "ENABLE_FORTRAN": "0", - "ENABLE_ARTS_LGPL": "1", "NO_FASTEM": "1", "NO_OPENMP": "1", "NO_RT4": "1", From 73b78ea79c6d1b0b7c8833b6edf6250606ecec27 Mon Sep 17 00:00:00 2001 From: Oliver Lemke Date: Wed, 18 Sep 2024 08:44:03 +0200 Subject: [PATCH 2/3] Remove unneeded options from msvc config --- CMakePresets.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 48b96d56fa..16718ad7a4 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -51,10 +51,7 @@ "CMAKE_C_COMPILER": "cl.exe", "CMAKE_CXX_COMPILER": "cl.exe", "ENABLE_FORTRAN": "0", - "NO_FASTEM": "1", - "NO_OPENMP": "1", - "NO_RT4": "1", - "NO_TMATRIX": "1" + "NO_OPENMP": "1" }, "environment": { "CPPFLAGS": "$env{CFLAGS}", From bb20abc1a53d1b322b30b0dcaef75f4b2dbc488e Mon Sep 17 00:00:00 2001 From: Oliver Lemke Date: Wed, 18 Sep 2024 09:44:04 +0200 Subject: [PATCH 3/3] Disable cdisort on MSVC --- 3rdparty/cdisort/CMakeLists.txt | 3 ++- src/core/disort-cpp/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/3rdparty/cdisort/CMakeLists.txt b/3rdparty/cdisort/CMakeLists.txt index 9039db6dd9..a2955039d0 100644 --- a/3rdparty/cdisort/CMakeLists.txt +++ b/3rdparty/cdisort/CMakeLists.txt @@ -1,4 +1,4 @@ -if(NOT ENABLE_ARTS_LGPL) +if(NOT ENABLE_ARTS_LGPL AND NOT CMAKE_CXX_COMPILER_ID MATCHES MSVC) add_library (cdisort STATIC cdisort.cc locate.c @@ -12,6 +12,7 @@ add_executable(disotest target_link_libraries(disotest m) set(CDISORT_COMPILE_FLAGS "-Wno-all -Wno-unused-parameter -Wno-conversion -Wno-shadow -Wno-float-conversion") + if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") set(CDISORT_COMPILE_FLAGS "${CDISORT_COMPILE_FLAGS} -Wno-format-overflow") endif() diff --git a/src/core/disort-cpp/CMakeLists.txt b/src/core/disort-cpp/CMakeLists.txt index d342292c53..cf035b5a08 100644 --- a/src/core/disort-cpp/CMakeLists.txt +++ b/src/core/disort-cpp/CMakeLists.txt @@ -44,7 +44,7 @@ add_dependencies(check-deps disort-cpp-test-9) add_dependencies(check-deps disort-cpp-test-11) add_dependencies(check-deps disort-test-clearsky-multilayer) -if (NOT ENABLE_ARTS_LGPL) +if (NOT ENABLE_ARTS_LGPL AND NOT CMAKE_CXX_COMPILER_ID MATCHES MSVC) add_executable(test-old-impl test-old-impl.cpp) target_link_libraries(test-old-impl disort-cpp artstime cdisort) endif ()