-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake modernization to 1.2.x #203
Open
loriab
wants to merge
19
commits into
PCMSolver:release/1.2
Choose a base branch
from
loriab:v123_plus_ming
base: release/1.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
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
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
CMake and Windows and OSX arm64 modernization for the 1.2.x branch. Recommend forward-porting to master bevore the 1.3.1 release.
How Has This Been Tested?
Todos
Most of this is a standard checklist. there's pcm specialities at the end.
update old files
copy over xhost.cmake that has new compilers. import it instead of one-liner. adapt if C, not CXX.no such file${PN}
in main project CMake as they tend to get clobbered in/afterfind_package
any new project-specific options, prepend in project-case, like ambit_ENABLE_PYTHON. does not apply to e.g., BUILD_TESTING, BUILD_SHARED_LIBSnone that I seePython
update anynoneset(Python_ADDITIONAL_VERSIONS
cmake_minimum_required(VERSION 3.16)
for Py detectionremove any old FindPythonLibsNew.cmakenoneif any pybind11, check that find_package(Python) before find_package(pybind11)no pb11if any pybind11 target, remove PREFIX/SUFFIX from propertiesno pb11editable config.cmake location
option(<project>_INSTALL_CMAKEDIR)
to make Config.cmake location editable with variable, incl any subprojects like TargetLAPACK.CMAKECONFIG_INSTALL_DIR
wasn't editable, so may as well.recipe: specify in bld.bat asno need since it was LIBRARY_PREFIX in recipe for Win-D <project>_INSTALL_CMAKEDIR="Library\share\cmake\<project>" ^
ifCMAKE_INSTALL_PREFIX="%PREFIX%"
<project>_DIR
and any TargetLAPACK, etc.)modernize target install/export
make properties target-centered, particularly for FetchContent usage. target and
find_package(<package>)
should provide same info.project(CheMPS2)
--> CheMPS2_VERSIONadd_library(ambit::ambit ALIAS ambit-shared)
. Favor shared if both can be built together.modernize
<project>Config.cmake.in
set(amb ambit) # NameSpace
. PN gets overwritten a lot, so let's specialize it.Find<project>.cmake
rather than<project>Config.cmake
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
~ nonecheck_required_components(<project>)
(probably already present)<project>Targets.cmake
before all components confirmed found and all dependencies confirmed foundfind_project(<project>)
to check that vars match target (same as 4th bullet prev. section)check that all dependencies are handled (sometimes outsourced to psi4, like BLAS for dkh)
add TargetLAPACK if using BLAS/LAPACKnonecopy over new FindTargetLAPACK, FindTargetHDF5 as needed. modify if only use BLASnoneinstall the Find files with the Confignonein config file, add anystill just zlibfind_dependency
that we were leaving for psi4 beforehandling lib and pylib as separate projects
PYMOD_INSTALL_LIBDIR
but added prefix/
to match other psi-like projectsparticular for this project: pcmsolver
PYMOD_INSTALL_LIBDIR
defaults to/python
(slash added) to match other projectsrun_pcm
to an exported target (so I could test the c-f package) with install, alias, export, etc.Types of changes
Status