Skip to content

Commit

Permalink
Update windows cmake preset (#822)
Browse files Browse the repository at this point in the history
Disable LGPL-only and remove unnecessary options.
  • Loading branch information
riclarsson authored Sep 18, 2024
2 parents 70485db + bb20abc commit 06398f2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 2 additions & 1 deletion 3rdparty/cdisort/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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()
Expand Down
6 changes: 1 addition & 5 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,7 @@
"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",
"NO_TMATRIX": "1"
"NO_OPENMP": "1"
},
"environment": {
"CPPFLAGS": "$env{CFLAGS}",
Expand Down
2 changes: 1 addition & 1 deletion src/core/disort-cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()

0 comments on commit 06398f2

Please sign in to comment.