Skip to content

Commit

Permalink
Merge pull request #11 from eic/make-install
Browse files Browse the repository at this point in the history
fix: allow for `make install` into CMAKE_INSTALL_PREFIX
  • Loading branch information
zsweger authored Sep 29, 2022
2 parents 72d6a04 + 09d906b commit bd8bfad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
7 changes: 7 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,13 @@ add_custom_command (TARGET Starlib POST_BUILD COMMAND touch ARGS slight.txt)
add_custom_command (TARGET Starlib POST_BUILD COMMAND cp ARGS slight.txt slight.txt.bak)
add_custom_command (TARGET Starlib POST_BUILD COMMAND echo ARGS '' > slight.txt )

# Installation of targets
install(TARGETS e_starlight ${THIS_LIB}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)

message(STATUS "Cmake did not find any errors. run 'make' to build the project.")
message(STATUS "On multi-core machines 'make -j#', where # is the number of parallel jobs, can speedup compilation considerably.")
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ cmake ~/the_path/estarlight
```
(g)make
```
* The compilation will produce an executable to run: estarlight
* The compilation will produce an executable to run: estarlight
* Install the code to `CMAKE_INSTALL_PREFIX` (defaults to `/usr/local`)
```
(g)make install
```

* Set up the desired running conditions in the input file:
```
Expand Down Expand Up @@ -127,3 +131,4 @@ To compile eSTARlight with HepMC3 output enabled, use:
```
cmake /pathto/estarlight -DENABLE_HEPMC3=ON -DHepMC3_DIR=/pathto/hepmc3/hepmc3-install
```
NOTE: running `make install` on your eSTARlight build when using HepMC3 may result in errors on some systems. If this is the case, it is recommended to not install eSTARlight when using HepMC3 and simply run the code from the build directory.

0 comments on commit bd8bfad

Please sign in to comment.