-
Notifications
You must be signed in to change notification settings - Fork 0
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
Update and cleanup cmake files #5
Open
ClausKlein
wants to merge
8
commits into
develop
Choose a base branch
from
feature/update-cmake-modules
base: develop
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
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
9cd5fad
Update and cleanup cmake files
ClausKlein a3356aa
update githup action versions
ClausKlein fdde14c
Fix Ci build problems
ClausKlein a2597e3
Try to fix windows problems with Boost::ut
ClausKlein 6cbe688
Back to old stable version for Boost::ui
ClausKlein 28460a7
Use Visual Studio 17 2022 on CI
ClausKlein b1e0ed4
set BUILD_SHARED_LIBS=NO for windows
ClausKlein 4a7c409
BOOST_UT_DISABLE_MODULE
ClausKlein File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,77 +1,123 @@ | ||
format: | ||
tab_size: 2 | ||
line_width: 100 | ||
dangle_parens: true | ||
|
||
markup: | ||
enable_markup: false | ||
|
||
parse: | ||
additional_commands: | ||
cpmaddpackage: | ||
pargs: | ||
nargs: '*' | ||
flags: [] | ||
spelling: CPMAddPackage | ||
kwargs: &cpmaddpackagekwargs | ||
NAME: 1 | ||
FORCE: 1 | ||
VERSION: 1 | ||
GIT_TAG: 1 | ||
kwargs: | ||
DOWNLOAD_COMMAND: 1 | ||
DOWNLOAD_NAME: 1 | ||
DOWNLOAD_NO_EXTRACT: 1 | ||
DOWNLOAD_ONLY: 1 | ||
FIND_PACKAGE_ARGUMENTS: 1 | ||
FORCE: 1 | ||
GITHUB_REPOSITORY: 1 | ||
GITLAB_REPOSITORY: 1 | ||
GIT_REPOSITORY: 1 | ||
GIT_SHALLOW: 1 | ||
GIT_TAG: 1 | ||
HTTP_PASSWORD: 1 | ||
HTTP_USERNAME: 1 | ||
NAME: 1 | ||
NO_CACHE: 1 | ||
OPTIONS: + | ||
SOURCE_DIR: 1 | ||
SVN_REPOSITORY: 1 | ||
SVN_REVISION: 1 | ||
SOURCE_DIR: 1 | ||
URL: 1 | ||
URL_HASH: 1 | ||
URL_MD5: 1 | ||
VERSION: 1 | ||
pargs: | ||
flags: [] | ||
nargs: '*' | ||
spelling: CPMAddPackage | ||
cpmdeclarepackage: | ||
kwargs: | ||
DOWNLOAD_COMMAND: 1 | ||
DOWNLOAD_NAME: 1 | ||
DOWNLOAD_NO_EXTRACT: 1 | ||
DOWNLOAD_ONLY: 1 | ||
FIND_PACKAGE_ARGUMENTS: 1 | ||
NO_CACHE: 1 | ||
FORCE: 1 | ||
GITHUB_REPOSITORY: 1 | ||
GITLAB_REPOSITORY: 1 | ||
GIT_REPOSITORY: 1 | ||
GIT_SHALLOW: 1 | ||
GIT_TAG: 1 | ||
HTTP_PASSWORD: 1 | ||
HTTP_USERNAME: 1 | ||
NAME: 1 | ||
NO_CACHE: 1 | ||
OPTIONS: + | ||
SOURCE_DIR: 1 | ||
SVN_REPOSITORY: 1 | ||
SVN_REVISION: 1 | ||
URL: 1 | ||
URL_HASH: 1 | ||
URL_MD5: 1 | ||
VERSION: 1 | ||
pargs: | ||
flags: [] | ||
nargs: '*' | ||
spelling: CPMDeclarePackage | ||
cpmfindpackage: | ||
kwargs: | ||
DOWNLOAD_COMMAND: 1 | ||
DOWNLOAD_NAME: 1 | ||
DOWNLOAD_NO_EXTRACT: 1 | ||
HTTP_USERNAME: 1 | ||
DOWNLOAD_ONLY: 1 | ||
FIND_PACKAGE_ARGUMENTS: 1 | ||
FORCE: 1 | ||
GITHUB_REPOSITORY: 1 | ||
GITLAB_REPOSITORY: 1 | ||
GIT_REPOSITORY: 1 | ||
GIT_SHALLOW: 1 | ||
GIT_TAG: 1 | ||
HTTP_PASSWORD: 1 | ||
HTTP_USERNAME: 1 | ||
NAME: 1 | ||
NO_CACHE: 1 | ||
OPTIONS: + | ||
cpmfindpackage: | ||
SOURCE_DIR: 1 | ||
SVN_REPOSITORY: 1 | ||
SVN_REVISION: 1 | ||
URL: 1 | ||
URL_HASH: 1 | ||
URL_MD5: 1 | ||
VERSION: 1 | ||
pargs: | ||
nargs: '*' | ||
flags: [] | ||
spelling: CPMFindPackage | ||
kwargs: *cpmaddpackagekwargs | ||
cpmdeclarepackage: | ||
pargs: | ||
nargs: '*' | ||
flags: [] | ||
spelling: CPMDeclarePackage | ||
kwargs: *cpmaddpackagekwargs | ||
spelling: CPMFindPackage | ||
cpmgetpackageversion: | ||
pargs: 2 | ||
spelling: CPMGetPackageVersion | ||
cpmregisterpackage: | ||
pargs: 1 | ||
spelling: CPMRegisterPackage | ||
cpmusepackagelock: | ||
pargs: 1 | ||
spelling: CPMUsePackageLock | ||
packageproject: | ||
pargs: | ||
nargs: '*' | ||
flags: [] | ||
spelling: packageProject | ||
kwargs: | ||
NAME: 1 | ||
VERSION: 1 | ||
NAMESPACE: 1 | ||
INCLUDE_DIR: 1 | ||
INCLUDE_DESTINATION: 1 | ||
BINARY_DIR: 1 | ||
COMPATIBILITY: 1 | ||
VERSION_HEADER: 1 | ||
EXPORT_HEADER: 1 | ||
DISABLE_VERSION_SUFFIX: 1 | ||
DEPENDENCIES: + | ||
cpmusepackagelock: | ||
pargs: 1 | ||
spelling: CPMUsePackageLock | ||
cpmregisterpackage: | ||
pargs: 1 | ||
spelling: CPMRegisterPackage | ||
cpmgetpackageversion: | ||
pargs: 2 | ||
spelling: CPMGetPackageVersion | ||
DISABLE_VERSION_SUFFIX: 1 | ||
DISABLE_CHECK_REQUIRED_COMPONENTS: 1 | ||
EXPORT_HEADER: 1 | ||
INCLUDE_DESTINATION: 1 | ||
INCLUDE_DIR: 1 | ||
NAME: 1 | ||
NAMESPACE: 1 | ||
VERSION: 1 | ||
VERSION_HEADER: 1 | ||
pargs: | ||
flags: [] | ||
nargs: '*' | ||
spelling: packageProject | ||
format: | ||
line_width: 100 | ||
tab_size: 2 | ||
dangle_parens: true | ||
|
||
markup: | ||
enable_markup: false |
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
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
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
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,11 +1,11 @@ | ||
cmake_minimum_required(VERSION 3.14...3.20) | ||
cmake_minimum_required(VERSION 3.21...3.25) | ||
|
||
# ---- Project ---- | ||
|
||
# Note: update this to your new project's name and version | ||
project( | ||
MathFunctions | ||
VERSION 1.0.0 | ||
VERSION 1.0.1 | ||
LANGUAGES CXX | ||
) | ||
|
||
|
@@ -14,8 +14,7 @@ project( | |
if(PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR) | ||
message( | ||
FATAL_ERROR | ||
"In-source builds not allowed. Please make a new directory (called a build directory) \ | ||
and run CMake from there." | ||
"In-source builds not allowed. Please make a new directory (called a build directory) and run CMake from there." | ||
) | ||
endif() | ||
|
||
|
@@ -29,22 +28,17 @@ include(cmake/options.cmake) | |
include(cmake/CPM.cmake) | ||
|
||
# PackageProject.cmake will be used to make our target installable | ||
CPMAddPackage( | ||
NAME PackageProject.cmake | ||
GITHUB_REPOSITORY ClausKlein/PackageProject.cmake | ||
# VERSION CK1.6.0 | ||
GIT_TAG 4ac95860ba72bb0eb324c4d63e35fb59be3bd50d | ||
) | ||
CPMAddPackage("gh:TheLartians/[email protected]") | ||
|
||
set(COMPONENT_TARGETS_ENABLED NO) # Note: DO not set! CK | ||
# NO! set(COMPONENT_TARGETS_ENABLED NO) # Note: DO not set! CK | ||
set(PROJECT_NAMESPACE ${PROJECT_NAME}) | ||
set(PROJECT_VERSION_INCLUDE_DIR ${PROJECT_BINARY_DIR}/PackageProjectInclude) | ||
include_directories(${PROJECT_VERSION_INCLUDE_DIR}) | ||
|
||
set(NAMESPACE_HEADER_LOCATION ${CMAKE_CURRENT_LIST_DIR}/include) | ||
set(INCLUDE_INSTALL_DIR include/${PROJECT_NAMESPACE}-${PROJECT_VERSION}) # XXX VERSION_SUFFIX | ||
string(TOLOWER ${PROJECT_NAMESPACE} PROJECT_HEADER_LOCATION) | ||
# TODO: needed to be lower case? CK | ||
# TODO: why needed to be lower case? CK | ||
|
||
# ---- Add components libraries here ---- | ||
|
||
|
@@ -74,7 +68,7 @@ set_target_properties( | |
# header paths | ||
string(TOLOWER ${PROJECT_NAMESPACE}/version.h PROJECT_VERSION_HEADER) | ||
string(TOLOWER ${PROJECT_NAMESPACE}/${PROJECT_NAMESPACE}_export.h PROJECT_EXPORT_HEADER) | ||
# TODO: needed to be lower case? CK | ||
# TODO: why needed to be lower case? CK | ||
|
||
# Note: This needs to be done after all install(TARGETS ...) commands! | ||
# generate and install export targets file | ||
|
@@ -95,14 +89,18 @@ packageProject( | |
INCLUDE_DESTINATION ${INCLUDE_INSTALL_DIR} | ||
VERSION_HEADER ${PROJECT_VERSION_HEADER} | ||
EXPORT_HEADER ${PROJECT_EXPORT_HEADER} | ||
COMPATIBILITY SameMajorVersion # XXX DISABLE_VERSION_SUFFIX NOT YET! CK | ||
DISABLE_CHECK_REQUIRED_COMPONENTS YES | ||
COMPATIBILITY SameMajorVersion | ||
# XXX DISABLE_VERSION_SUFFIX NOT YET! CK | ||
DISABLE_CHECK_REQUIRED_COMPONENTS YES | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. needed too! |
||
) | ||
|
||
# generate the export targets for the build tree. Note: The file created by this command is specific | ||
# to the build tree and should never be installed! | ||
export( | ||
EXPORT ${PROJECT_NAMESPACE}Targets | ||
FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAMESPACE}Targets.cmake | ||
NAMESPACE ${PROJECT_NAMESPACE}:: | ||
) | ||
# generate the export targets for the build tree. | ||
# if(COMPONENT_TARGETS_ENABLED) | ||
# # Note: The file created by this command is specific to the build tree | ||
# # and and must be created after packageProject()! CK | ||
# export( | ||
# EXPORT ${PROJECT_NAMESPACE}Targets | ||
# FILE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAMESPACE}Targets.cmake | ||
# NAMESPACE ${PROJECT_NAMESPACE}:: | ||
# ) | ||
# 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed