-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[cmake] Overhaul of cmake files and project structure
- Loading branch information
Showing
68 changed files
with
225 additions
and
212 deletions.
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
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,15 +1,31 @@ | ||
add_subdirectory(cmake) | ||
|
||
if(NOT CMAKE_INSTALL_PREFIX STREQUAL TRIQS_ROOT AND NOT IS_SUBPROJECT) | ||
if(NOT IS_SUBPROJECT | ||
AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr" | ||
AND NOT CMAKE_INSTALL_PREFIX STREQUAL "/usr/local" | ||
) | ||
|
||
configure_file(${PROJECT_NAME}.modulefile.in ${PROJECT_NAME}.modulefile @ONLY) | ||
configure_file(${PROJECT_NAME}vars.sh.in ${PROJECT_NAME}vars.sh @ONLY) | ||
configure_file(c2py.modulefile.in c2py.modulefile @ONLY) | ||
configure_file(c2pyvars.sh.in c2pyvars.sh @ONLY) | ||
|
||
install( | ||
FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.modulefile | ||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}vars.sh | ||
${CMAKE_CURRENT_BINARY_DIR}/c2py.modulefile | ||
${CMAKE_CURRENT_BINARY_DIR}/c2pyvars.sh | ||
DESTINATION share/c2py | ||
) | ||
|
||
message(STATUS "*********************************************************************************") | ||
message(STATUS "* Custom install Location. Use: ") | ||
message(STATUS "* ") | ||
message(STATUS "* source ${CMAKE_INSTALL_PREFIX}/share/c2py/c2pyvars.sh ") | ||
message(STATUS "* ") | ||
message(STATUS "* to set up the environment variables ") | ||
if(DEFINED ENV{MODULEPATH}) | ||
message(STATUS "* ") | ||
message(STATUS "* Consider copying ${CMAKE_CURRENT_BINARY_DIR}/c2py.modulefile ") | ||
message(STATUS "* into your environment module directories ") | ||
endif() | ||
message(STATUS "*********************************************************************************") | ||
|
||
endif() |
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
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 |
---|---|---|
@@ -1,10 +1,10 @@ | ||
configure_file(${PROJECT_NAME}-config.cmake.in ${PROJECT_NAME}-config.cmake @ONLY) | ||
configure_file(${PROJECT_NAME}-config-version.cmake.in ${PROJECT_NAME}-config-version.cmake @ONLY) | ||
configure_file(c2py-config.cmake.in c2py-config.cmake @ONLY) | ||
configure_file(c2py-config-version.cmake.in c2py-config-version.cmake @ONLY) | ||
install( | ||
FILES | ||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake | ||
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config-version.cmake | ||
DESTINATION lib/cmake/${PROJECT_NAME} | ||
${CMAKE_CURRENT_BINARY_DIR}/c2py-config.cmake | ||
${CMAKE_CURRENT_BINARY_DIR}/c2py-config-version.cmake | ||
DESTINATION lib/cmake/c2py | ||
) | ||
|
||
#install(EXPORT ${PROJECT_NAME}-targets NAMESPACE ${PROJECT_NAME}:: DESTINATION lib/cmake/${PROJECT_NAME}) | ||
install(EXPORT c2py-targets NAMESPACE c2py:: DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/c2py) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.