Files
igl/cmake/LibiglWindows.cmake
T
ikoruk b7124f179f add unit tests for embree (#952)
* add unit tests for embree

* discovered bug with intersect beam and wrote unit test for the fix

* Update EmbreeIntersector.cpp

updated test to catch2

* Update CMakeLists.txt

removed tab to rerun CI

* Update CMakeLists.txt

* Update CMakeLists.txt

* caching value of BUILD_TESTING before resetting it

* Try to build embree statically on Windows.

* Try to enable testing early on.

* Update Catch2 version.

* Set CMake build type.

* Trying to build embree statically.

* Fix static compilation of embree on Windows.

* Cleanup.
2018-11-04 11:00:35 -05:00

23 lines
969 B
CMake

if(MSVC)
if("${MSVC_RUNTIME}" STREQUAL "")
set(MSVC_RUNTIME "static")
endif()
if(${MSVC_RUNTIME} STREQUAL "static")
message(STATUS "MSVC -> forcing use of statically-linked runtime.")
foreach(config ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${config} config)
string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
string(REPLACE /MD /MT CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
endforeach()
string(REPLACE "/MDd" "/MTd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
else()
message(STATUS "MSVC -> forcing use of dynamically-linked runtime.")
foreach(config ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${config} config)
string(REPLACE /MT /MD CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
string(REPLACE /MT /MD CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
endforeach()
string(REPLACE "/MTd" "/MDd" CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
endif()
endif()