Organize binaries into bin and lib directories
authorjulie <julielangou@users.noreply.github.com>
Mon, 7 Feb 2011 14:36:54 +0000 (14:36 +0000)
committerjulie <julielangou@users.noreply.github.com>
Mon, 7 Feb 2011 14:36:54 +0000 (14:36 +0000)
Put executables under 'bin' and libraries under 'lib'.  This is needed
on Windows with shared library builds to put the .dll and .exe files
together for running tests without setting PATH.

CMakeLists.txt

index 946da31c3b6ac1bfa001dd2cd2759ebf5fa262f3..8bc46eea9b8fb51c3c9e5933bd79d7df60fba86f 100644 (file)
@@ -35,6 +35,12 @@ enable_testing()
 
 set(CMAKE_MODULE_PATH ${LAPACK_SOURCE_DIR} ${CMAKE_MODULE_PATH})
 
+# Organize output files.  On Windows this also keeps .dll files next
+# to the .exe files that need them, making tests easy to run.
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LAPACK_BINARY_DIR}/bin)
+set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LAPACK_BINARY_DIR}/lib)
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LAPACK_BINARY_DIR}/lib)
+
 # --------------------------------------------------
 # Check for any necessary platform specific compiler flags
 include( CheckLAPACKCompilerFlags )