|
@@ -36,36 +36,8 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
|
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})
|
|
|
|
|
|
-if(MSVC)
|
|
|
- if("${MSVC_RUNTIME}" STREQUAL "")
|
|
|
- set(MSVC_RUNTIME "static")
|
|
|
- endif()
|
|
|
- set(variables
|
|
|
- CMAKE_C_FLAGS_DEBUG
|
|
|
- CMAKE_C_FLAGS_MINSIZEREL
|
|
|
- CMAKE_C_FLAGS_RELEASE
|
|
|
- CMAKE_C_FLAGS_RELWITHDEBINFO
|
|
|
- CMAKE_CXX_FLAGS_DEBUG
|
|
|
- CMAKE_CXX_FLAGS_MINSIZEREL
|
|
|
- CMAKE_CXX_FLAGS_RELEASE
|
|
|
- CMAKE_CXX_FLAGS_RELWITHDEBINFO
|
|
|
- )
|
|
|
- if(${MSVC_RUNTIME} STREQUAL "static")
|
|
|
- message(STATUS "MSVC -> forcing use of statically-linked runtime.")
|
|
|
- foreach(variable ${variables})
|
|
|
- if(${variable} MATCHES "/MD")
|
|
|
- string(REGEX REPLACE "/MD" "/MT" ${variable} "${${variable}}")
|
|
|
- endif()
|
|
|
- endforeach()
|
|
|
- else()
|
|
|
- message(STATUS "MSVC -> forcing use of dynamically-linked runtime.")
|
|
|
- foreach(variable ${variables})
|
|
|
- if(${variable} MATCHES "/MT")
|
|
|
- string(REGEX REPLACE "/MT" "/MD" ${variable} "${${variable}}")
|
|
|
- endif()
|
|
|
- endforeach()
|
|
|
- endif()
|
|
|
-endif()
|
|
|
+### Set compiler flags for building the tests on Windows with Visual Studio
|
|
|
+include(LibiglWindwows)
|
|
|
|
|
|
### conditionally compile certain modules depending on libraries found on the system
|
|
|
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake)
|