forked from PolyChord/PolyChordLite
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
likelyhood examples, lib for each of them
- Loading branch information
Showing
3 changed files
with
28 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
project(likelyhoods) | ||
|
||
# only include the tree | ||
add_subdirectory(examples) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
project(examples) | ||
|
||
# parse each example separately | ||
file(GLOB ${PROJECT_NAME}_sources "*.f90" "*.F90") | ||
set(${PROJECT_NAME}_library_list "") # hold all the targets we make | ||
foreach(filename ${${PROJECT_NAME}_sources}) | ||
# strip the file name | ||
get_filename_component(archive_name ${filename} NAME_WE) | ||
add_library(${archive_name} ${filename}) | ||
|
||
# add to target list | ||
list(APPEND ${PROJECT_NAME}_library_list ${archive_name}) | ||
|
||
# tell the user | ||
message("Adding example: ${archive_name} (from ${filename})") | ||
endforeach() | ||
|
||
|
||
# standard: where to put the targets | ||
install(TARGETS ${${PROJECT_NAME}_library_list} | ||
RUNTIME DESTINATION ${target_bin_dir} | ||
LIBRARY DESTINATION ${target_lib_dir} | ||
ARCHIVE DESTINATION ${target_lib_dir}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters