diff --git a/build.ps1 b/build.ps1 index f43bc470..e13a4212 100644 --- a/build.ps1 +++ b/build.ps1 @@ -1,6 +1,6 @@ param ($Prefix="C:\clang-uml", $BuildType="Release") -cmake -S . -B $BuildType -DCMAKE_PREFIX_PATH="$Prefix" -Thost=x64 +cmake -S . -B $BuildType -DCMAKE_PREFIX_PATH="$Prefix" -DENABLE_CXX_MODULES_TEST_CASES=OFF -Thost=x64 cmake --build $BuildType --config $BuildType # Create compile commands in Visual Studio diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index e052d584..015fba87 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -27,7 +27,7 @@ target_compile_options(clang-umllib PRIVATE $<$,$>: -Werror -Wall -Wextra -Wno-unused-parameter -Wno-deprecated-declarations ${CUSTOM_COMPILE_OPTIONS}> - $<$:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>) + $<$:/MP /MD /W1 /bigobj /wd4291 /wd4624 /wd4244>) target_compile_definitions(clang-umllib PRIVATE $<$: -DLLVM_FORCE_USE_OLD_TOOLCHAIN @@ -44,7 +44,7 @@ target_compile_options(clang-uml PRIVATE $<$,$>: -Werror -Wall -Wextra -Wno-unused-parameter -Wno-deprecated-declarations ${CUSTOM_COMPILE_OPTIONS}> - $<$:/MP /W1 /bigobj /wd4291 /wd4624 /wd4244>) + $<$:/MP /MD /W1 /bigobj /wd4291 /wd4624 /wd4244>) target_compile_definitions(clang-uml PRIVATE ${ENABLE_BACKWARD_CPP}) target_link_libraries(clang-uml diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2e71d867..ffc38e33 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -100,7 +100,7 @@ foreach(TEST_NAME ${TEST_NAMES}) -Wno-unused-parameter -Wno-unused-variable -Wno-attributes -Wno-nonnull -Wno-deprecated-enum-enum-conversion ${CUSTOM_COMPILE_OPTIONS}> - $<$:/W1 /bigobj /wd4624>>) + $<$:/MP /MD /W1 /bigobj /wd4624>>) target_link_libraries(${TEST_NAME} PRIVATE ${CLANG_UML_TEST_LIBRARIES}) endforeach() diff --git a/tests/test_model.cc b/tests/test_model.cc index 3b925a6c..e9fc4cf9 100644 --- a/tests/test_model.cc +++ b/tests/test_model.cc @@ -428,6 +428,7 @@ TEST_CASE("Test common::model::package full_name", "[unit-test]") "namespaceA_1_1B_1_1C_1_1D_1_1E_1_1F_1_1G.html"); } +#if !defined(_MSC_VER) { auto using_namespace = path{"/A/B/C", path_type::kFilesystem}; auto pkg = package(using_namespace, path_type::kFilesystem); @@ -437,6 +438,17 @@ TEST_CASE("Test common::model::package full_name", "[unit-test]") CHECK(pkg.full_name(false) == "A/B/C/D/E/F/G"); CHECK(pkg.full_name(true) == "D/E/F/G"); } +#else + { + auto using_namespace = path{"A\\B\\C", path_type::kFilesystem}; + auto pkg = package(using_namespace, path_type::kFilesystem); + pkg.set_name("G"); + pkg.set_namespace(path{"A\\B\\C\\D\\E\\F", path_type::kFilesystem}); + + CHECK(pkg.full_name(false) == "A\\B\\C\\D\\E\\F\\G"); + CHECK(pkg.full_name(true) == "D\\E\\F\\G"); + } +#endif { auto using_namespace = path{"A.B.C", path_type::kModule};