Skip to content
Snippets Groups Projects
Commit 5625ae9b authored by James Graham's avatar James Graham
Browse files

Added install option to CMake

parent 206ab094
No related branches found
No related tags found
No related merge requests found
project(xtc-length)
cmake_minimum_required(VERSION 2.8)
if("${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=gnu90")
endif()
add_executable(xtc-length xtc-length.c)
install(TARGETS xtc-length RUNTIME DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
......@@ -5,7 +5,9 @@ This program reads the number of frames in a Gromacs XTC file, the number of ato
## To Compile
From the directory where the project was downloaded:
`cmake .; make`
`cmake .; make install`
If you with to install to a directory other than default use `cmake . -DCMAKE_INSTALL_PREFIX=<directory>`
Since there is only one source file it is also possible to call the compiler directly if you prefer:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment