diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 37106c7..c3d3e57 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -1,46 +1,66 @@ cmake_minimum_required(VERSION 3.0) if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR) project(GooseFEM-test) find_package(GooseFEM REQUIRED CONFIG) endif() option(WARNINGS "Show build warnings" ON) option(SIMD "Enable xsimd" ON) option(ASSERT "Enable assertions" ON) option(DEBUG "Enable all assertions" ON) find_package(Catch2 REQUIRED) -find_package(GMatElastic REQUIRED) - -add_executable(main - main.cpp - ElementHex8.cpp - ElementQuad4.cpp - Iterate.cpp - Matrix.cpp - MatrixDiagonal.cpp - Mesh.cpp - MeshQuad4.cpp - Vector.cpp - VectorPartitioned.cpp - Example_hybrid-material.cpp) - -target_link_libraries(main PRIVATE Catch2::Catch2 GMatElastic GooseFEM) +if(!WIN32) + find_package(GMatElastic REQUIRED) +endif() + +if(!WIN32) + add_executable(main + main.cpp + ElementHex8.cpp + ElementQuad4.cpp + Iterate.cpp + Matrix.cpp + MatrixDiagonal.cpp + Mesh.cpp + MeshQuad4.cpp + Vector.cpp + VectorPartitioned.cpp + Example_hybrid-material.cpp) +else() + add_executable(main + main.cpp + ElementHex8.cpp + ElementQuad4.cpp + Iterate.cpp + Matrix.cpp + MatrixDiagonal.cpp + Mesh.cpp + MeshQuad4.cpp + Vector.cpp + VectorPartitioned.cpp) +endif() + +if(!WIN32) + target_link_libraries(main PRIVATE Catch2::Catch2 GooseFEM GMatElastic) +else() + target_link_libraries(main PRIVATE Catch2::Catch2 GooseFEM) +endif() if (SIMD) target_link_libraries(main PRIVATE xtensor::optimize xtensor::use_xsimd) endif() if (WARNINGS) target_link_libraries(main PRIVATE GooseFEM::compiler_warnings) endif() if (ASSERT) target_link_libraries(main PRIVATE GooseFEM::assert) endif() if (DEBUG) target_link_libraries(main PRIVATE GooseFEM::debug) endif()