SET(TARGET_RUN ${TARGET})
ENDIF()
- #
- # Hack for Cygwin targets: Export PATH to point to the dynamic library.
- # This is more or less harmless, so do this unconditionally.
- #
- FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake
- "SET(ENV{PATH} \"${CMAKE_CURRENT_BINARY_DIR}:${DEAL_II_PATH}/${DEAL_II_LIBRARY_RELDIR}:\$ENV{PATH}\")\n"
- "EXECUTE_PROCESS(COMMAND ${TARGET_RUN}\n"
- " RESULT_VARIABLE _return_value\n"
- " )\n"
- "IF(NOT \"\${_return_value}\" STREQUAL \"0\")\n"
- " MESSAGE(SEND_ERROR \"\nProgram terminated with exit code: \${_return_value}\")\n"
- "ENDIF()\n"
- )
+ IF( CMAKE_SYSTEM_NAME MATCHES "CYGWIN"
+ OR CMAKE_SYSTEM_NAME MATCHES "Windows" )
+ #
+ # Hack for Cygwin and Windows targets: Export PATH to point to the
+ # dynamic library.
+ #
+ FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake
+ "SET(ENV{PATH} \"${CMAKE_CURRENT_BINARY_DIR};${DEAL_II_PATH}/${DEAL_II_EXECUTABLE_RELDIR};\$ENV{PATH}\")\n"
+ "EXECUTE_PROCESS(COMMAND ${TARGET_RUN}\n"
+ " RESULT_VARIABLE _return_value\n"
+ " )\n"
+ "IF(NOT \"\${_return_value}\" STREQUAL \"0\")\n"
+ " MESSAGE(SEND_ERROR \"\nProgram terminated with exit code: \${_return_value}\")\n"
+ "ENDIF()\n"
+ )
+ SET(_command
+ ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake
+ )
+ ELSE()
+ SET(_command ${TARGET_RUN})
+ ENDIF()
+
IF(NOT "${TARGET_RUN}" STREQUAL "")
ADD_CUSTOM_TARGET(run
- COMMAND ${CMAKE_COMMAND} -P ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/run_target.cmake
+ COMMAND ${_command}
DEPENDS ${TARGET}
COMMENT "Run ${TARGET} with ${CMAKE_BUILD_TYPE} configuration"
)
<ol>
+ <li> Added support for Windows: It is now possible again to use gcc on Windows
+ in order to compile the library. We support gcc-4.8.1 on Cygwin64 and MinGW-w64.
+ <br>
+ (Matthias Maier, 2013/11/1)
+ </li>
+
<li> Changed: step-9, step-13 and step-14 have been converted to use the
more modern WorkStream concept for assembling linear systems in parallel.
<br>
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${DEAL_II_LIBRARY_RELDIR}"
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
- RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_LIBRARY_RELDIR}"
+ RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/${DEAL_II_EXECUTABLE_RELDIR}"
)
TARGET_LINK_LIBRARIES(${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
INSTALL(TARGETS ${DEAL_II_BASE_NAME}${DEAL_II_${build}_SUFFIX}
EXPORT ${DEAL_II_PROJECT_CONFIG_NAME}Targets
- DESTINATION ${DEAL_II_LIBRARY_RELDIR}
+ RUNTIME DESTINATION ${DEAL_II_EXECUTABLE_RELDIR}
+ LIBARARY DESTINATION ${DEAL_II_LIBRARY_RELDIR}
+ ARCHIVE DESTINATION ${DEAL_II_LIBRARY_RELDIR}
COMPONENT library
)
ENDFOREACH()